tl;dr: I'm curious about the best way to have a regularly cloned
backup boot disk on an Ubuntu 12.04 system.
I have an HP microserver with 4 internal disks and a 5th, external,
boot disk. The microserver provides one esata port and six usb ports.
The boot drive is on the external esata port and I have three possible
backup disks that I can boot with if the current boot disk fails. So
a quick cast of characters:
/dev/sd[abcd]: internal data disks. They get backed up a different way.
/dev/sde: external esata disk.
/dev/sde1: /boot on a primary partition
/dev/sde2: An extended LVM partition with / and swap on it (and 50G of
free space for snapshots)
I can connect any of my backup disks with USB (and if being used as a
primary, with esata). Let's say I just connect 1 and it comes up as
/dev/sde. The backup disks are all different sizes. I can't just dd
the entire disk across - nevermind that it's horribly inefficient.
I figure I can do the following:
Partition /dev/sde to match - a /dev/sde/1 primary and /dev/sde2 with
LVM and similar size partitions (obviously with different free space
due to drive size differences). Note it will need a different VG name.
The general backup steps will be:
1. Mount snapshot volume of /dev/mapper/frith-root on /mnt/source
2. Mount /dev/mapper/frith2-root /mnt/target
3. rsync only source -> target.
4. Unmount target and the snapshot volume.
5. Mount /dev/sde1 /mnt/target
6. rsync only /boot -> target
7. Unmount target.
The issue is, will the resulting /dev/sdf be bootable? I would imagine
two scenarios:
Scenario 1: The esata disk remains plugged in, is identified as
/dev/sde and is not bootable. BIOS moves on to USB and tries to boot
off /dev/sdf. Will grub understand what to do here or will it try to
boot or mount things on /dev/sde?
Scenario 2: The esata disk is either disconnected or not seen. The
backup disk is now /dev/sde.
Either way, the backup disk has a slightly different LVM config (the
VG name is different and the filesystems have different UUIDs).
Is there a grub command I can run on the backup disk that will make it
a bit more device independent? I'm looking but generally grub docs
annoy the crap out of me so if anyone has a magical idea here...
Kevin
--
Kevin Lyda
Dublin, Ireland
US Citizen overseas? We can vote.
Register now: http://www.votefromabroad.org/
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!