Hotplug
From Linux Raid Wiki
(Difference between revisions)
(→mdadm versions < 3.1.2) |
(→mdadm versions < 3.1.2) |
||
Line 4: | Line 4: | ||
=mdadm versions < 3.1.2= | =mdadm versions < 3.1.2= | ||
− | Let's have md0 RAID1 composed of /dev/sda1 and /dev/sdb1 | + | Let's have md0 RAID1 composed of /dev/sda1 and /dev/sdb1 and md1 composed of /dev/sda2 and /dev/sdb2 |
If we hot-unplugged the disk /dev/sda, the /proc/mdstat would show: | If we hot-unplugged the disk /dev/sda, the /proc/mdstat would show: | ||
Line 11: | Line 11: | ||
Personalities : [raid1] | Personalities : [raid1] | ||
md0 : active raid1 sda1'''[2](F)''' sdb1[1] | md0 : active raid1 sda1'''[2](F)''' sdb1[1] | ||
− | + | 3903680 blocks [2/1] [_U] | |
− | + | ||
+ | md1 : active raid1 sda2[0] sdb2[1] | ||
+ | 224612672 blocks [2/2] [UU] | ||
We see that sda1 has role '''[2]'''. Since RAID1 needs only 2 components - [0] and [1], the [2] means "Spare disk". And it is '''(F)'''ailed. | We see that sda1 has role '''[2]'''. Since RAID1 needs only 2 components - [0] and [1], the [2] means "Spare disk". And it is '''(F)'''ailed. |
Revision as of 07:12, 15 April 2010
HW issues of the disk hotplugging are described in the Hotswap chapter of theHardware issues page.
The Linux RAID supports hotplug operations fully from Hot-unplug branch of the mdadm version 3.1.2.
mdadm versions < 3.1.2
Let's have md0 RAID1 composed of /dev/sda1 and /dev/sdb1 and md1 composed of /dev/sda2 and /dev/sdb2
If we hot-unplugged the disk /dev/sda, the /proc/mdstat would show:
# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sda1[2](F) sdb1[1] 3903680 blocks [2/1] [_U]
md1 : active raid1 sda2[0] sdb2[1] 224612672 blocks [2/2] [UU]
We see that sda1 has role [2]. Since RAID1 needs only 2 components - [0] and [1], the [2] means "Spare disk". And it is (F)ailed.
What we can do is remove the failed disk:
# mdadm /dev/md3 --fail detached --remove detached mdadm: hot removed 8:1
mdadm versions > 3.1.2
(to be finished)