gparted crashed during a resize; what are my options?
I was in the process of resizing an NTFS partition on my 2TB data drive (increasing its size, moving it all the way to the beginning of the disk) when gparted unexpectedly terminated at perhaps 66% complete.
sudo mount -t ntfs /dev/sdc1 /media/data/ :
NTFS signature is missing.
Failed to mount '/dev/sdc1': Invalid argument
The device '/dev/sdc1' doesn't seem to have a valid NTFS.
Mounting with gparted:
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
fdisk -l shows:
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x33d99b3b
Device Boot Start End Blocks Id System
/dev/sdc1 1 3907029167 1953514583+ ee GPT
Does gparted copy the data before writing the partition table? If that's the case, can I scan the disk for the beginning of the NTFS partition and attempt to recover the old partition table?
What are my options for getting my data back?
Solution 1:
I would suggest getting that new disk first, then using dd to copy the disk in its entirety in its current state, from one to the other. Just be sure the new disk has the same number (or more) of LBAs as the current disk (LBAs are printed on the label)
Once that is done, then yes, scan the disk using testdisk and following this guide:
http://www.dedoimedo.com/computers/linux-data-recovery.html
If testdisk can find and tell you the sector number of the beginning of the lost partition, and the end of the contiguous data for that part of the partition, you should be able to move it over to the start of the disk with dd.
Example:
If the start of the partition is on sector 1294, and there is contiguous data from 1294 to 1399, then you could do:
dd if=/dev/sdb of=/dev/sdd skip=1293 count=105
sdb is the disk you tried to relocate the partition on, sdd is the second spare disk you bought for this recovery attempt. Hope that helps, and good luck!