Skip to content

hot-replace support for RAID1 and RAID10

NeilBrown linux-raid 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17md/raid10: prepare data structures for handling replacement.drivers/md/raid10.c drivers/md/raid10.h+78 -310 replies
2/17md/raid10: change read_balance to return an rdevdrivers/md/raid10.c+13 -140 replies
3/17md/raid10: preferentially read from replacement device if possible.drivers/md/raid10.c+23 -130 replies
4/17md/raid10: allow removal of failed replacement devices.drivers/md/raid10.c+32 -250 replies
5/17md/raid10: writes should get directed to replacement as well as original.drivers/md/raid10.c+74 -90 replies
6/17md/raid10: Handle replacement devices during resync.drivers/md/raid10.c+98 -70 replies
7/17md/raid10: handle recovery of replacement devices.drivers/md/raid10.c+70 -280 replies
8/17md/raid10: Allow replacement device to be replace old drive.drivers/md/raid10.c+61 -110 replies
9/17md/raid10: recognise replacements when assembling array.drivers/md/raid10.c+17 -00 replies
10/17md/raid10: If there is a spare and a replaceable device, start replacement.drivers/md/raid10.c+36 -40 replies
11/17md/raid1: Replace use of mddev->raid_disks with conf->raid_disks.drivers/md/raid1.c+4 -30 replies
12/17md/raid1: Allocate spare to store replacement devices and their bios.drivers/md/raid1.c drivers/md/raid1.h+36 -290 replies
13/17md/raid1: Allow a failed replacement device to be removed.drivers/md/raid1.c+6 -00 replies
14/17md/raid1: handle activation of replacement device when recovery completes.drivers/md/raid1.c+33 -30 replies
15/17md/raid1: recognise replacements when assembling arrays.drivers/md/raid1.c+23 -20 replies
16/17md/raid1: If there is a spare and a replaceable device, start replacement.drivers/md/raid1.c+15 -20 replies
17/17md/raid1: Mark device replaceable when we see a write error.drivers/md/raid1.c+15 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [md PATCH 00/17] hot-replace support for RAID1 and RAID10

Last week I posted code to support hot-replace for RAID4/5/6.

Here now is similar code for RAID1 and RAID10.

I wasn't originally going to support RAID1, but during development I realised that it does make sense. Even though you can do the equivalent manually (increase the number of devices in the array, add the replacement, wait for rebuild, fail and remove the old device..) :

1/ it make it a lot easier for people if the same mechanism is used
for all RAID levels, and
2/ This needs to be triggered automatically when the kernel detects a
write error and records it in a bad-block-log.

So I did do RAID1 in the end. As you can imagine the changes are much smaller.

All of this is in my md-devel branch:

git://neil.brown.name/md md-devel

together with the RAID4/5/6 code which has been revised a bit since I posted it.

As mentioned previously, mdadm doesn't understand this at all yet. It experiment, follow the same guidelines as in the RAID4/5/6 announcement.
I plan to spend the next few weeks doing some development on mdadm, including proper support for bad-block-logs and hot-replace.

Test, review, questions: always welcome.

Thanks,
NeilBrown

---

NeilBrown (17):
md/raid1: Mark device replaceable when we see a write error. md/raid1: If there is a spare and a replaceable device, start replacement. md/raid1: recognise replacements when assembling arrays. md/raid1: handle activation of replacement device when recovery completes. md/raid1: Allow a failed replacement device to be removed. md/raid1: Allocate spare to store replacement devices and their bios. md/raid1: Replace use of mddev->raid_disks with conf->raid_disks. md/raid10: If there is a spare and a replaceable device, start replacement. md/raid10: recognise replacements when assembling array. md/raid10: Allow replacement device to be replace old drive. md/raid10: handle recovery of replacement devices.
md/raid10: Handle replacement devices during resync. md/raid10: writes should get directed to replacement as well as original. md/raid10: allow removal of failed replacement devices. md/raid10: preferentially read from replacement device if possible. md/raid10: change read_balance to return an rdev
md/raid10: prepare data structures for handling replacement.

 drivers/md/raid1.c  |  161 +++++++++++----
 drivers/md/raid1.h  |    7 +
 drivers/md/raid10.c |  563 +++++++++++++++++++++++++++++++++++++++++----------
 drivers/md/raid10.h |   61 +++---
 4 files changed, 622 insertions(+), 170 deletions(-)
Signature · 1 line
Signature