您好,我正在尝试从磁盘 /dev/sdc /dev/sdd 创建 raid lv1。在快捷方式中我收到错误
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1
device /dev/sdc1 not suitable for any style of array
但在您向我发送其他类似主题的链接之前,请允许我解释一下我的问题。
fdisk -l
Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd91338b1
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 1953525167 1953523120 931.5G 5 Extended
Disk /dev/sdd: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1ed528e0
Device Boot Start End Sectors Size Id Type
/dev/sdd1 2048 1953525167 1953523120 931.5G 5 Extended
mdadm --assemble --scan --verbose
mdadm: looking for devices for further assembly
mdadm: no recogniseable superblock on /dev/sda6
mdadm: no recogniseable superblock on /dev/sda5
mdadm: Cannot assemble mbr metadata on /dev/sda2
mdadm: no recogniseable superblock on /dev/sda1
mdadm: Cannot assemble mbr metadata on /dev/sda
mdadm: Cannot assemble mbr metadata on /dev/sdd1
mdadm: Cannot assemble mbr metadata on /dev/sdd
mdadm: Cannot assemble mbr metadata on /dev/sdc1
mdadm: Cannot assemble mbr metadata on /dev/sdc
mdadm: Cannot assemble mbr metadata on /dev/sdb2
mdadm: Cannot assemble mbr metadata on /dev/sdb1
mdadm: Cannot assemble mbr metadata on /dev/sdb
mdadm: cannot open device /dev/sr0: No medium found
mdadm: no recogniseable superblock on /dev/ram15
...
mdadm: no recogniseable superblock on /dev/ram0
mdadm: No arrays found in config file or automatically
root@..:/# mount | grep sdc
root@..:/# mount | grep sdd
因此,我没有在任何地方安装我的磁盘,我还检查了没有其他 raid 安装:
root@...:/# mdadm --zero-superblock /dev/sdd1
mdadm: Unrecognised md component device - /dev/sdd1
root@...:/# mdadm --zero-superblock /dev/sdc1
mdadm: Unrecognised md component device - /dev/sdc1
所以现在我不知道该检查什么来诊断我的配置出了什么问题。我也重启了几次机器,也试过了 liveCD,所以现在我没主意了
答案1
答案是在创建分区期间我选择默认的扩展,为了强制 madm 工作,两个分区都必须是“Linux raid 自动检测”类型(fdisk 类型 fd)。
希望它能帮助有类似问题的人