/usr/share/initramfs-tools/scripts/local-block/lvm2 is in lvm2 2.02.133-1ubuntu10.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | #!/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
lvchange_activate() {
lvm lvchange -aay -y --sysinit --ignoreskippedcluster "$@"
}
activate() {
local dev="$1"
case "$dev" in
/dev/mapper/*)
eval $(dmsetup splitname --nameprefixes --noheadings --rows "${dev#/dev/mapper/}")
if [ "$DM_VG_NAME" ] && [ "$DM_LV_NAME" ]; then
lvchange_activate "$DM_VG_NAME/$DM_LV_NAME"
fi
;;
/dev/*/*)
# Could be /dev/VG/LV; use lvs to check
if lvm lvs -- "$dev" >/dev/null 2>&1; then
lvchange_activate "$dev"
fi
;;
esac
}
activate "$1"
exit 0
|