I had an LVM that contained a 900gb ext4 partition (/root). This was running Ubuntu 17.04.
I wanted to dual boot windows on this machine, so I needed to make some space on the disk. I took the following steps:
- I booted to a live cd (XUbuntu 16.04).
- I used system-config-lvm to shrink the internal ext4 partition by approximately 100gb.
- I then used gparted to shrink the LVM by 100gb, leaving 100gb unallocated.
- I rebooted my computer, and got dumped to an initramfs prompt.
In order to try to repair things, I did the following:
I rebooted to a live cd.
I saw that the internal ext4 partition was reporting a bad geometry.
I ran fdisk -f on /dev/lvm-name/root to try to fix the bad geometry.
I rebooted again -- still dumped to an initramfs
I started the livecd again.
I ran gparted and expanded the lvm container back to full size.
I ran system-config-lvm and expanded the internal ext4 partition to full size.
I mounted /dev/lvm-name/root to see if my data was there. It was not. There was only a single Lost+Found directory.
I tried rebooting, still got dumped to the initramfs prompt.
Is that data lost, or can it be recovered? Aside from fiddling with the partition table and the fdisk, I didn't write to the disk at all, so I'm holding onto some thing hope that I can recover the system or at least some data (about 50gb) I had in ~.