预置 RAID10 似乎不起作用

预置 RAID10 似乎不起作用

我有这个配置(摘录)用于我的预置

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

使用此配置,一旦尝试创建第二个阵列,我就会收到“设备或资源繁忙”的信息。我尝试过的其他配置导致出现“无法将元数据写入 /dev/sda2”之类的情况(当我使用主分区而不是扩展分区时)

答案1

我在分区过程开始之前使用 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).
d-i partman/early_command string mdadm --stop /dev/md127 && mdadm --remove /dev/md127

相关内容