[Techtalk] software raid conundrum
kclair at gmail.com
Thu Oct 14 16:26:20 EST 2004
Thanks for the suggestion! I had also emailed the linux-raid mailing
list, and got the easiest solution from there: make a new array with
the smaller of the disks plus a missing disk, sync the data from the
larger disk to the new array, add the larger disk to the new array.
It worked wonderfully, except mdadm thinks the new array is "dirty"
for some reason...
On Wed, 13 Oct 2004 23:11:57 +0100, Conor Daly <conor.daly at oceanfree.net> wrote:
> On Wed, Oct 13, 2004 at 01:32:58PM -0400 or so it is rumoured hereabouts,
> kclair thought:
> > i'm a bit confused about how to proceed. do i need to disassemble the
> > array and sync the disks somehow and then reassemble the array? or
> > can i disassemble the array and then reassemble it and the raid
> > software will sync the disks, based on the data on the larger disk?
> I'd suggest something like this:
> Assuming /dev/hdb is the smaller disk...
> o Remove hdb from the array and the raidtab.
> o Start the raid array in degraded mode (it'll do that itself). Call this
> o Partition hdb1 and create ext filesystem.
> o Copy data from running raid array md0 to hdb1
> o Stop raid array.
> o zero out partition table on hdc
> o Partition hdc1 to match hdb1 and create ext filesystem.
> o Copy data from hdb1 to hdc1. Now you have two copies of data.
> o Create a raidtab with one raid-disk (hdc1) marked as failed-disk.
> o Start raid array (md0). This should run degraded with hdb1.
> o Mount md0.
> o Check contents of md0 against hdc1.
> o If happy, remove the failed-disk flag from raidtab.
> o raidhotadd hdc1. The raid array should sync.
> This should all work since raid-1 uses intact ext filesystems on the
> constituent disks so you can mount the disks singly. I'm not positive
> that I haven't missed something so you should read up on this before
> If you have a look at http://www.cod.utvinternet.com there is a raid sync
> script there which will sync a second disk into a raid array so that it
> properly matches. It will be necessary to hack on it since it also
> attempts to make the raid array bootable. If using that, make sure your
> raid array is running off the smaller disk first.
> > any advice is much appreciated.
> It may not be correct though!!
> Conor Daly <conor.daly at oceanfree.net>
> Domestic Sysadmin :-)
> 11:01pm up 1 day, 23:48, 0 users, load average: 0.00, 0.10, 0.20
> 23:00:19 up 26 days, 26 min, 1 user, load average: 0.13, 0.09, 0.02
> Techtalk mailing list
> Techtalk at linuxchix.org
More information about the Techtalk