1

Topic: Failure to resize/move NTFS

I'm confused as to why it failed and why things appear to be okay (except my driver letter changed from G: to F:). The resize did not happen.
I was performing a GROW into unallocated space.

It spent 3 hours doing stuff (copying data).

Below is the 'Save details' that it prompted me to report.

GParted 0.14.0

Libparted 2.3
Move /dev/sda6 to the left and grow it from 400.00 GiB to 588.75 GiB  03:00:12    ( ERROR )
        
calibrate /dev/sda6  00:00:00    ( SUCCESS )
        
path: /dev/sda6
start: 3,067,370,838
end: 3,906,236,879
size: 838,866,042 (400.00 GiB)
check file system on /dev/sda6 for errors and (if possible) fix them  00:00:02    ( SUCCESS )
        
ntfsresize -P -i -f -v /dev/sda6
        
ntfsresize v2012.1.15AR.7 (libntfs-3g)
Device name : /dev/sda6
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 429499412992 bytes (429500 MB)
Current device size: 429499413504 bytes (429500 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 386608 MB (90.0%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 293639 MB 0
Multi-Record : 322832 MB 17368
$MFTMirr : 1 MB 1
Sparse : 329250 MB 117842
Ordinary : 429497 MB 17724
You might resize at 386607321088 bytes or 386608 MB (freeing 42892 MB).
Please make a test run using both the -n and -s options before real resizing!
grow partition from 400.00 GiB to 588.75 GiB  00:00:00    ( SUCCESS )
        
old start: 3,067,370,838
old end: 3,906,236,879
old size: 838,866,042 (400.00 GiB)
new start: 2,671,544,320
new end: 3,906,236,879
new size: 1,234,692,560 (588.75 GiB)
move file system to the left  03:00:05    ( SUCCESS )
        
perform read-only test  00:51:31    ( SUCCESS )
        
using internal algorithm
read 400.00 GiB
finding optimal block size
        
read 16.00 MiB using a block size of 2.00 MiB  00:00:00    ( SUCCESS )
        
16.00 MiB of 16.00 MiB read
0.123438 seconds
read 16.00 MiB using a block size of 4.00 MiB  00:00:00    ( SUCCESS )
        
16.00 MiB of 16.00 MiB read
0.108665 seconds
read 16.00 MiB using a block size of 8.00 MiB  00:00:01    ( SUCCESS )
        
16.00 MiB of 16.00 MiB read
0.102415 seconds
read 16.00 MiB using a block size of 16.00 MiB  00:00:00    ( SUCCESS )
        
16.00 MiB of 16.00 MiB read
0.113302 seconds
optimal block size is 8.00 MiB
read 399.94 GiB using a block size of 8.00 MiB  00:51:30    ( SUCCESS )
        
399.94 GiB of 399.94 GiB read
400.00 GiB (429,499,413,504 B) read
perform real move  02:08:34    ( SUCCESS )
        
using internal algorithm
copy 400.00 GiB
finding optimal block size
        
copy 16.00 MiB using a block size of 1.00 MiB  00:00:00    ( SUCCESS )
        
16.00 MiB of 16.00 MiB copied
0.255799 seconds
copy 16.00 MiB using a block size of 2.00 MiB  00:00:01    ( SUCCESS )
        
16.00 MiB of 16.00 MiB copied
0.239223 seconds
copy 16.00 MiB using a block size of 4.00 MiB  00:00:00    ( SUCCESS )
        
16.00 MiB of 16.00 MiB copied
0.23601 seconds
copy 16.00 MiB using a block size of 8.00 MiB  00:00:00    ( SUCCESS )
        
16.00 MiB of 16.00 MiB copied
0.218992 seconds
copy 16.00 MiB using a block size of 16.00 MiB  00:00:00    ( SUCCESS )
        
16.00 MiB of 16.00 MiB copied
0.243943 seconds
optimal block size is 8.00 MiB
copy 399.92 GiB using a block size of 8.00 MiB  02:08:33    ( SUCCESS )
        
399.92 GiB of 399.92 GiB copied
400.00 GiB (429,499,413,504 B) copied
shrink partition from 588.75 GiB to 400.00 GiB  00:00:01    ( SUCCESS )
        
old start: 2,671,544,320
old end: 3,906,236,879
old size: 1,234,692,560 (588.75 GiB)
new start: 2,671,544,320
new end: 3,510,410,361
new size: 838,866,042 (400.00 GiB)
update boot sector of ntfs file system on /dev/sda6  00:00:00    ( SUCCESS )
check file system on /dev/sda6 for errors and (if possible) fix them  00:00:02    ( SUCCESS )
        
ntfsresize -P -i -f -v /dev/sda6
        
ntfsresize v2012.1.15AR.7 (libntfs-3g)
Device name : /dev/sda6
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 429499412992 bytes (429500 MB)
Current device size: 429499413504 bytes (429500 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 386608 MB (90.0%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 293639 MB 0
Multi-Record : 322832 MB 17368
$MFTMirr : 1 MB 1
Sparse : 329250 MB 117842
Ordinary : 429497 MB 17724
You might resize at 386607321088 bytes or 386608 MB (freeing 42892 MB).
Please make a test run using both the -n and -s options before real resizing!
grow partition from 400.00 GiB to 588.75 GiB  00:00:00    ( ERROR )
        
old start: 2,671,544,320
old end: 3,510,410,361
old size: 838,866,042 (400.00 GiB)
requested start: 2,671,544,320
requested end: 3,906,238,463
requested size: 1,234,694,144 (588.75 GiB)
check file system on /dev/sda6 for errors and (if possible) fix them  00:00:02    ( SUCCESS )
        
ntfsresize -P -i -f -v /dev/sda6
        
ntfsresize v2012.1.15AR.7 (libntfs-3g)
Device name : /dev/sda6
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 429499412992 bytes (429500 MB)
Current device size: 429499413504 bytes (429500 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 386608 MB (90.0%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 293639 MB 0
Multi-Record : 322832 MB 17368
$MFTMirr : 1 MB 1
Sparse : 329250 MB 117842
Ordinary : 429497 MB 17724
You might resize at 386607321088 bytes or 386608 MB (freeing 42892 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:00    ( SUCCESS )
        
run simulation  00:00:00    ( SUCCESS )
        
ntfsresize -P --force --force /dev/sda6 --no-action
        
ntfsresize v2012.1.15AR.7 (libntfs-3g)
Device name : /dev/sda6
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 429499412992 bytes (429500 MB)
Current device size: 429499413504 bytes (429500 MB)
New volume size : 429499408896 bytes (429500 MB)
Nothing to do: NTFS volume size is already OK.
real resize  00:00:00    ( SUCCESS )
        
ntfsresize -P --force --force /dev/sda6
        
ntfsresize v2012.1.15AR.7 (libntfs-3g)
Device name : /dev/sda6
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 429499412992 bytes (429500 MB)
Current device size: 429499413504 bytes (429500 MB)
New volume size : 429499408896 bytes (429500 MB)
Nothing to do: NTFS volume size is already OK.
libparted messages    ( INFO )
        
Can't have overlapping partitions.

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

2

Re: Failure to resize/move NTFS

Regarding the change in drive letter, the GParted FAQ contains links to articles on how to change the drive letter.

Regarding the failure to move and grow the file system, it appears that the operation would encounter overlapping partitions, but for some reason did not report this failure and halt the operation.

Would you be able to provide the output from the following two commands?

sudo fdisk -l -u

where one of the options is a lower case "L" and not the number one.

sudo parted /path-to-your-device unit s print

where /path-to-your-device is something like /dev/sda.

That way we can try to analyze this problem further to try to determine what happened.

3

Re: Failure to resize/move NTFS

Thanks for your quick response. Unfortunately I got skeptical of gparted last night, so I tried doing it myself.
Even though gparted failed, it does seem like it sucessfully 'moved' my partition, it just could not grow it.

Under Fedora 17, I simply removed the partition and readded it with a larger end location (+550GB, IIRC).
I then ran ntfsresize /dev/sda6 with no options and it worked without any problems. My version is
ntfsresize v2012.1.15 (libntfs-3g)

I am not sure this is still helpful, but before starting on this attempt, I did make a copy of the partition using sfdisk. I made
a copy before I used gparted and then after gparted failed, but before I manually did the partition editing.

Original:
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start=     2048, size=307200000, Id= 7, bootable
/dev/sda2 : start=307202048, size=1024000000, Id= 7
/dev/sda3 : start=1331202048, size=2575034832, Id= 5
/dev/sda4 : start=        0, size=        0, Id= 0
/dev/sda5 : start=1331202111, size=209720559, Id=83
/dev/sda6 : start=1540922733, size=209728512, Id=83
/dev/sda7 : start=1750651308, size= 62926542, Id=83
/dev/sda8 : start=3067370838, size=838866042, Id= 7
/dev/sda9 : start=1813581824, size= 40960000, Id=82

After gparted failed:
/dev/sda1 : start=     2048, size=307200000, Id= 7, bootable
/dev/sda2 : start=307202048, size=1024000000, Id= 7
/dev/sda3 : start=1331202048, size=2575034832, Id= 5
/dev/sda4 : start=        0, size=        0, Id= 0
/dev/sda5 : start=1331202111, size=209720559, Id=83
/dev/sda6 : start=2671544320, size=838866042, Id= 7
/dev/sda7 : start=3853989888, size= 52246528, Id=82

Currently working:
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start=     2048, size=307200000, Id= 7, bootable
/dev/sda2 : start=307202048, size=1024000000, Id= 7
/dev/sda3 : start=1331202048, size=2575034832, Id= 5
/dev/sda4 : start=        0, size=        0, Id= 0
/dev/sda5 : start=1331202111, size=209720559, Id=83
/dev/sda6 : start=2671544320, size=1153433600, Id= 7
/dev/sda7 : start=3853989888, size= 52246992, Id=82

4

Re: Failure to resize/move NTFS

Thank you for the extra information.

As best as I can tell it looks like at least two logical Id=83 partitions
were deleted prior to GParted failing on growing sda6.  Perphaps the
swap logical Id=82 partition was also deleted and recreated.

Deleting the original sda6 and sda7 partitions would reduce the higher
numbered logical partitions by two.

    sda8 becomes sda6
    sda9 becomes sda7

Then the move to the left of sda6 completed successfully, but the grow
of sda6 failed due to overlapping partitions.

From the GParted log file I can see that the sda6 partition grow step
failed.

grow partition from 400.00 GiB to 588.75 GiB  00:00:00    ( ERROR )
old start:       2,671,544,320
old end:         3,510,410,361
old size:          838,866,042 (400.00 GiB)
requested start: 2,671,544,320
requested end:   3,906,238,463
requested size:  1,234,694,144 (588.75 GiB)

The overlap would have occurred with the end of the sda3 extended partition.

sda3  3,906,236,879 = Extended partition actual end.
sda6  3,906,238,463 = Logical partition requested end which extends beyond sda3.

This looks like a software bug to me.

Would you be able to open a GParted bug report regarding this problem and
include a link back to this forum thread?

The bug report title could be something like "Growing logical partition overlaps end of extended partition"

5

Re: Failure to resize/move NTFS

gedakc wrote:

Thank you for the extra information.

As best as I can tell it looks like at least two logical Id=83 partitions
were deleted prior to GParted failing on growing sda6.  Perphaps the
swap logical Id=82 partition was also deleted and recreated.

That is correct, when I first ran GParted I removed the two logical partitions
/dev/sda6 and /dev/sda7 (type 83). IIRC, I hit apply on those delete operation before I
moved onto the move/resize operation.

When I manually reparitioned under Fedora, I removed /dev/sda6 and /dev/sda7 (swap type 82), then
recreated them.

I have created the bug report. https://bugzilla.gnome.org/show_bug.cgi?id=686668

6

Re: Failure to resize/move NTFS

Thank you for creating the bug report.

I will place future research and communications in the bug report.