TL;DR
Ran mke2fs -S on my disk partition and now trying to get the data back.
Set up
Running a home server with a 2TB HDD. Running VMWare ESXi 5.5 that has 2 guest OS; CentOS 7 and Windows Server 2012 R2.
There are 3 virtual disks (VMDK) thickly provisioned:
- 20GB CentOS 7 install
- 40GB Windows 2012 install
- ~1.9TB data disk for CentOS 7
Original issue
I left no space on the data store when creating the data disk which meant after shutting the Windows VM, there was no room for the swap file to boot it back up. Due to the size of the disk, there was also no room to perform a copy of the data disk to then be able safely convert it.
Attempted solution
Tried to find a way of slightly decreasing the size of the data virtual disk to give Windows enough space to load. Hole punched VMDK following this guide:
https://www.virten.net/2014/11/howto...ual-disk-vmdk/
In CentOS:
Code:
cd /mnt/data
dd bs=1M count=8192 if=/dev/zero of=zero
In ESXi:
Code:
cd /vmfs/volumes/ds1/vma
vmkfstools -K vma_1.vmdk
Then attempted to shrink the partition after reading the following guide:
https://www.howtoforge.com/linux_res...xt3_partitions
Code:
umount /dev/sdb1
e2fsck /dev/sdb1
Here I got a message saying "bad magic number in super-block"
I tried the below which didnt work:
Code:
e2fsck -b 32768 /dev/sdb1
Followed by:
Code:
mke2fs -S /dev/sdb1
Before running the above command my file system was still intact - I could still see the individual folder names when mounting the disk. Now I just had an empty lost+found folder.
I then believed that maybe this issue was happening because my file system was actually XFS and not EXT4. So I tried:
Code:
xfs_repair /dev/sdb1
Current and even worse issue
Now inside the lost+found folder its full of numbered folders. One of which has "Led Zeppelin" on it indicating that the underlying data is perhaps still there.
I have stopped tinkering with it now as I don't want to make it any worse, even though I realise the data is probably already corrupt.
Does anybody know of anything else I can try? Unfortunately the partition contains all of my data, most of which is not backed up elsewhere.