我已经将 Maas 升级到 2.7,现在遇到了这个问题:
Detected holders during mdadm creation: ['md127']
An error occured handling 'mddevice0': OSError - [Errno Failed to remove holders from %s] /dev/sda2
finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring raid: mddevice0
TIMED BLOCK_META: 21.036
finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
Traceback (most recent call last):
File "/curtin/curtin/commands/main.py", line 202, in main
ret = args.func(args)
File "/curtin/curtin/log.py", line 97, in wrapper
return log_time("TIMED %s: " % msg, func, *args, **kwargs)
File "/curtin/curtin/log.py", line 79, in log_time
return func(*args, **kwargs)
File "/curtin/curtin/commands/block_meta.py", line 86, in block_meta
return meta_custom(args)
File "/curtin/curtin/commands/block_meta.py", line 1677, in meta_custom
handler(command, storage_config_dict)
File "/curtin/curtin/commands/block_meta.py", line 1157, in raid_handler
mdadm.mdadm_create(md_devname, raidlevel,
File "/curtin/curtin/block/mdadm.py", line 177, in mdadm_create
raise OSError('Failed to remove holders from %s', device)
OSError: [Errno Failed to remove holders from %s] /dev/sda2
[Errno Failed to remove holders from %s] /dev/sda2
我们在自定义 curtin 配置的存储部分进行了此项配置:
storage:
version: 1
config:
- id: {{bootdevice1}}
type: disk
ptable: gpt
path: /dev/{{bootdevice1}}
name: boot_drive_1
grub_device: 1
wipe: superblock-recursive
- id: bios_boot_partition_1
type: partition
size: 1MB
device: {{bootdevice1}}
flag: bios_grub
- id: {{bootdevice1}}2
type: partition
size: 32000000000B
device: {{bootdevice1}}
- id: {{bootdevice1}}3
type: partition
size: 20000000000B
device: {{bootdevice1}}
- id: {{bootdevice1}}4
type: partition
size: 20000000000B
device: {{bootdevice1}}
- id: {{bootdevice1}}5
type: partition
size: 20000000000B
device: {{bootdevice1}}
- id: {{bootdevice1}}6
type: partition
size: 20000000000B
device: {{bootdevice1}}
{{if node.get_bios_boot_method() == 'uefi'}}
- id: {{bootdevice1}}7
type: partition
size: 512MB
device: {{bootdevice1}}
flag: boot
- id: fs_efi_boot1
type: format
fstype: fat32
volume: {{bootdevice1}}7
{{endif}}
不应该擦除:超级块递归在尝试创建分区之前全部删除吗?
我认为问题在于旧的 md 阵列在部署之前已启动但未停止,因此无法擦除超级块,但 Maas 应该自行执行此操作还是我必须添加一些早期命令或分区阶段命令来停止它?另外,我曾使用磁盘擦除释放,但这也无济于事(好吧,我曾使用快速擦除,但仍然如此)