22 # Make sure that we have a non-empty argument
23 if [ -z "${vg}" ]; then
27 # Take care of lilo boot arg, risky activating of all vg
30 lvm vgchange -aly --ignorelockingfailure
35 lvm vgchange -aly --ignorelockingfailure
40 # Make sure that we have a d-m path
42 if [ "$vg" = "$1" ]; then
46 # Make sure that the device includes at least one dash
47 if [ "$(echo -n "$vg" | tr -d -)" = "$vg" ]; then
51 # Split volume group from logical volume.
52 vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#')
53 # Reduce padded --'s to -'s
54 vg=$(echo ${vg} | sed -e 's#--#-#g')
56 lvm vgchange -aly --ignorelockingfailure ${vg}
59 if [ ! -e /sbin/lvm ]; then
63 /sbin/modprobe -q dm-mod
64 /sbin/modprobe -q dm-snapshot
65 /sbin/modprobe -q dm-mirror