System is hanging at stopping LVM during shutdown
This document (7018572) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 11 Service Pack 4 (SLES 11 SP4)
SUSE Linux Enterprise Server 12 Service Pack 1 (SLES 12 SP1)
SUSE Linux Enterprise Server 12 Service Pack 2 (SLES 12 SP2)
Situation
[...]
Unmounting file systems
/dev/mapper/vgsystem-lvvar has been unmounted
Resolution
locking_dir = "/var/run/lvm/lock"to e.g.
locking_dir = "/root/lvm/lock"
In case the system requires LVM support during boot up, please run mkinitrd to update the lvm.conf file in the systems initrd file.
Please note: The new changes will only become active when the initrd gets loaded the next time. Hence it is excepted for the system to hang another time before the shutdown.
Cause
The LVM locking directory uses /var by default. But in a setup utilizing several separate volumes it needs to be changed to a location on the root volume as this is the last unmounted device.
Additional Information
-the ROOT volume is activated through /lib/mkinitrd/boot/61-lvm2.sh in inirtd
The initrd is made by `mkinitrd` command. `lvdisplay -c` will check if there is block of LVM devices and then decides whether to include LVM module during `mkinitrd`
- NON-ROOT volumes get activated through /lib/udev/rules.d/64-lvm2.rules udev event ->
/lib/udev/activate_vg(vgchange -ay)
To check whether lvm support in the initrd is required, please run
lsinitrd /boot/initrd|less
to see whether /etc/lvm/lvm.conf has been included. If this is the case, each change to /etc/lvm/lvm.conf requires mkinitrd to be run.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7018572
- Creation Date: 02-Feb-2017
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com