Your JoeDog still likes rear.
He uses it for bare metal recovery and system cloning. Recently he had to clone one server onto older hardware as part of a disaster recovery exercise. It was problematic.
Problem one: The rear recovery disk could not connect to the network.
This system had bonded NICs and Your JoeDog started to suspect they were causing an issue. When the recovery disk booted, he brought down all the network interfaces and tried to assign a new address to the server. The routing table looked fine. The eth0 config looked fine, but the network was unreachable.
Acting on a hunch that bonded NICs were giving him fits, Your JoeDog did a recursive grep of the rear directory …
… wait a minute, what’s a recursive grep?
You can do it like this:
$ find /usr/share/rear -print | xargs egrep -i bond
Cool, thanks …
Anyway, as a result of that search, he found this feature: SIMPLIFY_BONDING With a little more digging, he discovered that it takes ‘y’ or ‘n’ so Your JoeDog set it to y and re-archived the server. He added that directive to local.conf
When the server booted from the new recovery disk, the only network interface was eth0. Your JoeDog reset that address with ifconfig and he was able to clone the server from his rear archive. SUCCESS!!!!
Problem two: No success! After the rear recovery, the kernel panic’d and the server wouldn’t boot. Unhappy sad time.
Your JoeDog was all, “Hmmm I’ll bet I need to rebuild the kernel for new hardware….”
So he restored again from rear. This time, when the recovery was complete, he chroot’d the mount point and rebuilt the kernel.
… wait a minute! How do you do that?
Glad you asked. Here’s my command history:
$ chroot /mnt/local $ export PATH=/sbin:/bin:/usr/sbin:/usr/bin $ cd /boot $ mkinitrd -f -v initrd-2.6.32-431.20.3.el6.x86_64kdump.img 2.6.32-431.20.3.el6.x86_64
NOTE: Whatever you call the kernel, i.e., whatever you use for the second argument of mkinitrd, make sure you have a directory by the same name in /lib/modules, i.e., /lib/modules/2.6.32-431.20.3.el6.x86_64
DOUBLE NOTE: Once you’re inside /boot, do an ls to find available kernel images. They’ll begin with initrd- and end in .img
Now get yourself some rear.