![RAID1 未找到合适的驱动器](https://linux22.com/image/178431/RAID1%20%E6%9C%AA%E6%89%BE%E5%88%B0%E5%90%88%E9%80%82%E7%9A%84%E9%A9%B1%E5%8A%A8%E5%99%A8.png)
我有一台 Synology NAS,其中 2 个磁盘配置为 RAID1。不知何故,RAID 阵列变得混乱。
我将 2 个磁盘插入我的台式计算机以调查发生了什么:
# mdadm --examine /dev/sda5
/dev/sda5:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 40c15541:61481857:5a3fdf04:765977cb
Name : DiskStation:2
Creation Time : Sat Jul 13 09:54:06 2013
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 5851063680 (2790.00 GiB 2995.74 GB)
Array Size : 2925531648 (2790.00 GiB 2995.74 GB)
Used Dev Size : 5851063296 (2790.00 GiB 2995.74 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
Unused Space : before=1968 sectors, after=384 sectors
State : clean
Device UUID : 90c7ae42:472940bf:72e32970:97629479
Update Time : Mon Aug 10 15:57:32 2020
Checksum : 81d9d2fc - correct
Events : 2520428
Device Role : spare
Array State : .. ('A' == active, '.' == missing, 'R' == replacing)
# mdadm --examine /dev/sdb5
/dev/sdb5:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 40c15541:61481857:5a3fdf04:765977cb
Name : DiskStation:2
Creation Time : Sat Jul 13 09:54:06 2013
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 5851063680 (2790.00 GiB 2995.74 GB)
Array Size : 2925531648 (2790.00 GiB 2995.74 GB)
Used Dev Size : 5851063296 (2790.00 GiB 2995.74 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
Unused Space : before=1968 sectors, after=384 sectors
State : clean
Device UUID : 5636b0cc:49a4b1a7:a45d99a5:61f45c5a
Update Time : Mon Aug 10 15:49:07 2020
Checksum : 8a86c7af - correct
Events : 2520660
Device Role : Active device 32768
Array State : .. ('A' == active, '.' == missing, 'R' == replacing)
# mdadm --examine --scan
ARRAY /dev/md/2 metadata=1.2 UUID=40c15541:61481857:5a3fdf04:765977cb name=DiskStation:2
spares=1
如果有帮助的话:
# blkid
/dev/sda5: UUID="40c15541-6148-1857-5a3f-df04765977cb" UUID_SUB="90c7ae42-4729-40bf-72e3-297097629479" LABEL="DiskStation:2" TYPE="linux_raid_member" PARTUUID="7400fe20-3ab4-4859-aec1-798032c26554"
/dev/sdb5: UUID="40c15541-6148-1857-5a3f-df04765977cb" UUID_SUB="5636b0cc-49a4-b1a7-a45d-99a561f45c5a" LABEL="DiskStation:2" TYPE="linux_raid_member" PARTUUID="9e3fee94-5c3c-4946-a5da-fc689f3a1f7e"
[...]
当我尝试组装数组时:
# mdadm --assemble -f -v /dev/md2 /dev/sda5 /dev/sdb5
mdadm: looking for devices for /dev/md2
mdadm: /dev/sda5 is identified as a member of /dev/md2, slot -1.
mdadm: /dev/sdb5 is identified as a member of /dev/md2, slot 32768.
mdadm: No suitable drives found for /dev/md2
# mdadm --detail /dev/md2
/dev/md2:
Version : 1.2
Raid Level : raid0
Total Devices : 2
Persistence : Superblock is persistent
State : inactive
Working Devices : 2
Name : DiskStation:2
UUID : 40c15541:61481857:5a3fdf04:765977cb
Events : 2520660
Number Major Minor RaidDevice
- 8 21 - /dev/sdb5
- 8 5 - /dev/sda5
我还尝试仅用一张磁盘组装阵列:
# mdadm --assemble -f -v /dev/md2 /dev/sda5
mdadm: looking for devices for /dev/md2
mdadm: /dev/sda5 is identified as a member of /dev/md2, slot -1.
mdadm: no uptodate device for slot 0 of /dev/md2
mdadm: no uptodate device for slot 1 of /dev/md2
mdadm: added /dev/sda5 to /dev/md2 as -1
mdadm: /dev/md2 assembled from 0 drives and 1 spare - not enough to start the array
我不是 RAID 专家,但这些插槽-1和32768看起来不对。
这可能是问题的原因吗?如何修复它?
ps:为了简单起见,我省略了磁盘上存在的另一个具有完全相同问题的阵列 /dev/md3
答案1
仅使用 sda5 启动 md2,然后添加 sdb5。