[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#757417: libparted2-udeb: breaks auto-lvm in d-i



Cyril Brulebois <kibi@debian.org> (2014-08-08):
> 3.2-2 fixes the non-LVM case, while it doesn't fix the second one, since
> we're now getting a different issue, apparently about primary partition
> count. I'll try to post more details soon.

I've looked into it a bit more and discovered that the failing reason
was autopartitioning_failed, which belongs to partman-auto-lvm's
perform_recipe_by_lvm. I've therefore added some debug as can be seen in
the attached patch.

The syslog got augmented accordingly with the final line in this
excerpt (which isn't much but better than before):
| Aug  8 01:02:14 main-menu[213]: INFO: Menu item 'partman-base' selected
| Aug  8 01:02:14 anna-install: Installing partman-auto-lvm
| Aug  8 01:02:14 anna[4582]: DEBUG: resolver (cdebconf-udeb): package doesn't exist (ignored)
| Aug  8 01:02:14 anna[4582]: DEBUG: resolver (di-utils): package doesn't exist (ignored)
| Aug  8 01:02:14 anna[4582]: DEBUG: resolver (kernel-image-3.14-2-486-di): package doesn't exist (ignored)
| Aug  8 01:02:14 anna[4582]: DEBUG: resolver (core-modules-3.14-2-486-di): package doesn't exist (ignored)
| Aug  8 01:02:14 anna[4582]: DEBUG: resolver (fat-modules): package doesn't exist (ignored)
| Aug  8 01:02:14 anna[4582]: DEBUG: resolver (libdebian-installer4-udeb): package doesn't exist (ignored)
| Aug  8 01:02:14 anna[4582]: DEBUG: resolver (archdetect): package doesn't exist (ignored)
| Aug  8 01:02:14 anna[4582]: DEBUG: resolver (hw-detect): package doesn't exist (ignored)
| Aug  8 01:02:14 anna[4582]: DEBUG: retrieving lvm2-udeb 2.02.106-2
| Aug  8 01:02:15 anna[4582]: DEBUG: retrieving partman-lvm 90
| Aug  8 01:02:15 anna[4582]: DEBUG: retrieving partman-auto-lvm 53+nmu2
| Aug  8 01:02:15 anna-install: Installing partman-auto-crypto
| Aug  8 01:02:15 anna[4682]: DEBUG: resolver (cdebconf-udeb): package doesn't exist (ignored)
| Aug  8 01:02:15 anna[4682]: DEBUG: resolver (di-utils): package doesn't exist (ignored)
| Aug  8 01:02:15 anna[4682]: DEBUG: resolver (kernel-image-3.14-2-486-di): package doesn't exist (ignored)
| Aug  8 01:02:15 anna[4682]: DEBUG: resolver (core-modules-3.14-2-486-di): package doesn't exist (ignored)
| Aug  8 01:02:15 anna[4682]: DEBUG: resolver (fat-modules): package doesn't exist (ignored)
| Aug  8 01:02:15 anna[4682]: DEBUG: resolver (libdebian-installer4-udeb): package doesn't exist (ignored)
| Aug  8 01:02:15 anna[4682]: DEBUG: resolver (archdetect): package doesn't exist (ignored)
| Aug  8 01:02:15 anna[4682]: DEBUG: resolver (hw-detect): package doesn't exist (ignored)
| Aug  8 01:02:15 anna[4682]: DEBUG: retrieving partman-auto-crypto 22
| Aug  8 01:02:16 anna[4682]: DEBUG: retrieving partman-crypto 73
| Aug  8 01:02:17 kernel: [  111.532021] raid6: mmxx1     6180 MB/s
| Aug  8 01:02:18 kernel: [  111.600018] raid6: mmxx2     6640 MB/s
| Aug  8 01:02:18 kernel: [  111.668015] raid6: sse1x1    5192 MB/s
| Aug  8 01:02:18 kernel: [  111.736016] raid6: sse1x2    6531 MB/s
| Aug  8 01:02:18 kernel: [  111.804009] raid6: sse2x1   10550 MB/s
| Aug  8 01:02:18 kernel: [  111.872013] raid6: sse2x2   13226 MB/s
| Aug  8 01:02:18 kernel: [  111.872014] raid6: using algorithm sse2x2 (13226 MB/s)
| Aug  8 01:02:18 kernel: [  111.872015] raid6: using intx1 recovery algorithm
| Aug  8 01:02:18 kernel: [  111.872298] xor: measuring software checksum speed
| Aug  8 01:02:18 kernel: [  111.912008]    pIII_sse  : 16192.000 MB/sec
| Aug  8 01:02:18 kernel: [  111.952011]    prefetch64-sse: 17323.000 MB/sec
| Aug  8 01:02:18 kernel: [  111.952013] xor: using function: prefetch64-sse (17323.000 MB/sec)
| Aug  8 01:02:18 kernel: [  111.954730] bio: create slab <bio-1> at 1
| Aug  8 01:02:18 kernel: [  111.954773] Btrfs loaded
| Aug  8 01:02:18 kernel: [  111.963252] JFS: nTxBlock = 8068, nTxLock = 64548
| Aug  8 01:02:18 kernel: [  111.972423] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
| Aug  8 01:02:18 md-devices: mdadm: No arrays found in config file or automatically
| Aug  8 01:02:18 kernel: [  112.353097] device-mapper: uevent: version 1.0.3
| Aug  8 01:02:18 kernel: [  112.353275] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30) initialised: dm-devel@redhat.com
| Aug  8 01:02:18 partman:   No matching physical volumes found
| Aug  8 01:02:18 partman:   Reading all physical volumes.  This may take a while...
| Aug  8 01:02:18 partman:
| Aug  8 01:02:18 partman: No volume groups found
| Aug  8 01:02:18 partman:
| Aug  8 01:02:18 partman-lvm:
| Aug  8 01:02:18 partman-lvm: No volume groups found
| Aug  8 01:02:18 partman-lvm:
| Aug  8 01:02:28 partman-lvm:   Physical volume "/dev/sda5" successfully created
| Aug  8 01:02:28 partman-lvm:   Volume group "foobar-vg" successfully created
| Aug  8 01:02:29 kernel: [  123.231502] bio: create slab <bio-2> at 2
| Aug  8 01:02:29 partman-lvm:   Logical volume "root" created
| Aug  8 01:02:29 partman-auto-lvm-debug: free_space handling failed

[ Except for the stupid log function name and logger tag, it might be
handy to merge such a patch into partman-auto-lvm to ease further
debugging; comments welcome. ]

I'll stop here for tonight because it's already past 3am, but I guess
that something changed in parted between 3.1 and 3.2 that might have led
the partman-server thing (that the various partman-* seem to be using)
to behave differently?

Mraw,
KiBi.
From a22bd2808a29ae5865e09d5ff6c4ed5d69a51d51 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <kibi@debian.org>
Date: Fri, 8 Aug 2014 03:10:25 +0200
Subject: [PATCH] Add a log message before autopartitioning_failed calls.

---
 debian/changelog      |    7 +++++++
 perform_recipe_by_lvm |   13 +++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ca291d4..66e593e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+partman-auto-lvm (53+nmu1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Add a log message before autopartitioning_failed calls.
+
+ -- Cyril Brulebois <kibi@debian.org>  Fri, 08 Aug 2014 02:45:25 +0200
+
 partman-auto-lvm (53) unstable; urgency=medium
 
   [ Updated translations ]
diff --git a/perform_recipe_by_lvm b/perform_recipe_by_lvm
index 3380d2b..bda0a85 100755
--- a/perform_recipe_by_lvm
+++ b/perform_recipe_by_lvm
@@ -4,6 +4,10 @@
 . /lib/partman/lib/recipes.sh
 . /lib/partman/lib/lvm-base.sh
 
+kibilog() {
+	echo "$@" | logger -t partman-auto-lvm-debug
+}
+
 VG_name=$1
 recipe=$2
 
@@ -88,10 +92,10 @@ foreach_partition '
 
 	if [ "$last" = yes ]; then
 		vg_get_info "$VG_name"
-		lv_create $VG_name "$lvname" $FREEPE || autopartitioning_failed
+		lv_create $VG_name "$lvname" $FREEPE || { kibilog "lv_create (last) failed"; autopartitioning_failed; }
 	else
 		extents=$(lvm_extents_from_human $VG_name "${1}K")
-		lv_create $VG_name "$lvname" $extents || autopartitioning_failed
+		lv_create $VG_name "$lvname" $extents || { kibilog "lv_create (non-last) failed"; autopartitioning_failed; }
 	fi
 
 	# Hyphens in VG or LV names are doubled under /dev/mapper
@@ -103,7 +107,7 @@ foreach_partition '
 	dev=$DEVICES/$dirname
 
 	rm -rf $dev
-	mkdir $dev || autopartitioning_failed
+	mkdir $dev || { kibilog "mkdir dev failed"; autopartitioning_failed; }
 	printf "%s" "$device" >$dev/device
 	printf "%s" "$4" >$dev/size
 	printf "%s" "$VG_name - $lvname" >$dev/model
@@ -117,6 +121,7 @@ foreach_partition '
 	if [ "$response" = failed ]; then
 		cd /
 		rm -rf $dev
+		kibilog "failed to do the /dev dance"
 		autopartitioning_failed
 	fi
 
@@ -135,7 +140,7 @@ foreach_partition '
 	close_dialog
 
 	# create partition in the free space
-	[ "$free_space" ] || autopartitioning_failed
+	[ "$free_space" ] || { kibilog "free_space handling failed"; autopartitioning_failed; }
 	open_dialog NEW_PARTITION primary ext2 $free_space full $free_size
 	read_line num id size type fs path name
 	close_dialog
-- 
1.7.10.4

Attachment: signature.asc
Description: Digital signature


Reply to: