Summary: I created a copy of the root file system on a RAID array (with one disk on it), I tried to get the system to boot off that newly copied drive.
Background:
- 2 disks of the same size in server (sda, sdb)
- sdb not being used
- I tried to transition the whole thing to a RAID1 mirror
- current active partitions:
- sda1 - boot
- sda2 - swap
- sda3 - root (mounted to "/")
I am not sure if it's possible to make a full RAID1 system able to boot off any of the drives, since I do not have KVM access (I can only tell them to help me out of a jam via a trouble ticket)
What has been done so far:
- Created partitions on sdb to match sda
- Created new raid1 array (with 1 disk)
- /dev/md3 consists of 1 disk: /dev/sdb3
- mounted /dev/md3 /mnt/md3
- cp -ax / /mnt/md3
- So now I have matching copies of data on / and /dev/md3
Can I just edit GRUB2 to make /dev/md3 the root? Everything should be OK, right?
I need to be absolutely sure, since I have no KVM access. I looked at /boot/grub/grub.cfg and I saw this entry:
menuentry 'Ubuntu, with Linux 2.6.32-28-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 18de6bbd-e46d-4f89-a2c9-fa2e7fa718b7
linux /vmlinuz-2.6.32-28-generic-pae root=/dev/sda3 ro
initrd /initrd.img-2.6.32-28-generic-pae
}
So, note the "root=/dev/sda3" part. Can I just replace that with "root=/dev/md3", then reboot??