I'm hosting a LimeSurvey server using a Ubuntu VM. After some time I needed to add another partition adding 50GB to an existing LVM group. After adding the partition, the structure looked like this:

sda                                          100G
├─sda1                         ext2          243M /boot
├─sda2                                         1K
├─sda3                         LVM2_member    50G
│ └─limesurvey--vg-root (dm-0) ext4         99.8G /
└─sda5                         LVM2_member  49.8G
  └─limesurvey--vg-root (dm-0) ext4         99.8G

sda3 is the new added partition. Everything worked fine until I restarted the VM after three months of usage:

Gave up waiting for root device
ALERT! /dev/mapper/limesurvey--vg-root does not exist. Dropping to a shell!

So it doesn't boot to Ubuntu but stays in initramfs. I can't use any backup for booting except the ones before the partitioning.

This is how I did the partitioning:



Because of adding the partition the swap partition was removed, so I added an additional swap file using these instructions:

  1. Create a swap partition.

  2. Create an empty file (1K * 4M = 4 GB).

    sudo mkdir -v /var/cache/swap  
    cd /var/cache/swap  
    sudo dd if=/dev/zero of=swapfile bs=1K count=4M  
    sudo chmod 600 swapfile  
  3. Convert newly created file into a swap space file.

    sudo mkswap swapfile  
  4. Enable file for paging and swapping.

    sudo swapon swapfile
  5. Verify by: swapon -s or top .

    top -bn1 | grep -i swap  
  6. To disable, run sudo swapoff swapfile .

  7. Add it into fstab file to make it persistent on the next system boot.

    echo "/var/cache/swap/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab  
  8. Retest swap file on startup.

    sudo swapoff swapfile   
    sudo swapon -va    

Could anyone shed some light why the partition broke down after restarting my VM, when it worked perfectly for 3 months before that?

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.