Ubuntu recovery mode with LVM drives
Posted in Linux
Had a client who had to restart a few of his Ubuntu servers due to a power outage and after restart one of them gave error messages and refused to boot. Error messages given were:
mountall: fsck /boot [397] terminated with status 1 init: ureadahead-other main process (1751) terminated with status 4 … mount.nfs: mounting 10.10.1.15:serverfiles failed, reason given by server: No such file or directory mountall: mount /usr/data/server_files [1283] terminated with status 32
I also discovered that a second server (a Qnap file server) had lost its raid configuration (!) during the restart and was non-responsive. This was also the server having the nfs volumes the earlier messages failed to find. After some googeling I found someone mentioning a bug in Ubuntu connecting crashed reboots with failure to mount nfs volumes at boot.
To try that theory out I did the following steps:
- Reboot server with Ubuntu installation cd and select rescue mode. Click through the whole process.
- Select to not mount /dev/sda1 (or what it’s called) as root. It’ll then be mounted in /target instead.
- If you’re not using LVM you can use fdisk to find what partitions you can mount.
- If you have LVM you can use the following steps to find and mount the correct volume:
- Find volume groups available:
- Activate the volume groups
- Show the logical volumes
- Mount the logical volume you need access to
# lvm vgscan –v
# lvm vgchange –a y
# lvm lvs –all
# mount /dev/{volume group}/{logical volume} /{mountpoint}
Open your fstab file using nano or another editor (vi or vim seems to be non available). Remove the line mounting the NFS volume. Save with CTRL+X.- Reboot the system.
This worked well for my client and his server started without any problems. The dead Qnap is another story though…

