Bug#782407: unblock: lvm2/2.02.111-2.2

Ben Hutchings ben at decadent.org.uk
Sat Apr 11 17:32:49 UTC 2015


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock

Please unblock package lvm2

This is needed to avoid a boot failure when upgrading some systems
from wheezy.

diff -Nru lvm2-2.02.111/debian/changelog lvm2-2.02.111/debian/changelog
--- lvm2-2.02.111/debian/changelog	2015-03-01 21:19:37.000000000 +0000
+++ lvm2-2.02.111/debian/changelog	2015-04-10 01:43:40.000000000 +0100
@@ -1,3 +1,10 @@
+lvm2 (2.02.111-2.2) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * Add support for /dev/VG/LV naming in initramfs (Closes: #780319)
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Fri, 10 Apr 2015 01:43:39 +0100
+
 lvm2 (2.02.111-2.1) unstable; urgency=medium
 
   * Non-maintainer upload
diff -Nru lvm2-2.02.111/debian/initramfs-tools/lvm2/scripts/local-block/lvm2 lvm2-2.02.111/debian/initramfs-tools/lvm2/scripts/local-block/lvm2
--- lvm2-2.02.111/debian/initramfs-tools/lvm2/scripts/local-block/lvm2	2015-01-17 22:35:47.000000000 +0000
+++ lvm2-2.02.111/debian/initramfs-tools/lvm2/scripts/local-block/lvm2	2015-04-10 02:02:06.000000000 +0100
@@ -21,20 +21,28 @@
 
 dev="$1"
 
-# Make sure that we have a d-m path
-dev="${dev#/dev/mapper/}"
-if [ "$dev" = "$1" ]; then
-	return 1
-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"
+case "$dev" in
+/dev/mapper/*)
+	dev="${dev#/dev/mapper/}"
+
+	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
+	;;
+
+/dev/*/*)
+	# Could be /dev/VG/LV; use lvs to check
+	dev="${dev#/dev/}"
+	if lvm lvs -- "$dev" >/dev/null 2>/dev/null; then
+		lvm lvchange -aly --ignorelockingfailure "$dev"
 	fi
-fi
+	;;
+esac
 
 exit 0
diff -Nru lvm2-2.02.111/debian/initramfs-tools/lvm2/scripts/local-top/lvm2 lvm2-2.02.111/debian/initramfs-tools/lvm2/scripts/local-top/lvm2
--- lvm2-2.02.111/debian/initramfs-tools/lvm2/scripts/local-top/lvm2	2015-01-17 17:13:22.000000000 +0000
+++ lvm2-2.02.111/debian/initramfs-tools/lvm2/scripts/local-top/lvm2	2015-04-10 01:33:33.000000000 +0100
@@ -24,8 +24,8 @@
 		return 1
 	fi
 
-	# Take care of lilo boot arg, risky activating of all vg
 	case "$dev" in
+	# Take care of lilo boot arg, risky activating of all vg
 	fe[0-9]*)
 		lvm vgchange -aly --ignorelockingfailure
 		exit 0
@@ -35,23 +35,33 @@
 		lvm vgchange -aly --ignorelockingfailure
 		exit 0
 		;;
-	esac
 
-	# Make sure that we have a d-m path
-	dev="${dev#/dev/mapper/}"
-	if [ "$dev" = "$1" ]; then
-		return 1
-	fi
+	/dev/mapper/*)
+		dev="${dev#/dev/mapper/}"
 
-	eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev")
+		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"
+		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
+			return 0
 		fi
-	fi
+		;;
+
+	/dev/*/*)
+		# Could be /dev/VG/LV; use lvs to check
+		dev="${dev#/dev/}"
+		if lvm lvs -- "$dev" >/dev/null 2>/dev/null; then
+			lvm lvchange -aly --ignorelockingfailure "$dev"
+			return 0
+		fi
+		;;
+	esac
+
+	return 1
 }
 
 if [ ! -e /sbin/lvm ]; then
--- END ---

unblock lvm2/2.02.111-2.2

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the pkg-lvm-maintainers mailing list