1

Topic: After GParted, My Drive's Partition Is Dearly Departed.

One drive:
     C FAT16 1.99 GB
     D FAT32 approx 40GB
     E FAT32 approx 40GB
     F NTFS approx 32GB

My goal was to have those D and E 40GB partitions showing as 40.0GB within Explorer on Windows 2000 (that is, 42,949,672,960 bytes = 40*1024*1024*1024.  The number of bytes could even be slightly higher and still work out to 40.0...that displayed number is likely rounded to and only displaying up to the tenths.  42,950,066,176 bytes, for example, is on a different PC drive and displays under the Windows Explorer Property Sheet as 40.0GB).  Drive F would be whatever space was left over.  Drice C would be untouched.

Now, D & E started off as 31.5GB each, and F as 49.2GB (as viewed in Windows Explorer).  I ran GParted and tried to get D & E the SAME 40GB size, but while GParted showed 40GiB, Windows showed 39.9GB.  So, I ran GParted a second time, with the sizes as shown in red above.  This time I UNCHECKED the mysterious (F1 Help doesn't work off of the CD, BTW) "Round to Cylinders," hoping that would give me the precision to get those partitions to a size that would show under each drive's Windows Explorer Property Sheet as 40.0 GB.

Instead, GParted had a stroke.  As you can see below, it was told to take a tiny portion of F, give it to E, and, then, from E, give a tiny portion to D.

Can anyone tell me what went wrong?

Also, what is this "Round to Cylinders" option?  BTW, PartitionMagic (NOT used on this PC) has spinner buttons that allow sizing to the tenths place, but GParted only allows whole numbers in the drive-sizing MiB boxes.


Here is the error file gparted_details.htm:

GParted 0.4.5

Libparted 1.8.8

Move /dev/hda7 to the right and shrink it from 32.49 GiB to 32.48 GiB  00:49:41    ( SUCCESS )  
     calibrate /dev/hda7  00:00:00    ( SUCCESS )  
     path: /dev/hda7
start: 171975888
end: 240107489
size: 68131602 (32.49 GiB)  
 
check file system on /dev/hda7 for errors and (if possible) fix them  00:00:05    ( SUCCESS )  
     ntfsresize -P -i -f -v /dev/hda7  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34883380224 bytes (34884 MB)
Current device size: 34883380224 bytes (34884 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 25219 MB (72.3%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 25142 MB 0
Multi-Record : 25105 MB 11372
$MFTMirr : 17155 MB 1
Sparse : 25046 MB 16779
Ordinary : 31783 MB 4948
You might resize at 25218950656 bytes or 25219 MB (freeing 9665 MB).
Please make a test run using both the -n and -s options before real resizing!
 
 
 
shrink file system  00:00:12    ( SUCCESS )  
     run simulation  00:00:07    ( SUCCESS )  
     ntfsresize -P --force /dev/hda7 -s 34876040191 --no-action  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34883380224 bytes (34884 MB)
Current device size: 34883380224 bytes (34884 MB)
New volume size : 34876039680 bytes (34877 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 25219 MB (72.3%)
Collecting resizing constraints ...
Needed relocations : 0 (0 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
The read-only test run ended successfully.
 
 
 
real resize  00:00:05    ( SUCCESS )  
     ntfsresize -P --force /dev/hda7 -s 34876040191  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34883380224 bytes (34884 MB)
Current device size: 34883380224 bytes (34884 MB)
New volume size : 34876039680 bytes (34877 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 25219 MB (72.3%)
Collecting resizing constraints ...
Needed relocations : 0 (0 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
Successfully resized NTFS on device '/dev/hda7'.
You can go on to shrink the device for example with Linux fdisk.
IMPORTANT: When recreating the partition, make sure that you
1) create it at the same disk sector (use sector as the unit!)
2) create it with the same partition type (usually 7, HPFS/NTFS)
3) do not make it smaller than the new NTFS filesystem size
4) set the bootable flag for the partition if it existed before
Otherwise you won't be able to access NTFS or can't boot from the disk!
If you make a mistake and don't have a partition table backup then you
can recover the partition table by TestDisk or Parted's rescue mode.
 
 
 
 
shrink partition from 32.49 GiB to 32.48 GiB  00:00:01    ( SUCCESS )  
     old start: 171975888
old end: 240107489
old size: 68131602 (32.49 GiB)  
new start: 171975888
new end: 240093153
new size: 68117266 (32.48 GiB)  
 
check file system on /dev/hda7 for errors and (if possible) fix them  00:00:05    ( SUCCESS )  
     ntfsresize -P -i -f -v /dev/hda7  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34876039680 bytes (34877 MB)
Current device size: 34876040192 bytes (34877 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 25219 MB (72.3%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 25142 MB 0
Multi-Record : 25105 MB 11372
$MFTMirr : 17155 MB 1
Sparse : 25046 MB 16779
Ordinary : 31783 MB 4948
You might resize at 25218949120 bytes or 25219 MB (freeing 9658 MB).
Please make a test run using both the -n and -s options before real resizing!
 
 
 
grow file system to fill the partition  00:00:12    ( SUCCESS )  
     run simulation  00:00:07    ( SUCCESS )  
     ntfsresize -P --force /dev/hda7 --no-action  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34876039680 bytes (34877 MB)
Current device size: 34876040192 bytes (34877 MB)
New volume size : 34876040192 bytes (34877 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 25219 MB (72.3%)
Collecting resizing constraints ...
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
The read-only test run ended successfully.
 
 
 
real resize  00:00:05    ( SUCCESS )  
     ntfsresize -P --force /dev/hda7  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34876039680 bytes (34877 MB)
Current device size: 34876040192 bytes (34877 MB)
New volume size : 34876040192 bytes (34877 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 25219 MB (72.3%)
Collecting resizing constraints ...
WARNING: Every sanity check passed and only the dangerous operations left.
Make sure that important data has been backed up! Power outage or computer
crash may result major data loss!
Are you sure you want to proceed (y/[n])? Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
Successfully resized NTFS on device '/dev/hda7'.
 
 
 
 
check file system on /dev/hda7 for errors and (if possible) fix them  00:00:05    ( SUCCESS )  
     ntfsresize -P -i -f -v /dev/hda7  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34876040192 bytes (34877 MB)
Current device size: 34876040192 bytes (34877 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 25219 MB (72.3%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 25142 MB 0
Multi-Record : 25105 MB 11372
$MFTMirr : 17155 MB 1
Sparse : 25046 MB 16779
Ordinary : 31783 MB 4948
You might resize at 25218949120 bytes or 25219 MB (freeing 9658 MB).
Please make a test run using both the -n and -s options before real resizing!
 
 
 
move file system to the right  00:48:54    ( SUCCESS )  
     perform read-only test  00:16:16    ( SUCCESS )  
     using internal algorithm  
read 68117266 sectors  
finding optimal blocksize  
     read 65536 sectors using a blocksize of 128 sectors  00:00:02    ( SUCCESS )  
     65536 of 65536 read  
2.11871 seconds  
 
read 65536 sectors using a blocksize of 256 sectors  00:00:02    ( SUCCESS )  
     65536 of 65536 read  
2.03303 seconds  
 
read 65536 sectors using a blocksize of 512 sectors  00:00:03    ( SUCCESS )  
     65536 of 65536 read  
2.80422 seconds  
 
read 65536 sectors using a blocksize of 1024 sectors  00:00:02    ( SUCCESS )  
     65536 of 65536 read  
2.1916 seconds  
 
read 65536 sectors using a blocksize of 2048 sectors  00:00:02    ( SUCCESS )  
     65536 of 65536 read  
1.8102 seconds  
 
read 65536 sectors using a blocksize of 4096 sectors  00:00:01    ( SUCCESS )  
     65536 of 65536 read  
1.2402 seconds  
 
read 65536 sectors using a blocksize of 8192 sectors  00:00:01    ( SUCCESS )  
     65536 of 65536 read  
1.19084 seconds  
 
read 65536 sectors using a blocksize of 16384 sectors  00:00:01    ( SUCCESS )  
     65536 of 65536 read  
1.24107 seconds  
 
read 65536 sectors using a blocksize of 32768 sectors  00:00:02    ( SUCCESS )  
     65536 of 65536 read  
1.13395 seconds  
 
read 65536 sectors using a blocksize of 65536 sectors  00:00:01    ( SUCCESS )  
     65536 of 65536 read  
1.25367 seconds  
 
optimal blocksize is 32768 sectors (16.00 MiB)  
 
read 67461906 sectors using a blocksize of 32768 sectors  00:15:59    ( SUCCESS )  
     67461906 of 67461906 read  
 
68117266 sectors read  
 
perform real move  00:32:38    ( SUCCESS )  
     using internal algorithm  
copy 68117266 sectors  
finding optimal blocksize  
     copy 65536 sectors using a blocksize of 64 sectors  00:00:04    ( SUCCESS )  
     65536 of 65536 copied  
3.82591 seconds  
 
copy 65536 sectors using a blocksize of 128 sectors  00:00:03    ( SUCCESS )  
     65536 of 65536 copied  
3.82711 seconds  
 
copy 65536 sectors using a blocksize of 256 sectors  00:00:04    ( SUCCESS )  
     65536 of 65536 copied  
3.40841 seconds  
 
copy 65536 sectors using a blocksize of 512 sectors  00:00:03    ( SUCCESS )  
     65536 of 65536 copied  
3.27031 seconds  
 
copy 65536 sectors using a blocksize of 1024 sectors  00:00:03    ( SUCCESS )  
     65536 of 65536 copied  
3.17447 seconds  
 
copy 65536 sectors using a blocksize of 2048 sectors  00:00:03    ( SUCCESS )  
     65536 of 65536 copied  
2.70498 seconds  
 
copy 65536 sectors using a blocksize of 4096 sectors  00:00:02    ( SUCCESS )  
     65536 of 65536 copied  
2.45841 seconds  
 
copy 65536 sectors using a blocksize of 8192 sectors  00:00:03    ( SUCCESS )  
     65536 of 65536 copied  
2.32393 seconds  
 
copy 65536 sectors using a blocksize of 16384 sectors  00:00:02    ( SUCCESS )  
     65536 of 65536 copied  
2.25806 seconds  
 
copy 65536 sectors using a blocksize of 32768 sectors  00:00:02    ( SUCCESS )  
     65536 of 65536 copied  
2.23971 seconds  
 
copy 65536 sectors using a blocksize of 65536 sectors  00:00:02    ( SUCCESS )  
     65536 of 65536 copied  
2.26356 seconds  
 
optimal blocksize is 32768 sectors (16.00 MiB)  
 
copy 67396370 sectors using a blocksize of 32768 sectors  00:32:07    ( SUCCESS )  
     67396370 of 67396370 copied  
 
68117266 sectors copied  
 
 
move partition to the right  00:00:01    ( SUCCESS )  
     old start: 171975888
old end: 240093153
old size: 68117266 (32.48 GiB)  
new start: 171990224
new end: 240107489
new size: 68117266 (32.48 GiB)  
 
updating boot sector of ntfs file system on /dev/hda7  00:00:00    ( SUCCESS )  
     echo d05c400a | /usr/bin/xxd -r -p | /bin/dd conv=notrunc of=/dev/hda7 bs=1 seek=28  
     4+0 records in
4+0 records out
4 bytes (4 B) copied, 0.0247261 s, 0.2 kB/s
 
 
 
check file system on /dev/hda7 for errors and (if possible) fix them  00:00:05    ( SUCCESS )  
     ntfsresize -P -i -f -v /dev/hda7  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34876040192 bytes (34877 MB)
Current device size: 34876040192 bytes (34877 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 25219 MB (72.3%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 25142 MB 0
Multi-Record : 25105 MB 11372
$MFTMirr : 17155 MB 1
Sparse : 25046 MB 16779
Ordinary : 31783 MB 4948
You might resize at 25218949120 bytes or 25219 MB (freeing 9658 MB).
Please make a test run using both the -n and -s options before real resizing!
 
 
 
grow file system to fill the partition  00:00:01    ( SUCCESS )  
     run simulation  00:00:00    ( SUCCESS )  
     ntfsresize -P --force /dev/hda7 --no-action  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34876040192 bytes (34877 MB)
Current device size: 34876040192 bytes (34877 MB)
New volume size : 34876040192 bytes (34877 MB)
Nothing to do: NTFS volume size is already OK.
 
 
 
real resize  00:00:01    ( SUCCESS )  
     ntfsresize -P --force /dev/hda7  
     ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/hda7
NTFS volume version: 3.1
Cluster size : 512 bytes
Current volume size: 34876040192 bytes (34877 MB)
Current device size: 34876040192 bytes (34877 MB)
New volume size : 34876040192 bytes (34877 MB)
Nothing to do: NTFS volume size is already OK.
 
 
 
 
 

========================================

Grow /dev/hda6 from 40.00 GiB to 40.01 GiB  00:00:17    ( ERROR )  
     calibrate /dev/hda6  00:00:01    ( SUCCESS )  
     path: /dev/hda6
start: 88084458
end: 171975824
size: 83891367 (40.00 GiB)  
 
check file system on /dev/hda6 for errors and (if possible) fix them  00:00:01    ( SUCCESS )  
     dosfsck -a -w -v /dev/hda6  
     dosfsck 3.0.2 (28 Feb 2009)
dosfsck 3.0.2, 28 Feb 2009, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
16384 bytes per cluster
59 reserved sectors
First FAT starts at byte 30208 (sector 59)
2 FATs, 32 bit entries
10484224 bytes per FAT (= 20477 sectors)
Root directory start at cluster 1331279 (arbitrary size)
Data area starts at byte 20998656 (sector 41013)
2620323 data clusters (42931372032 bytes)
63 sectors/track, 255 heads
88084458 hidden sectors
83891367 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/hda6: 10027 files, 1331508/2620323 clusters
 
 
 
grow partition from 40.00 GiB to 40.01 GiB  00:00:01    ( ERROR )  
     old start: 88084458
old end: 171975824
old size: 83891367 (40.00 GiB)  
 
check file system on /dev/hda6 for errors and (if possible) fix them  00:00:02    ( SUCCESS )  
     dosfsck -a -w -v /dev/hda6  
     dosfsck 3.0.2 (28 Feb 2009)
dosfsck 3.0.2, 28 Feb 2009, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
16384 bytes per cluster
59 reserved sectors
First FAT starts at byte 30208 (sector 59)
2 FATs, 32 bit entries
10484224 bytes per FAT (= 20477 sectors)
Root directory start at cluster 1331279 (arbitrary size)
Data area starts at byte 20998656 (sector 41013)
2620323 data clusters (42931372032 bytes)
63 sectors/track, 255 heads
88084458 hidden sectors
83891367 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/hda6: 10027 files, 1331508/2620323 clusters
 
 
 
grow file system to fill the partition  00:00:12    ( SUCCESS )  
     using libparted  
 
libparted messages    ( INFO )  
     Unable to satisfy all constraints on the partition.  
Assertion (metadata_length > 0) at dos.c:2074 in function add_logical_part_metadata() failed.  
 
 

========================================

2

Re: After GParted, My Drive's Partition Is Dearly Departed.

My assumption is that your drive is partition using an MSDOS label, and that you have a combination of primary and logical partitions.

The round to cylinders button is described in the help manual:
http://gparted.sourceforge.net/docs/hel … -alignment

When you instructed GParted to not "round to cylinders", you effectively told it to use the exact setting you specified.  The challenge with doing it this way is that you must realize that at least 63 sectors must be reserved at the start of the first primary partition for the MBR, and also at the start of each logical partition for the EBR.  If you do not reserve space for these structures, then GParted will be unable to correctly apply the geometries you specified.

Currently GParted does not provide sizing lower than 1 MB.  If you are looking for complete control down to the sector level, you can try using a command line tool like parted, or fdisk.