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

Bug#497110: boot loader installation failed when dmraid=true



Frans Pop ha scritto:

> Best thing is probably to add a small helper function to check for 
> multipath:
> 
> is_dm_multipath() {
> 	dmtype=$(dm_table $device)
> 	[ "$dmtype" = multipath ] || return 1
> }
> 
> and do the following:
> 		device=$(cat $dev/device)
> 
> 		# Skip software RAID (mdadm) devices (/dev/md/X and /dev/mdX)
> 		$(echo "$device" | grep -Eq "/dev/md/?[0-9]*$") && continue
> 
> 		# Skip device mapper devices (/dev/mapper/)
> 		if echo $device | grep -q "^/dev/mapper/"; then
> 			# Except for dmraid or multipath devices
> 			if [ -f "$dev/sataraid" ] || is_dm_multipath; then
> 				:
> 			else
> 				continue
> 			fi
> 		fi
> 

Ok, attached new debdiff


>>>> partman-base
>>> This needs a comment in the code and the grep needs '-q'.
>> Done.
> 
> Eh, I do not see any changes in the attached patch...

Ehm sorry, attacked again.


> IMO as the support for bootloader installation is still a huge hack. Or 

Yes, we have the root (dmraid_device) issue.

> does Ubuntu have a patch for that as well?

This should be a grub-installer bug, I'm looking at Ubuntu grub-installer, but I
didn't find the fix.


> 
> If it can be dropped, then the following in hw-detect.sh is no longer 
> needed and the surrounding code will need to be changed accordingly:
>         if anna-install partman-dmraid; then
> 
> We should at least test without the partman-dmraid udeb being loaded 
> before we can decide on this.
> 

Yes, I agree.


Giuseppe.
diff -Nru partman-auto-81/debian/changelog partman-auto-81+nmu1/debian/changelog
--- partman-auto-81/debian/changelog	2008-08-25 21:04:47.000000000 +0200
+++ partman-auto-81+nmu1/debian/changelog	2008-09-06 18:24:23.000000000 +0200
@@ -1,3 +1,11 @@
+partman-auto (81+nmu1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * lib/auto-shared.sh: Consider device-mapper devices/dmraid arrays with the
+    sataraid flag set as usable for automatic partitioning.
+
+ -- Giuseppe Iuculano <giuseppe@iuculano.it>  Sat, 06 Sep 2008 18:23:55 +0200
+
 partman-auto (81) unstable; urgency=low
 
   [ Jérémy Bobbio ]
diff -Nru partman-auto-81/lib/auto-shared.sh partman-auto-81+nmu1/lib/auto-shared.sh
--- partman-auto-81/lib/auto-shared.sh	2008-08-25 21:01:13.000000000 +0200
+++ partman-auto-81+nmu1/lib/auto-shared.sh	2008-09-06 22:22:36.000000000 +0200
@@ -196,19 +196,30 @@
 	free_space=$(partition_after $id)'
 }
 
+is_dm_multipath() {
+	dmtype=$(dm_table $device)
+	[ "$dmtype" = multipath ] || return 1
+}
+
 get_auto_disks() {
 	local dev device dmtype
 
 	for dev in $DEVICES/*; do
 		[ -d "$dev" ] || continue
 
-		# Skip /dev/mapper/X (except multipath) devices and
-		# RAID (/dev/md/X and /dev/mdX) devices
 		device=$(cat $dev/device)
+		
+		# Skip software RAID (mdadm) devices (/dev/md/X and /dev/mdX)
 		$(echo "$device" | grep -Eq "/dev/md/?[0-9]*$") && continue
+
+		# Skip device mapper devices (/dev/mapper/)
 		if echo $device | grep -q "^/dev/mapper/"; then
-			dmtype=$(dm_table $device)
-			[ "$dmtype" = multipath ] || continue
+			# Except for dmraid or multipath devices
+			if [ -f "$dev/sataraid" ] || is_dm_multipath; then
+				:
+			else
+				continue
+			fi
 		fi
 		printf "$dev\t$(device_name $dev)\n"
 	done
diff -Nru partman-base-125/debian/changelog partman-base-125+nmu1/debian/changelog
--- partman-base-125/debian/changelog	2008-08-25 21:09:58.000000000 +0200
+++ partman-base-125+nmu1/debian/changelog	2008-09-06 16:56:57.000000000 +0200
@@ -1,3 +1,10 @@
+partman-base (125+nmu1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * init.d/parted: Set the sataraid flag for dmraid arrays.
+
+ -- Giuseppe Iuculano <giuseppe@iuculano.it>  Sat, 06 Sep 2008 16:56:09 +0200
+
 partman-base (125) unstable; urgency=low
 
   [ Jérémy Bobbio ]
diff -Nru partman-base-125/init.d/parted partman-base-125+nmu1/init.d/parted
--- partman-base-125/init.d/parted	2008-08-10 08:43:40.000000000 +0200
+++ partman-base-125+nmu1/init.d/parted	2008-09-06 21:02:43.000000000 +0200
@@ -108,6 +108,14 @@
 		printf "%s" "$size" >$dev/size
 		printf "%s" "$model" >$dev/model
 
+		# Set the sataraid flag for dmraid arrays.
+		if type dmraid >/dev/null 2>&1; then
+			if dmraid -sa -c | grep -q $(basename $device); then
+				>$dev/sataraid
+			fi
+		fi
+
+
 		cd $dev
 		open_dialog OPEN "$(cat $dev/device)"
 		read_line response

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: