1

Topic: Moving NTFS partition results in invalid partition

I used GParted 4.6 (with Libparted 1.9.0), as included on SystemRescueCD 1.3.1, to try to delete and to  move some Linux and NTFS partitions. On this step:

Move /dev/sda5 to the right and grow it from 63.48 GiB to 82.56 GiB  01:35:14    ( ERROR )

ntfs resizes reports

ntfsresize -P -i -f -v /dev/sda5
        
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda5
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 68162859520 bytes (68163 MB)
Current device size: 68162863104 bytes (68163 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 66932 MB (98.2%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 63002 MB 0
Multi-Record : 67556 MB 56139
$MFTMirr : 2148 MB 1
Compressed : 67498 MB 56457
Ordinary : 68163 MB 63956
You might resize at 66931146752 bytes or 66932 MB (freeing 1231 MB).
Please make a test run using both the -n and -s options before real resizing!

at the start. After a long series of (omitted) block copy reports and the completion of the move part of this operation, I end up with:

133130592 sectors copied

move partition to the right  00:12:01    ( SUCCESS )
        
old start: 30780603
old end: 163911194
old size: 133130592 (63.48 GiB)
new start: 41046075
new end: 174176666
new size: 133130592 (63.48 GiB)
update boot sector of ntfs file system on /dev/sda5  00:00:00    ( SUCCESS )
check file system on /dev/sda5 for errors and (if possible) fix them  00:00:00    ( ERROR )
        
ntfsresize -P -i -f -v /dev/sda5
        
ntfsresize v2.0.0 (libntfs 10:0:0)
Error reading bootsector: Invalid argument.
Failed to startup volume: Invalid argument.
ERROR(22): Opening '/dev/sda5' as NTFS failed: Invalid argument
The device '/dev/sda5' doesn't have a valid NTFS.
Maybe you selected the wrong partition? Or the whole disk instead of a
partition (e.g. /dev/hda, not /dev/hda1)? This error might also occur
if the disk was incorrectly repartitioned (see the ntfsresize FAQ).

Uh, oh. Do I have a recovery option here? Is there information from the partition that would be useful in evaluating what went wrong?

Thanks for your help.

2

Re: Moving NTFS partition results in invalid partition

Hello tallcedars,

due to your "ntfsresize" log,  the move of "sda5" ( first logical volume in an extended partition) was done successfully, but resizing wasn't yet done, because of the error, which occured.  Probably, the Extended Boot Record doesn't contain the updated new locations or the parameter block in the volume's Partition Boot Record was not updated. Try to use "MC_HxEd" (contained in "GParted Live") to upload both Records to a file sharing site, so that we can check this. Use "Search" item on top of this page with keyword "MC_HxEd" to get an instruction, how to use it. Be aware, that Boot Records and their locations are individual : DO NOT USE BOOT RECORDS, WHICH ARE DOWNLOADABLE FROM THESE THREADS !

Regards
cmdr

3

Re: Moving NTFS partition results in invalid partition

It turns out that this hard drive has gone bad. I'm not sure why the copy phase was reported as being successful. Attempting to scan the partition now results in many unrecoverable read errors and SMART shows far too many bad sectors.

It's a good thing I took seriously your advice on making a backup of the disk before running GParted. Thanks for that.

    tallcedars

4

Re: Moving NTFS partition results in invalid partition

Hardware fails sometimes, and this could lead to data loss, especially during such partition manipulations. It is not for the hard drive only, but for controllers, motherboards, power supply units, even cable connections.

I am glad to read that you have a backup smile I'm afraid that most users ommit this essential step.

(Moved to the live media section)

*** It is highly recommended to backup any important files before doing resize/move operations. ***