Re: Shrinking on-disk size of RAID1 array?
From: Gordon Mohr <hidden>
Date: 2005-09-30 18:37:21
Matthew Coulson wrote:
quoted
I'm hoping to shrink the per-component size of an active RAID1 array, so that I can transition the array to a smaller, faster set of drives.I may be missing something here, but why not connect up the new drives, setup the arrays, simply cp -R * everything over to the new filesystems and update fstab and mdadm.conf? I can understand wanting to let the system handle it all for you, but this way you'll get a free defrag to boot :)
Largest reason is that I want to minimize system downtime. My working assumption is that the 'parted' resize and 'mdadm' grow (shrink) would take minutes (or tens of minutes), then the background sync to the new smaller drive could happen at a leisurely pace, while services which actively write to the array remain up. I would expect a plain 'cp -R' to take hours, during which (to be safe) all services using the array should be stopped. (Perhaps I could do an initial 'cp -R' while services are running, then a quicker rsync for consistency when services are down?) If my assumption about the relative time required of 'parted' resize and 'mdadm' grow is wrong, the simple copy approach would be more attractive. - Gordon