On Thu, 11 Feb 2010, vincent.mcint...@csiro.au wrote:
The options for resolving it (so lenny-via-squeeze works) seem to be:
- add a debconf configuration item to specify the metadata version
I started a patch but I have absolutely no idea what I'm doing.
The attached is just an attempt to clarify what I am suggesting.
Cheers
Vince
Index: trunk/packages/partman/partman-auto-raid/debian/partman-auto-raid.templates
===================================================================
--- trunk/packages/partman/partman-auto-raid/debian/partman-auto-raid.templates (revision 62177)
+++ trunk/packages/partman/partman-auto-raid/debian/partman-auto-raid.templates (working copy)
@@ -22,3 +22,13 @@
_Description: Not enough RAID partitions specified
There are not enough RAID partitions specified for your preseeded
configuration. You need at least 3 devices for a RAID5 array.
+
+Template: partman-auto-raid/superblock_type
+Type: select
+Choices-C: ${CHOICES}
+Choices: ${DESCRIPTIONS}
+# :sl1:
+Description: for internal use; can be preseeded
+ Metadata version for superblock of RAID devices
+ .
+ The default is 1.1
Index: trunk/packages/partman/partman-auto-raid/auto-raidcfg
===================================================================
--- trunk/packages/partman/partman-auto-raid/auto-raidcfg (revision 62177)
+++ trunk/packages/partman/partman-auto-raid/auto-raidcfg (working copy)
@@ -74,6 +74,16 @@
MDADM_PARAMS="$RAID_DEVICES"
fi
+ # Check for nondefault version of RAID superblock metatadata
+ db_get partman-auto-raid/superblock_type
+ if [ -z "$RET" ]; then
+ :
+ else
+ MD_SB_TYPE="$RET"
+ MDADM_PARAMS="$MDADM_PARAMS --metadata=$MD_SB_TYPE"
+ logger -t partman-auto-raid "Setting superblock metadata version to $MD_SB_TYPE"
+ fi
+
if ! log-output -t partman-auto-raid \
mdadm --create /dev/md$MD_NUM --auto=yes --force -R -l raid$RAID_TYPE \
-n $DEV_COUNT $MDADM_PARAMS