Ubuntu

如何檢查我的伺服器是否有 RAID-1?

  • February 12, 2016

使用lsblk命令我得到:

NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0 232.9G  0 disk
├─sda1    8:1    0    32G  0 part
│ └─md0   9:0    0    32G  0 raid1 [SWAP]
├─sda2    8:2    0   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1 /boot
└─sda3    8:3    0 200.4G  0 part
 └─md2   9:2    0 200.3G  0 raid1 /
sdb       8:16   0 232.9G  0 disk
├─sdb1    8:17   0    32G  0 part
│ └─md0   9:0    0    32G  0 raid1 [SWAP]
├─sdb2    8:18   0   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1 /boot
└─sdb3    8:19   0 200.4G  0 part
 └─md2   9:2    0 200.3G  0 raid1 /

隨著cat /proc/mdstat得到:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda3[0] sdb3[1]
     209984640 blocks super 1.2 [2/2] [UU]
     bitmap: 2/2 pages [8KB], 65536KB chunk

md0 : active raid1 sda1[0] sdb1[1]
     33521664 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sdb2[1] sda2[0]
     523712 blocks super 1.2 [2/2] [UU]

unused devices: <none>

/proc/mdstat輸出很清楚:您正在使用RAID1。更準確地說,您有三個軟體 RAID1 陣列。

引用自:https://serverfault.com/questions/755821