While upgrading my desktop to Fedora Core 12, I also decided to modify a software RAID mirror that I had on the old system. In particular, I wanted to do two things, without losing data:
So, since I'm using mirroring, I figure the "right" approach would be to just break the mirror, and do a migration safely that way. And of course, that does work, and there's plenty of information in the man-pages how to do this, but I figure I'll write down the steps I took so I can remember it myself (and maybe someone else finds it useful too).
The first step is to break the mirror, in my case, the RAID mirror is /dev/md2 using /dev/sdb and /dev/sdd, and then mount the broken mirror half on the file system:
# mdadm --manage /dev/md2 --fail /dev/sdb1
# mdadm --manage /dev/md2 --remove /dev/sdb1
# mkdir /mnt/old-data
# mount /dev/sdb1 /mnt/old-data
We now have a complete "copy" of the mirrored data, make sure /mnt/old-data (or whatever you named it) looks good. The next step is to get rid of the old RAID device, and create a new one. In my case, I need to run fdisk as well, to change the partition layout, but I'm not going into details here exactly what I did, since it's very specific to my setup.
# mdadm --stop /dev/md2
# fdisk /dev/sdd
# mdadm --create /dev/md0 --level 1 --raid-devices=2 missing /dev/sdd1
Finally, we can now create the new filesystem, and migrate the old data over to it:
# mke2fs -t ext4 -j /dev/md0
# mkdir /mnt/new-data
# mount /dev/md0 /mnt/new-data
# rsync -av /mnt/old-data/ /mnt/new-data
The final step is to add back the "old-data" partition into the new mirror, but before doing so, make sure the "new-data" looks alright.
# umount /mnt/old-data
# fdisk /dev/sdb
# mdadm --add /dev/md0 /dev/sdb1
That's it! Easy, and very little risk for lost data or corruptions.
I just installed a Mandriva 2010 VM under VirtualBox, and to my big surprise, when it booted up, it was already "ware" of my Virtual Box environment. Things like grabbing (and releasing) the mouse and resizing the X11 window just worked right out of the box, no need to install the Virtual Box guest additions. Pretty impressive.
For some unknown reasons (I'm guessing someone trying to be overzealous about what the Fedora users should do), FC12 no longer includes the control panel to modify the "Window" behavior. This includes the must-have feature of "Select windows when the mouse moves over them". But wait, no need to switch to Ubuntu quite yet, there's a simple fix to restore this control panel:
$ sudo yum install control-center-extra