Reiner Buehl <rei...@buehl.net> wrote: > I have a Debian Etch system that runs on a RAID 1 software raid system. > now I would like to upgrade it to Lenny by splitting the mirror off and > keep one mirror as a backup. Alternatively I could add a third disk as a > second mirror and split off this one. > If the upgrade works, I then add in the old disk again. If it fails I'd > like to be able to rebuild the array using the OLD mirror that I kept.
Pretty reasonable. > Does anybody have a more detailed description on how to do this? I know > I can fail a drive with mdadm, but my understanding is that the data on > this this drive can't then be used again after that. I don't have details to hand but the general principles may help. Be aware that this is from memory, although I have successfully done it. Preparation... * When you fail the mirror, do it in single-user mode after a sync * Note which physical disk is live (eg /dev/sdl) and failed (sdf) * Boot your rescue CD and ensure you can differentiate sdl and sdf * BACKUP your system. Or at the very least, the important bits Installation... * Fail the mirror (/dev/sdl == live, sdf == failed) * Use mdadm to zero the RAID superblock on sdf ONLY * Trash/upgrade/reinstall using RAID on /dev/sdl. Ignore sdf * When you're happy, bring in sdf (possibly with --force) If it all goes badly... * Boot from the rescue CD * Use mdadm to zero the RAID superblocks on sdl AND sdf * Use mdadm to create a RAID1 wrapper around sdf * Bring in sdl as a new disk for the RAID1 array * Update fstab, menu.lst, etc. to reference the new /dev/md* device Chris -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org