Re: Is (non-failed) disk replace possible without loosing redundancy ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013-04-11, Adam Goryachev <mailinglists@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> I'm pretty sure this will work:
> 1) mdadm --manage /dev/md0 --add /dev/sdc1 # Add spare device
> 2) mdadm  --grow /dev/md0 --level=1 --raid-devices=3 # Grow the array to
> three drive raid1
> 3) mdadm --manage /dev/md0 --fail /dev/sdb1 # After the resync is
> finished, fail the old disk2
> 4) mdadm --manage /dev/md0 --remove /dev/sdb1 # Now remove the old disk2
> 5) # Now physically remove disk2.
> Repeat steps 1, 3, 4, 5 to replace disk1 with disk4.
>
> 6) mdadm --grow /dev/md0 --level=1 --raid-devices=2 # Reduce the array
> back to a two drive raid1

This seems like a reasonable way to replace a RAID1 device without
losing redundancy.  Is there any way to accomplish the same sort of
thing in a RAID5 or 6?  I am imagining something like, if I wanted to
replace device 0, I'd create a RAID1 with that device and the new
device, wait for that build to complete, then break the mirror and
remove the old device 0, so that the new drive becomes the new device 0.
I suppose one could create a RAID5 out of RAID1 components where each
RAID1 is initially degraded, but that seems inelegant.  (I think this
option may have been suggested on this list at one point.)

--keith

-- 
kkeller@xxxxxxxxxxxxxxxxxxxxxxxxxx


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux