![소프트웨어 RAID가 실행 중이거나 올바르게 설정되었는지 어떻게 알 수 있나요?](https://linux55.com/image/37175/%EC%86%8C%ED%94%84%ED%8A%B8%EC%9B%A8%EC%96%B4%20RAID%EA%B0%80%20%EC%8B%A4%ED%96%89%20%EC%A4%91%EC%9D%B4%EA%B1%B0%EB%82%98%20%EC%98%AC%EB%B0%94%EB%A5%B4%EA%B2%8C%20%EC%84%A4%EC%A0%95%EB%90%98%EC%97%88%EB%8A%94%EC%A7%80%20%EC%96%B4%EB%96%BB%EA%B2%8C%20%EC%95%8C%20%EC%88%98%20%EC%9E%88%EB%82%98%EC%9A%94%3F.png)
이것이 내가 뽑은 것입니다:
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가 얼마나 비정상인지, 어떤 구성원(드라이브)에 결함이 있거나 실패했는지 보여줍니다.