Re: RAID10 - migrating disks without failing/degrading array?
From: Tom Carlson <hidden>
Date: 2009-10-03 08:42:51
You could also use mdadm..... :-) Say you have raid10 array md0 with members sda1 sdb1 sdc1 sdd1 and you wish to swap out sdd1 for sde1, with as little time for massive fail as possible...: Add a bitmap (bitmap chunk may need tweaking here depending on size of devices) mdadm -Gb internal --bitmap-chunk=1024 /dev/md0 Fail and remove device: mdadm --fail /dev/md0 /dev/sdd1 mdadm --remove /dev/md Build (NOT create) a new raid1: mdadm --build /dev/13 -ayes --level=1 --raid-devices=2 /dev/sdd1 missing Add this new raid1 to md0: mdadm /dev/md0 --re-add /dev/md32 Add the new disk to the temp raid1: mdadm /dev/md32 --add /dev/sde1 [Now wait a while for md32 to resync. md0 should not have had to resync at all if the array was not in use. Hurrah bitmap!] Remove the raid1: mdadm /dev/md0 --fail /dev/md32 mdadm /dev/md0 --remove /dev/md32 mdadm --stop /dev/md32 Re-add the new disk mdadm /dev/md0 --re-add /dev/sde1 Zero superblock of old disk mdadm --zero-superblock /dev/sdd1 2009/10/3 David Rees [off-list ref]:
(Re-adding linux-raid to CC) On Fri, Oct 2, 2009 at 6:36 PM, Ryan Wagoner [off-list ref] wrote:quoted
On Fri, Oct 2, 2009 at 2:22 PM, David Rees [off-list ref] wrote:quoted
It seems like I should be able to add a drive as a directly replacement for one of the drives I'm pulling out (so I temporarily end up with 3-copies of that chunk instead of 2) until I pull fail/remove the older disk. If I was using RAID0 striped over RAID1 mirrors, for example, I know this is possible. Is this possible to do with RAID10?You could stop the array and use dd to copy the old disks to the new ones. Then just start up the array on the new disks.Yeah, that would work, but the goal is to do the migration without any downtime. eSATA hot-swap even in inexpensive enclosures works pretty well these days. There are slight hiccups as the drives get rescanned, but it's not too noticable. -Dave -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html