2012年10月20日 星期六

Linux Bare Metal Recovery

As far as I can remember, I've no need to do Linux bare metal recovery.   Thanks to the flawless Linux OS running on stable hardware platform.  Nevertheless, there is an incident happened yesterday that a bare metal recovery is needed immediately.

Below are the (i) case and (ii) steps for recovery

Case

  1. RHEL 5.5
  2. IBM x3650 M3
  3. 2 x Hard Disk Failures

Steps for recovery

  1. Replace both Hard Disks
  2. Re-create the RAID-1 on the Hard Disks
  3. Kick start the same OS onto the repaired RAID-1 local hard disk
  4. Mount the GRML image onto the iMM virtual media
  5. Boot up the server using the image
  6. Configure the network settings on the main interface
  7. Bring up LVM2 system (/etc/init.d/lvm2 start)
  8. Change the system root password (sudo passwd root)
  9. Run rsync from another system to the repaired system to restore the backup copy
    • backup-system#  rsync -avz --delete * <repaired-system>:/mnt
  10. Reboot and do a health check

 Notes

  1. If the ks.cfg is lost, then step 3 can be skipped.
  2. If the ks.cfg is lost, extra step such as disk partitioning is required. 
  3. For step 6, please watch out the order of the network interface in GRML image might be different from current server. Useful tip is to identify the correct interface using the MAC address.
  4. For step 9, /mnt is mounted onto the root file system.