Bug#498784: mdcfg hangs when there is no partition for spare device
Package: mdcfg
Version: 1.27
Severity: serious
I chose 1 partition (sda2) for RAID in partman and entered the RAID
config tool. I then chose RAID1 with 1 active partition and 1 spare
partition. I got a prompt asking which partition to use for the
active one and chose sda2. Then mdcfg hangs. Looking at the code, it
does (lines 329-331):
db_subst mdcfg/raidsparedevs PARTITIONS "$PARTITIONS"
db_input critical mdcfg/raidsparedevs
db_go
$PARTITIONS is empty in my case and apparently debconf doesn't like an
empty variable for Choices and hangs.
There is a check whethere there are enough partitions available but
this is not run if the RAID level is 1:
REQUIRED=$(($DEV_COUNT + $SPARE_COUNT))
if [ $LEVEL -ne 1 ]; then
if [ $REQUIRED -gt $NUM_PART ]; then
db_subst mdcfg/notenoughparts NUM_PART "$NUM_PART"
Any idea why this check is not run for RAID level 1?
--
Martin Michlmayr
http://www.cyrius.com/
Reply to: