Stuff…

I know I will forget.

Stuff… header image 2

mdadm and non-active devices

December 2nd, 2009 · No Comments

Wasn’t sure what the (S) meant:

# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sdb3[1] sda3[0]
240099392 blocks [2/2] [UU]

md1 : inactive sda2[0](S)
3903680 blocks

md0 : active raid1 sda1[0]
192640 blocks [2/1] [U_]

Turns out, any of the md devices that had an S next to it were not running:

# mdadm –query /dev/md1
/dev/md1: is an md device which is not active

To activate it I had to run:

# mdadm -A –run /dev/md1 /dev/sda2
mdadm: /dev/md1 has been started with 1 drive (out of 2).

Result:

# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sdb3[1] sda3[0]
240099392 blocks [2/2] [UU]

md1 : active raid1 sda2[0]
3903680 blocks [2/1] [U_]

md0 : active raid1 sda1[0]
192640 blocks [2/1] [U_]

unused devices: <none>

Then, restart the resync:

# mdadm /dev/md0 -a /dev/sdb1
mdadm: added /dev/sdb1
# cat /proc/mdstat
….
md0 : active raid1 sdb1[1] sda1[0]
192640 blocks [2/2] [UU]

# mdadm /dev/md1 -a /dev/sdb2
mdadm: added /dev/sdb2
# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
…..
md1 : active raid1 sdb2[2] sda2[0]
3903680 blocks [2/1] [U_]
[==>..................]  recovery = 11.1% (437568/3903680) finish=0.9min speed=62509K/sec

Links:

Tags: Linux · Operating System

0 responses so far ↓

  • There are no comments yet...

Leave a Comment