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:

  1. I booted to a live cd (XUbuntu 16.04).
  2. I used system-config-lvm to shrink the internal ext4 partition by approximately 100gb.
  3. I then used gparted to shrink the LVM by 100gb, leaving 100gb unallocated.
  4. I rebooted my computer, and got dumped to an initramfs prompt.

In order to try to repair things, I did the following:

  1. I rebooted to a live cd.

  2. I saw that the internal ext4 partition was reporting a bad geometry.

  3. I ran fdisk -f on /dev/lvm-name/root to try to fix the bad geometry.

  4. I rebooted again -- still dumped to an initramfs

  5. I started the livecd again.

  6. I ran gparted and expanded the lvm container back to full size.

  7. I ran system-config-lvm and expanded the internal ext4 partition to full size.

  8. I mounted /dev/lvm-name/root to see if my data was there. It was not. There was only a single Lost+Found directory.

  9. 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 ~.

share|improve this question
    
fdisk -f just tells me fdisk: invalid option -- 'f'. Also how can fdisk even run with lvm, you said you ran it on /dev/lvm-name/root. LVM has no partition table and fdisk has no idea about LVM geometry. From my experience, if just geometry is set incorrectly, you can often recover. By the way, system-config-lvm is unmaintained, I would be warry of using it. Use some other GUI to resize LVM LVs. E.g. KDE Partition Manager can do it. – Andrius Štikonas Nov 24 '17 at 1:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.