Mdadm
我的 mdadm RAID1 是否正在執行?
抱歉這個愚蠢的問題,但我真的很困惑。
我的 RAID1 是否正在執行且狀況良好?
lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster root@trekto:~# uname -a Linux trekto 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux
service mdadm status ● mdadm.service Loaded: masked (Reason: Unit mdadm.service is masked.) Active: inactive (dead)
看起來沒有執行但是:
lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 74.5G 0 disk ├─sda1 8:1 0 953M 0 part │ └─md0 9:0 0 952M 0 raid1 /boot ├─sda2 8:2 0 11.2G 0 part │ └─md1 9:1 0 11.2G 0 raid1 [SWAP] └─sda3 8:3 0 62.4G 0 part └─md2 9:2 0 62.4G 0 raid1 / sdb 8:16 0 74.5G 0 disk ├─sdb1 8:17 0 953M 0 part │ └─md0 9:0 0 952M 0 raid1 /boot ├─sdb2 8:18 0 11.2G 0 part │ └─md1 9:1 0 11.2G 0 raid1 [SWAP] └─sdb3 8:19 0 62.4G 0 part └─md2 9:2 0 62.4G 0 raid1 /
cat /proc/mdstat Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sdb1[0] sda1[2] 974848 blocks super 1.2 [2/2] [UU] md2 : active raid1 sdb3[0] sda3[2] 65421312 blocks super 1.2 [2/2] [UU] md1 : active (auto-read-only) raid1 sdb2[0] sda2[1] 11709440 blocks super 1.2 [2/2] [UU] unused devices: <none>
mdadm --detail /dev/md* mdadm: /dev/md does not appear to be an md device /dev/md0: Version : 1.2 Creation Time : Sat May 9 22:34:20 2020 Raid Level : raid1 Array Size : 974848 (952.00 MiB 998.24 MB) Used Dev Size : 974848 (952.00 MiB 998.24 MB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Update Time : Fri May 22 21:28:57 2020 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Consistency Policy : resync Name : trekto:0 (local to host trekto) UUID : 1fb0b10f:68dd1abe:07ace5bf:ce797ed8 Events : 281 Number Major Minor RaidDevice State 0 8 17 0 active sync /dev/sdb1 2 8 1 1 active sync /dev/sda1 /dev/md1: Version : 1.2 Creation Time : Sat May 9 22:34:39 2020 Raid Level : raid1 Array Size : 11709440 (11.17 GiB 11.99 GB) Used Dev Size : 11709440 (11.17 GiB 11.99 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Update Time : Sat May 9 23:33:57 2020 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Consistency Policy : resync Name : trekto:1 (local to host trekto) UUID : cbdd415f:20b34ad6:1fe7991d:cb2c78e1 Events : 34 Number Major Minor RaidDevice State 0 8 18 0 active sync /dev/sdb2 1 8 2 1 active sync /dev/sda2 /dev/md2: Version : 1.2 Creation Time : Sat May 9 22:34:47 2020 Raid Level : raid1 Array Size : 65421312 (62.39 GiB 66.99 GB) Used Dev Size : 65421312 (62.39 GiB 66.99 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Update Time : Fri May 22 21:46:07 2020 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Consistency Policy : resync Name : trekto:2 (local to host trekto) UUID : d8bda655:d94cf675:5af758eb:f6d3a91b Events : 3199 Number Major Minor RaidDevice State 0 8 19 0 active sync /dev/sdb3 2 8 3 1 active sync /dev/sda3
是的,mdadm 正在執行並顯示健康狀況良好。
可能不起作用的是監視發送失敗通知的執行狀況的守護程序。