RAID1 with spare preseed error

Bug #1006805 reported by Mentler Gyula
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
preseed (Ubuntu)
New
Undecided
Unassigned

Bug Description

If I try to preseed a RAID with spare I receive an error:
mdadm: You have lister more devices (4) than in the array (3)!

The relevant part of the pressed file contains:
d-i partman-auto-raid/recipe string \
        1 2 1 ext4 / \
                /dev/sda1#/dev/sdb1#/dev/sde1 \
                .

If I do not specify spare there is no error.
d-i partman-auto-raid/recipe string \
        1 2 0 ext4 / \
                /dev/sda1#/dev/sdb1 \
                .

Revision history for this message
Stan A. (mozy) wrote :

I came across this while also trying to set up a 2-drive RAID1 with a spare. Weird that this has been opened this long.

I looked through documentation as well as partman source (learned spares is 7th argument) and realized this is not a bug, just wrong syntax on your part. The spare has to be put in its own separate list, so just add a space instead of a # for your last drive/spare device(s) thereby separating it from the devices meant for the array, e.g.:

'''
1 2 1 ext4 / /dev/sda1#/dev/sdb1 /dev/sde1
'''

From the Partman Wiki:
<raidtype> <devcount> <sparecount> <fstype> <mountpoint> <devices> <sparedevices>

Hope this helps whoever googles this next time.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.