SUSE Support

Here When You Need Us

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 3 (SLES 11 SP3)
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

Shutdown is hanging after unmounting the logical volume for /var:

   [...]
   Unmounting file systems
   /dev/mapper/vgsystem-lvvar has been unmounted

Resolution

Please change the locking_dir variable in /etc/lvm/lvm.conf to a location which is not located on any other logical volume than root:

   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 locking directory is unmounted before stopping LVM (Logical Volume Manager).

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 Reason for the additional execution of mkinitrd is the logical volume activating process.

-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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.