Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this config (excerpt) for my preseed

d-i partman-auto/method string raid
d-i partman-auto/disk string /dev/sda /dev/sdb /dev/sdc /dev/sdd

d-i partman-auto/expert_recipe string \
    multiraid:: \
        512 10 512 raid \
            $primary{ } \
            method{ raid } \
        . \
        2000 20 3000 raid \
            method{ raid } \
        . \
        10000 30 4000000 raid \
            method { raid } \
        . \
        1000 40 1000 linux-swap \
            method { swap } \
            format { } \
        .

d-i partman-auto-raid/recipe string \
        10 4 0 ext4 /boot \
            /dev/sda1#/dev/sdb1#/dev/sdc1#/dev/sdd1 \
        . \
        10 4 0 ext4 /   \
            /dev/sda5#/dev/sdb5#/dev/sdc5#/dev/sdd5 \
        . \
        10 4 0 ext4 /var/lib/vz \
            /dev/sda7#/dev/sdb7#/dev/sdc7#/dev/sdd7 \
        .

d-i partman-md/confirm boolean true
d-i partman-md/device_remove_md boolean true

d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true

d-i mdadm/boot_degraded boolean true

With this config I get a "device or resource busy" as soon as it tries to create the second array. Other configs I tried have resulted in things like "Failed to write metadata to /dev/sda2" (when I use primary partitions instead of extended)

share|improve this question

1 Answer 1

I fixed this by manually deleting the Raid devices using mdadm before the partitioning process begins.

From my preseed file:

# This command is run immediately before the partitioner starts. It may be
# useful to apply dynamic partitioner preseeding that depends on the state
# of the disks (which may not be visible when preseed/early_command runs).
d-i partman/early_command string mdadm --stop /dev/md127 && mdadm --remove /dev/md127
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.