我在 Debian 下的 Software-Raid 突然说:
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda3[0](F) sdb3[1]
2917156159 blocks super 1.2 [2/1] [_U]
md1 : active raid1 sda2[0] sdb2[1]
524276 blocks super 1.2 [2/2] [UU]
md0 : active raid1 sda1[0] sdb1[1]
12581816 blocks super 1.2 [2/2] [UU]
但是完整的 6 小时检查确实导致硬盘驱动器功能齐全。所以硬盘没问题。
所以我做了以下事情:
mdadm /dev/md2 --remove /dev/sda3
mdadm /dev/md2 --add /dev/sda3
我认为这一直有效到 50%,但现在 RAID 说:
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda3[0](S) sdb3[1]
2917156159 blocks super 1.2 [2/1] [_U]
md1 : active raid1 sda2[0] sdb2[1]
524276 blocks super 1.2 [2/2] [UU]
md0 : active raid1 sda1[0] sdb1[1]
12581816 blocks super 1.2 [2/2] [UU]
到底出了什么问题?
编辑:Okey fdisk -l 显示以下内容(磁盘是两个完全相同的 HDD):
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
256 heads, 63 sectors/track, 363376 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 266306 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
256 heads, 63 sectors/track, 363376 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 266306 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
Disk /dev/md0: 12.9 GB, 12883779584 bytes
2 heads, 4 sectors/track, 3145454 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 536 MB, 536858624 bytes
2 heads, 4 sectors/track, 131069 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/md2: 2987.2 GB, 2987167906816 bytes
2 heads, 4 sectors/track, 729289039 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md2 doesn't contain a valid partition table
编辑2:
root@ICELAND ~ # gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 602051E0-41A7-4BD3-BEBD-0072BF1940A3
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 4096 25169919 12.0 GiB FD00
2 25169920 26218495 512.0 MiB FD00
3 26218496 5860533134 2.7 TiB FD00
4 2048 4095 1024.0 KiB EF02
root@ICELAND ~ # gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 1845979C-A245-48E6-88F7-163163A39A6B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 4096 25169919 12.0 GiB FD00
2 25169920 26218495 512.0 MiB FD00
3 26218496 5860533134 2.7 TiB FD00
4 2048 4095 1024.0 KiB EF02
root@ICELAND ~ # mdadm --detail /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Tue Oct 23 19:11:10 2012
Raid Level : raid1
Array Size : 2917156159 (2782.02 GiB 2987.17 GB)
Used Dev Size : 2917156159 (2782.02 GiB 2987.17 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Wed Sep 11 19:12:03 2013
State : active, degraded
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
Name : rescue:2
UUID : d09a5141:6abfc440:358a06e7:9445fbea
Events : 2256201
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 19 1 active sync /dev/sdb3
0 8 3 - spare /dev/sda3
root@ICELAND ~ #
这是问题所在:
备用未激活。这通常发生在设备出现故障时。
尝试以下操作:
然后检查
cat /proc/mdstat
。如果失败 - 检查您的硬盘驱动器和电缆
dmesg
、系统日志和智能数据。