diff --git a/baremetal.rst b/baremetal.rst index aa7f43b..e314600 100644 --- a/baremetal.rst +++ b/baremetal.rst @@ -6,7 +6,7 @@ :Author: Tim Daneliuk (tundra@tundraware.com) -:Version: ``$Id: baremetal.rst,v 1.102 2014/08/22 23:05:22 tundra Exp $`` +:Version: ``$Id: baremetal.rst,v 1.103 2014/08/22 23:38:40 tundra Exp $`` Précis @@ -65,18 +65,76 @@ ---------------- :: + Boot from the System Rescue CD - mount nas1:/shared /shared # Mount shared storage + mount nas1:/shared /shared # Mount shared storage + + sfdisk -d /dev/sda >/shared/ptbl # Preserve the partition table + + dd if=/dev/sda of=/shared/MBR bs=512 count=1 # Backup the Master Boot Record + + dd if=/dev/sda1 of=/shared/boot.dd bs=12M # Backup /boot + + dd if=/dev/sda2 of=/shared/root.dd bs=12M # Backup rootvg LVM (rest of OS) + + reboot machine to make it operational again +How long this takes depends on what your write speed to the shared storage is +and how big your partitions are. In this case ``sda1`` is only about 100MB +and completed rather quickly. But ``sda2`` was about 52GB and took around +25 min to complete on a slow nfs mount - about 26MB/min in this case or about +a quarter of the capacity of the 1Ge network connecting the NAS. +The ``bs=12`` is environment-specific and you'll have to find a setting for this +that makes best use of your network and NAS or other storage device. Restore Procedure ----------------- +Now, imagine that your OS is borked or the hard disk had to be replaced and you +need to take the image from the backup above and getting running on the machine. +:: + Boot from the System Rescue CD + + mount nas1:/shared /shared # Mount shared storage + + dd if=/dev/zero of=/dev/sda bs=512 count=10 # Nuke any old boot/partion info on the disk + + sfdisk /dev/sda