标题中是我运行时得到的结果:sudo mdadm——运行/dev/md0
mdadm
不久前,我在 Ubuntu 19.10 上构建并配置了 RAID 1。现在它停止工作了。我需要做什么才能恢复它?
sudo fdisk -l
...
Disk /dev/sda: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdc: 223.58 GiB, 240057409536 bytes, 468862128 sectors
Disk model: KINGSTON SH103S3
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: gpt
Disk identifier: 1E539CE0-BE56-4F34-B3D3-7BF02003458F
Device Start End Sectors Size Type
/dev/sdc1 2048 264191 262144 128M BIOS boot
/dev/sdc2 264192 452069375 451805184 215.4G EFI System
/dev/sdc3 452069376 468860927 16791552 8G Linux swap
Disk /dev/sdb: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
...
sudo mdadm--详细信息--扫描
(未返回任何内容)
sudo cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
unused devices: <none>
sudo 更新-initramfs -u
update-initramfs: Generating /boot/initrd.img-5.3.0-42-generic
W: initramfs-tools configuration sets RESUME=UUID=cfd81e4d-9eb5-443a-b27a-ff669b8185dc
W: but no matching swap device is available.
I: The initramfs will attempt to resume from /dev/sdc3
I: (UUID=30bf601b-9470-4a3a-af7c-2aedce2cb0ca)
I: Set the RESUME variable to override this.
答案1
经过进一步挖掘后,我发现了这个错误(md0 的三重条目)mdadm.conf
。
# This configuration was auto-generated on Fri, 06 Mar 2020 22:24:51 -0800 by mkconf
ARRAY /dev/md0 metadata=1.2 name=nas:0 UUID=6e49ac17:91ff6793:a755436d:56c8a49c
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 name=nas:0 UUID=6e49ac17:91ff6793:a755436d:56c8a49c
devices=/dev/sda,/dev/sdb
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 name=nas:0 UUID=6e49ac17:91ff6793:a755436d:56c8a49c
devices=/dev/sda,/dev/sdb
所以我将其修改为
# This configuration was auto-generated on Fri, 06 Mar 2020 22:24:51 -0800 by mkconf
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 name=nas:0 UUID=6e49ac17:91ff6793:a755436d:56c8a49c
devices=/dev/sda,/dev/sdb
并运行sudo update-initramfs -u
,sudo mdadm --assemble --scan
结果如下:
mdadm: /dev/md0 has been started with 2 drives.
现在我又可以开车了