Strony

wtorek, 23 września 2008

re-add disk to mdadm array

Sometimes you can meet the situation when you lost a drive by accident from your mdadm configuration, as you can see below, two of my arrays has lost a drive:

# cat /proc/mdstat
Personalities : [raid1] [raid0]
md3 : active raid1 sdc2[0] hde2[1]
195358336 blocks [2/2] [UU]

md2 : active raid0 sdc1[0] hde1[1]
97675008 blocks 64k chunks

md1 : active raid1 sda1[0]
104320 blocks [2/1] [U_]


md6 : active raid1 sdb4[1] sda4[0]
958084352 blocks [2/2] [UU]

md0 : active raid1 sda3[0]
14659200 blocks [2/1] [U_]



to re-add it to array just:
# mdadm /dev/md1 -a /dev/sdb1
mdadm: re-added /dev/sdb1
# mdadm /dev/md0 -a /dev/sdb3
mdadm: re-added /dev/sdb3


now - my array is alive and kicking again :)
# cat /proc/mdstat
Personalities : [raid1] [raid0]
md3 : active raid1 sdc2[0] hde2[1]
195358336 blocks [2/2] [UU]

md2 : active raid0 sdc1[0] hde1[1]
97675008 blocks 64k chunks

md1 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

md6 : active raid1 sdb4[1] sda4[0]
958084352 blocks [2/2] [UU]

md0 : active raid1 sdb3[2] sda3[0]
14659200 blocks [2/1] [U_]
[>....................] recovery = 1.8% (272128/14659200) finish=2.6min speed=90709K/sec

unused devices:

0 komentarze: