RAID 1 and Xen (dom0)
From Wiki
Contents |
[edit]
Converting a Live Working Xen (dom0) to RAID 1
[edit]
Create RAID 1 with current Live disk Missing
cfdisk /dev/sda sda2 = 34850.52
cfdisk /dev/sdb create new primary partition - fs type - linux raid autodetect
apt-get install mdadm #mdadm --create /dev/md0 --level 1 --raid-devices=2 missing /dev/sdb1 --auto #it doesnt want the --auto anymore. mdadm --create /dev/md0 --level 1 --raid-devices=2 missing /dev/sdb1 mkfs.ext3 /dev/md0
[edit]
Add support for RAID1 into XEN Boot Module
vi /etc/initramfs-tools/modules //add (or uncomment) the line: raid1
mkinitramfs -o /boot/initrd.img-2.6.16-1-xen-k7 2.6.16-1-xen-k7
vi /boot/grub/menu.lst /dev/md0
mdadm --examine --scan
vi /etc/mdadm/mdadm.conf - DEVICE /dev/sda1 /dev/sdb1 ARRAY /dev/md0 level=raid1 num-devices=2 UUID=from examine above
vi /ets/fstab //addjust to reflect /dev/md0 / ext3 defaults 0 0
[edit]
Mount New RAID 1 and Copy over all File from Live System
mount /dev/md0 /mnt cp -dpRx / /mnt
[edit]
Reboot into RAID 1
- Check grub is updated.
reboot
When the system boots up off /dev/md0 (really its only /dev/sdb1 yet), add /dev/sda2 into the raid1:
mdadm /dev/md0 --add /dev/sda2
Make sure that /etc/mdadm/mdadm.conf reads correctly.
I didnt install grub onto both hard disks. This can be done via rescue system/cd or whenever the harddisk goes and if the system remains up.
- For info on managing mdadm etc. please consult the main wiki here at: Base_Install_of_Debian_Sarge_with_RAID.
Misc Stuff on Grub:
grub-install --recheck /dev/sdb
More info at:
