Control: tag -1 patch Here is a new script cribbed from the existing scripts/local-top/lvm2. Tested in conjunction with the patch I'm about to send to #762984.
--- /dev/null +++ b/debian/initramfs-tools/lvm2/scripts/local-extra/lvm2 @@ -0,0 +1,40 @@ +#!/bin/sh + +PREREQ="mdadm mdrun multipath" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +if [ ! -e /sbin/lvm ]; then + exit 0 +fi + +dev="$1" + +# Make sure that we have a d-m path +dev="${dev#/dev/mapper/}" +if [ "$dev" = "$1" ]; then + exit 0 +fi + +eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev") + +if [ "$DM_VG_NAME" ] && [ "$DM_LV_NAME" ]; then + lvm lvchange -aly --ignorelockingfailure "$DM_VG_NAME/$DM_LV_NAME" + rc=$? + if [ $rc = 5 ]; then + echo "Unable to find LVM volume $DM_VG_NAME/$DM_LV_NAME" + fi +fi + +exit 0 -- Ben Hutchings The first rule of tautology club is the first rule of tautology club.
signature.asc
Description: This is a digitally signed message part