F16 - Converting to RAID1
Brian Hanks
bhanks at bhanks.net
Mon Jan 2 00:50:51 UTC 2012
OK, I'm a long-time RedHat/Fedora user, but some of the recent changes
(grub2, systemd, hal, etc.) are modifying or deprecating my tried and
true methods. The latest issue I've got is that I want to add a second
drive in a RAID1 config for my main data partitions. This is something
I had planned all along and thought it wouldn't be a big deal. I've
done it countless times before. I've even got much of the work already
done. There are just a few pieces that have changed and I want to make
sure I get it right the first time.
I recently built a new "main" machine for my home office. It plays many
roles including that of main Fedora workstation as well as main Fedora
server. I primarily use this machine to provide server functions but
do use it for things like photo/movie/mp3 processing, Amarok, GIMP,
etc. I built it right before Christmas with an SSD for everything
except for {swap}, /var, and /data, which is on a separate 2TB drive.
When originally built it only used one data drive because HDD prices
were high. A few weeks later I picked up a matching drive on special.
It's installed, has partitioned, RAIDed (degraded), formatted, and it
contains a copy of the data. The problem is I'm not 100% sure what I
need to do to get this thing converted over for the reboot.
The drives are /dev/sda (SSD), /dev/sdb (existing data drive with ext4
partitions), /dev/sdc (new data drive). Here's what I was planning to do:
1. Umount the two RAID devices with a current copy of data.
2. Edit /etc/fstab replacing Device IDs with new RAID devices
(UUID=???? becomes /dev/md?)
3. Make backup of /boot/grub2/grub.cfg
4. Make backup of /boot/initramfs-$(uname -r).x86_64.img
5. dracut --force initramfs-$(uname -r).img $(uname -r)
6. grub2-mkconfig -o /boot/grub2/grub.cfg
7. I don't think I need to install grub2 on the new drive because
that's already on the SSD primary drive.
8. Do I need to remove the "rd.md=0" from /etc/default/grub? Or will
grub-2-mkconfig fix this?
9. Reboot and hope it starts with the new RAID devices (did I mention
that /var is on this disk as well?)
10. Modify partition types of /dev/sdb to fd (linux raid autodetect)
11. Add /dev/sdb to the RAID1 arrays and let them sync (mdadm --add
/dev/md? /dev/sdc?)
I would appreciate any advice.
Thanks,
-Brian
More information about the users
mailing list