我有三个驱动器sda
、sdb
和sdc
:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2.7T 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 500M 0 part
├─sda3 8:3 0 97.7G 0 part /
└─sda4 8:4 0 2.5T 0 part
sdb 8:16 0 2.7T 0 disk
├─sdb1 8:17 0 1M 0 part
├─sdb2 8:18 0 500M 0 part /boot
├─sdb3 8:19 0 97.7G 0 part
└─sdb4 8:20 0 2.5T 0 part
sdc 8:32 0 2.7T 0 disk /home
前两个我尝试使用以下命令将其组装成 RAID 1 阵列:
mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sda /dev/sdb -e 1.0
使用 1.0 规范并(据说)在磁盘末尾写入超级块。但是,当我从 LiveUSB 密钥执行此操作并重新启动到 时sda
,阵列消失了。实际上,如果我重新启动到 LiveUSB 密钥,该阵列也不存在,并mdadm --assemble --scan -v
产生:
$ sudo mdadm --assemble --scan -v
mdadm: looking for devices for /dev/md0
mdadm: no RAID superblock on /dev/sdd2
mdadm: no RAID superblock on /dev/sdd1
mdadm: no RAID superblock on /dev/sdd
mdadm: no RAID superblock on /dev/sdc
mdadm: no RAID superblock on /dev/sdb4
mdadm: no RAID superblock on /dev/sdb3
mdadm: no RAID superblock on /dev/sdb2
mdadm: no RAID superblock on /dev/sdb1
mdadm: no RAID superblock on /dev/sdb
mdadm: no RAID superblock on /dev/sda4
mdadm: no RAID superblock on /dev/sda3
mdadm: no RAID superblock on /dev/sda2
mdadm: no RAID superblock on /dev/sda1
mdadm: no RAID superblock on /dev/sda
mdadm: cannot open device /dev/sr0: No medium found
但我刚刚写了超级块!我什至等了一夜才让阵列自行组装。现在就像我从未运行过 --create 一样。我还读过Linux RAID 维基,这表明我应该在创建命令之后保存(在 Fedora 上),这是我从 LiveUSB 中/etc/mdadm.conf
执行的,该命令生成:mdadm --detail --scan > /mnt/etc/mdadm.conf
$ cat /etc/mdadm.conf
ARRAY /dev/md0 metadata=1.0 name=manjaro:0 UUID=18fc0efb:50eb619e:621e8eee:8d1cd68d
是什么赋予了?为什么 create 实际上没有创建任何东西?我是否缺少一些命令选项?如果你们需要我提供更多信息,请随时在评论中询问命令的输出:)!
感谢您的时间和投入!
更新1
$ sudo parted /dev/sda unit s print free
[sudo] password for rivanov:
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
OK/Cancel? ok
Model: ATA WDC WD3003FZEX-0 (scsi)
Disk /dev/sda: 5860533168s
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
34s 2047s 2014s Free Space
1 2048s 4095s 2048s bios_grub
2 4096s 1028095s 1024000s ext4 raid
3 1028096s 205828095s 204800000s ext4 raid
4 205828096s 5530423295s 5324595200s ext4 raid
5530423296s 5860533134s 330109839s Free Space
$ sudo mdadm --examine /dev/sda /dev/sdb
/dev/sda:
MBR Magic : aa55
Partition[0] : 4294967295 sectors at 1 (type ee)
/dev/sdb:
MBR Magic : aa55
Partition[0] : 4294967295 sectors at 1 (type ee)