How to Resolve the Startup Failure of SUSE11 VMs When LVs Are Created & Automatic Mounting Is Enabled in the fstab File

Publication Date:  2015-03-10 Views:  529 Downloads:  0
Issue Description
At a site, users cannot log in to multiple SUSE11 VMs after they are restarted. Users then log in to these SUSE11 VMs through VNC and find that they are in repair filesystem mode. The log recorded before they enter the repair filesystem mode contains an error message.
Figure 1 Error message

Handling Process
1. For VMs that have entered the repair filesystem mode, run the following command to restart them:
chkconfig boot.lvm on

2. For VMs where logical volumes have been created and automatically checking and mounting of logical volumes have been specified in the fstab file, run the following command to restart them:
chkconfig boot.lvm on
Root Cause
1. Check the /etc/fstab file. According to the fstab file, the /dev/vg00/lv00 device is checked and mounted during the startup process, as shown in Figure 2. However, the /dev/vg00/lv00 device is found in the repair filesystem mode, as shown in Figure 3. It can be concluded that this fault occurs because of a sequence of issues: the VMs fail to recognize the /dev/vg00/lv00 device during the startup process, the device fails to be mounted as specified in the fstab file, and then the startup process fails. The system then enters the repair filesystem mode.

Figure 2 repair filesystem mode 1



Figure 3 repair filesystem mode 2



2. Check the historical data. It is found that the lv00 device is created by users and written into the fstab file. The original system disk and logical disk do not use logical volumes.
Run the following commands on the VMs in repair filesystem mode:

modprobe dm_mod
vgchange -a y


After the logical volumes are manually activated, the /dev/vg00/lv00 device is generated. This means that the logical volumes of users have been created and are in normal state. The VMs cannot automatically activate the logical volumes during the startup process.

3. Check the startup service list of SUSE11 VMs. It is found that the list contains a boot.lvm service to activate all logical volumes. According to information obtained from the Internet, the boot.lvm service must be in startup state if SUSE11 systems need to use logical volumes. When this service starts up, it executes the vgchange -a y command to activate all logical volumes. Only activated logical volumes can be automatically mounted as specified in the /etc/fstab file.

Check the faulty VMs. It is found that the boot.lvm service is not in startup state. Run the following command in repair filesystem mode to restart the VMs:
chkconfig boot.lvm on
Then the VMs start to work normally.

In this case, the SUSE11 VMs fail to restart because users enable automatically checking and mounting of logical volumes during the startup process (specified in the fstab file) but do not set the boot.lvm service to the startup state. As a result, the system fails to automatically activate logical volumes during the startup process and thus fails to restart.
Suggestions
If the fstab file specifies that logical volumes need to be automatically mounted, the boot.lvm service of SUSE11 VMs must be in startup state. Refer to this case to resolve similar faults that occur in other Linux system.

END