这是我拉的:
mdadm --monitor --scan -f --pid-file=/var/run/mdadm/mdadm.pid
cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda1[0] sdb1[1]
262080 blocks super 1.0 [2/2] [UU]
md1 : active raid1 sdb2[1] sda2[0]
8187840 blocks super 1.1 [2/2] [UU]
md2 : active raid1 sdb3[1] sda3[0]
479800128 blocks super 1.1 [2/2] [UU]
bitmap: 3/4 pages [12KB], 65536KB chunk
unused devices: <none>
fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00075973
Device Boot Start End Blocks Id System
/dev/sda1 * 1 33 262144 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2 33 1053 8192000 fd Linux raid autodetect
/dev/sda3 1053 60802 479931392 fd Linux raid autodetect
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00038574
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 33 262144 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sdb2 33 1053 8192000 fd Linux raid autodetect
/dev/sdb3 1053 60802 479931392 fd Linux raid autodetect
Disk /dev/md2: 491.3 GB, 491315331072 bytes
2 heads, 4 sectors/track, 119950032 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: 8384 MB, 8384348160 bytes
2 heads, 4 sectors/track, 2046960 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: 268 MB, 268369920 bytes
2 heads, 4 sectors/track, 65520 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
我正确地相信所有分区都已正确镜像,对吗?有没有办法检查每个单独的驱动器以确保?
答案1
我用来确定 RAID 运行状况的两种方法如下。
/proc/mdstat
$ cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
976759936 blocks [2/2] [UU]
mdadm --详细信息
$ mdadm --detail /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Sat Jan 26 09:14:11 2008
Raid Level : raid1
Array Size : 976759936 (931.51 GiB 1000.20 GB)
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Mon May 26 13:05:25 2014
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : 37a3bfcb:41393031:23c133e6:3b879f08
Events : 0.2182840
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
如果您的 RAID 存在任何问题,这些命令将显示 RAID 运行状况不佳以及哪些成员(驱动器)出现故障或已发生故障。