我有这个configuration(节选)为我的preseed
di partman-auto/method string raid di partman-auto/disk string /dev/sda /dev/sdb /dev/sdc /dev/sdd di 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 { } \ . di 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 \ . di partman-md/confirm boolean true di partman-md/device_remove_md boolean true di partman/confirm_write_new_label boolean true di partman/choose_partition select finish di partman/confirm boolean true di mdadm/boot_degraded boolean true
使用这个configuration,当它尝试创build第二个数组时,我得到一个“设备或资源忙”。 我尝试过的其他configuration导致诸如“无法将元数据写入/ dev / sda2”(当我使用主分区而不是扩展时)
我通过在分区过程开始之前手动删除使用mdadm的Raid设备来解决这个问题。
从我的预置文件:
# 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). di partman/early_command string mdadm --stop /dev/md127 && mdadm --remove /dev/md127