How to repair an ext3 partition after broken resize operation

data-recoveryext3filesystemsfsckparted

I was using gparted to resize a near-terabyte ext3 partition, adding about 40 GB to the left. After nearly 12 hours of moving data (and with 23 more hours estimated to remain) the system hung. Now fsck reports too much illegal data in every inode. How do I fix the FS in this case?

Best Answer

Unfortunately, I think you are quite screwed. If you only messed with the partition table then TestDisk is your best shot, but since you have been resizing (which actually means copying and maybe even deleting), your data is, more or less, corrupted.

If you have a backup from before performing the resize operation, this is a good time to use it. Else, I don't know what you can do, I would ditch the partition and create a new one, saying goodbye to the data inside. A lesson that has to be learned from this is, always be careful with your data. (Of course you should try waiting to see if there is any super great answer that can do better, but don't hold too much hope.)

Now if you really have a backup, an easier way to "resize" is to delete the old partition, create a new one, then restore the data there.