我有一台配备 Raid 5 的服务器,我想清除所有内容并执行 Raid 10。我尽可能地删除了 raid 5,将超级块清零,将其从 fstab 中删除等。然后我创建了 raid 10。现在,我似乎无法组装它:
$ sudo mdadm --assemble --scan --verbose /dev/md127
mdadm: looking for devices for /dev/md127
mdadm: /dev/dm-0 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/md/Pangolin:0 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdh1 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdh is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdg1 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdg is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdf1 is busy - skipping
mdadm: /dev/sdf is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sde1 is busy - skipping
mdadm: /dev/sde is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdd1 is busy - skipping
mdadm: /dev/sdd is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdc1 is busy - skipping
mdadm: /dev/sdc is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sdb1 is busy - skipping
mdadm: /dev/sdb is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sda5 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sda2 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: no RAID superblock on /dev/sda1
mdadm: /dev/sda is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
mdadm: /dev/sr0 is not one of /dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1,/dev/sdf1
我对输出有点困惑。以下是/proc/mdstat
显示它只是/dev/sda1-f1
:
$ sudo cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : active raid10 sdf1[4] sde1[3] sdd1[2] sdc1[1] sdb1[0] sdg1[5]
2929890816 blocks super 1.2 256K chunks 2 far-copies [6/6] [UUUUUU]
md0 : inactive sdh[4](S)
976631512 blocks super 1.2
我不确定我的驱动器为什么会显示为繁忙。我尝试挂载/卸载驱动器和 RAID /dev/md127
,但它们仍然显示为繁忙。因此,我尝试查看是否可以找到一个进程,但是
$ sudo lsof | grep /dev/
未能返回任何可能指向原因的信息。
答案1
我最终弄清楚了,当我创建 RAID 时,Ubuntu 创建了一个物理卷,并且如果我采用 PV 并创建一个逻辑卷并对其进行分区,那么我就可以毫无问题地挂载 LV。
用于pvdisplay
检查是否创建了新的物理卷。如果 RAID 是卷组的一部分,则使用 创建逻辑卷lvcreate -L (size) -n (name)
。照常格式化并装入分区。