#!/bin/sh ### BEGIN INIT INFO # Provides: lvm2 lvm # Required-Start: mountdevsubfs # Required-Stop: # Should-Start: udev mdadm-raid cryptdisks-early multipath-tools-boot # Should-Stop: umountroot mdadm-raid # X-Start-Before: checkfs mountall # X-Stop-After: umountfs # Default-Start: S # Default-Stop: ### END INIT INFO SCRIPTNAME=/etc/init.d/lvm2 . /lib/lsb/init-functions [ -x /sbin/vgchange ] || exit 0 do_start() { modprobe dm-mod 2> /dev/null || : export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1 /sbin/vgscan --ignorelockingfailure || : /sbin/vgchange -aly --ignorelockingfailure || return 2 } do_stop() { /sbin/vgchange -an || return 2 } case "$1" in start) log_begin_msg "Setting up LVM Volume Groups" do_start case "$?" in 0|1) log_end_msg 0 ;; 2) log_end_msg 1 ;; esac ;; stop) do_stop ;; restart|force-reload|status) ;; *) echo "Usage: $SCRIPTNAME start" >&2 exit 3 ;; esac