我最初在 Windows 上使用 RST 设置了 RAID1 阵列(不是作为可启动磁盘)。我最近开始将所有内容移动到 xubuntu,所以我尝试了mdadm
我的 xubuntu 分区(双启动)。安装和运行mdadm --assemble --scan
工作完美无缺,我能够访问它。
当尝试在 Windows 和 xubuntu 分区上重新安装 xubuntu 时,我遇到了 UEFI 问题。我稍微弄乱了启动文件夹,但让它正常工作(通过删除 xubuntu 分区,然后删除 GRUB)。我想这可能会搞砸一些事情,因为安装 xubuntu (使用 boot/EFI + main/data + swap 分区)后,做同样的事情mdadm
不再有效。
看来还是得到了认可。它位于 BIOS 设置中的 RAID 卷列表中,并且mdadm
确实看到了它,但它卡在auto-read-only
.
$ cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md126 : active (auto-read-only) raid1 sdc[1] sdd[0]
976759808 blocks super external:/md127/0 [2/2] [UU]
md127 : inactive sdd[1](S) sdc[0](S)
5288 blocks super external:imsm
unused devices: <none>
$ sudo mdadm --examine --scan
ARRAY metadata=imsm UUID=370cc1f2:168a5119:88a48e19:b707194b
ARRAY /dev/md/RAID1 Volume container=370cc1f2:168a5119:88a48e19:b707194b member=0 UUID=5ce770a1:9402cfa0:b05fc6fc:a0c281e1
添加这些行会/etc/mdadm/mdadm.conf
产生相同的结果(即使sudo update-initramfs -u
在修改后运行mdadm.conf
)。我尝试了很多事情,包括重新命名卷以删除空格(我尝试过/dev/md/RAID1_Volume
和/dev/md0
)并仅ARRAY /dev/md0 UUID=5ce770a1:9402cfa0:b05fc6fc:a0c281e1
放入mdadm.conf
.
另外,我不确定为什么它要同时创建imsm0
和 RAID1_Volume_0
。我假设imsm0
只是一个实际体积的容器,但我不确定为什么。我也尝试过使用容器的UUID,但是不起作用。
我有点迷失了!
更新: 更多信息
$ sudo file -s /dev/md*
/dev/md: directory
/dev/md126: DOS/MBR boot sector MS-MBR Windows 7 english at offset 0x163 "Invalid partition table" at offset 0x17b "Error loading operating system" at offset 0x19a "Missing operating system", disk signature 0x1bf737e; partition 1 : ID=0xee, start-CHS (0x0,0,1), end-CHS (0x3ff,254,63), startsector 1, 1953525167 sectors
/dev/md127: empty
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 119.2G 0 disk
└─sda1 8:1 0 119.2G 0 part
sdb 8:16 0 232.9G 0 disk
├─sdb1 8:17 0 190M 0 part /boot/efi
├─sdb2 8:18 0 225.3G 0 part /
└─sdb3 8:19 0 7.5G 0 part [SWAP]
sdc 8:32 0 931.5G 0 disk
└─md126 9:126 0 931.5G 0 raid1
sdd 8:48 0 931.5G 0 disk
└─md126 9:126 0 931.5G 0 raid1
sde 8:64 0 596.2G 0 disk
└─sde1 8:65 0 596.1G 0 part
loop0 7:0 0 143.9M 1 loop /snap/slack/7
loop1 7:1 0 86.9M 1 loop /snap/core/4917
loop2 7:2 0 193.1M 1 loop /snap/acestreamplayer/7
loop3 7:3 0 162.9M 1 loop /snap/spotify/16
然后我跑了
$ sudo parted -l /dev/md*
Model: ATA SAMSUNG SSD CM87 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 128GB 128GB primary ntfs
Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 200MB 199MB fat32 boot, esp
2 200MB 242GB 242GB ext4
3 242GB 250GB 8000MB linux-swap(v1)
Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? OK
Model: ATA WDC WD10EZEX-00W (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 134MB 134MB Microsoft reserved partition msftres
2 135MB 1000GB 1000GB ntfs Basic data partition msftdata
Warning: Not all of the space available to /dev/sdd appears to be used, you can fix the GPT to use all of the space (an extra 5552 blocks) or continue with the current setting?
Fix/Ignore? Fix
Model: ATA WDC WD10EZEX-00W (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 134MB 134MB Microsoft reserved partition msftres
2 135MB 1000GB 1000GB ntfs Basic data partition msftdata
Model: ATA SAMSUNG HM641JI (scsi)
Disk /dev/sde: 640GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 32.3kB 1049kB 1016kB primary
2 1049kB 106MB 105MB primary fat16 diag
3 106MB 640GB 640GB primary ntfs
Error: Invalid argument during seek for read on /dev/md126
Retry/Ignore/Cancel? Ignore
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
OK/Cancel? Ok
Model: Linux Software RAID Array (md)
Disk /dev/md126: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
然后输出lsblk
更改为cat /proc/mdstat
:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 119.2G 0 disk
└─sda1 8:1 0 119.2G 0 part /media/chris/Secondary SSD
sdb 8:16 0 232.9G 0 disk
├─sdb1 8:17 0 190M 0 part /boot/efi
├─sdb2 8:18 0 225.3G 0 part /
└─sdb3 8:19 0 7.5G 0 part [SWAP]
sdc 8:32 0 931.5G 0 disk
├─sdc1 8:33 0 128M 0 part
├─sdc2 8:34 0 931.4G 0 part
└─md126 9:126 0 931.5G 0 raid1
sdd 8:48 0 931.5G 0 disk
├─sdd1 8:49 0 128M 0 part
├─sdd2 8:50 0 931.4G 0 part
└─md126 9:126 0 931.5G 0 raid1
sde 8:64 0 596.2G 0 disk
└─sde1 8:65 0 596.1G 0 part
loop0 7:0 0 143.9M 1 loop /snap/slack/7
loop1 7:1 0 86.9M 1 loop /snap/core/4917
loop2 7:2 0 193.1M 1 loop /snap/acestreamplayer/7
loop3 7:3 0 162.9M 1 loop /snap/spotify/16
$ cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md126 : active raid1 sdc[1] sdd[0]
976759808 blocks super external:/md127/0 [2/2] [UU]
md127 : inactive sdd[1](S) sdc[0](S)
5288 blocks super external:imsm
unused devices: <none>
所以它(auto-read-only)
消失了,我的两个驱动器分别出现在我的“设备”列表中,并带有原始名称(“RAID1 卷”)!直到现在,在重新安装 xubuntu 后,我才真正看到它们。