To better explain what is wrong now with my harddisk let me tell you the series of events:
I was trying to expand a CentOS root partition. In order to do that I first tried to unmount and remove the home partition (where the free storage was avaialble) after data backup. I was able to unmount the partition but facing some issues while removing the home partition.
Frustrated me, despite all the warnings that an XFS file system can not be shrunk, I tried lvreduce
on home partition thinking that it will produce some error. But it did not. So now I tried expanding the root partition to see what happens and ended up corrupting the both partitions. I was receiving Invalid magic number in superblock
error message while mounting.
I was able to xfs_repair
home partition but there was some permission issues when trying the same on root. Meanwhile I tried some solution on some blog online and accidentally changed the partition type to ext4
and now I can access the root partition but there is no data in it.
Is there anyway I can recover the data in root partition now?
testdisk
but it says it does not supportxfs
currently. And, is there anything you wrote after "but..."?