| |
---|
| | |
---|
| | |
---|
| | :Author: Tim Daneliuk (tundra@tundraware.com) |
---|
| | |
---|
| | :Version: ``$Id: baremetal.rst,v 1.121 2014/08/23 21:00:27 tundra Exp $`` |
---|
| | :Version: ``$Id: baremetal.rst,v 1.122 2014/08/23 22:43:54 tundra Exp $`` |
---|
| | |
---|
| | |
---|
| | Précis |
---|
| | ------ |
---|
| |
---|
| | compressing the output of ``dd`` on-the-fly. There's no reason to |
---|
| | bother doing this for the MBR, but for the actual data partitions, |
---|
| | it's worth a try. Replace the last two ``dd`` commands with:: |
---|
| | |
---|
| | dd if=/dev/sda1 | gzip >/shared/boot.dd.gz # Backup /boot |
---|
| | |
---|
| | dd if=/dev/sda2 | gzip >/shared/root.dd.gz # Backup rootvg LVM (rest of OS) |
---|
| | dd if=/dev/sda1 | lzop >/shared/boot.dd.gz # Backup /boot |
---|
| | |
---|
| | dd if=/dev/sda2 | lzop >/shared/root.dd.gz # Backup rootvg LVM (rest of OS) |
---|
| | |
---|
| | |
---|
| | |
---|
| | Restore Procedure |
---|
| |
---|
| | 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 |
---|
| | |
---|
| | partprobe /dev/sda # Reread the partition table into the kernel |
---|
| | |
---|
| | sfdisk /dev/sda </shared/ptbl # Restore the partition table |
---|
| | |
---|
| | dd if=/shared/MBR of=/dev/sda bs=512 count=1 # Restore the Master Boot Record |
---|
| | |
---|
| |
---|
| | |
---|
| | If you backed up using compression, then the last two ``dd`` commands |
---|
| | will be:: |
---|
| | |
---|
| | dd if=/shared/boot.dd.gz | gunzip >/dev/sda1 # Restore /boot |
---|
| | |
---|
| | dd if=/shared/root.dd.gz | gunzip >/dev/sda2 # Restore rootvg LVM (rest of OS) |
---|
| | dd if=/shared/boot.dd.gz | lzop -d >/dev/sda1 # Restore /boot |
---|
| | |
---|
| | dd if=/shared/root.dd.gz | lzop -d >/dev/sda2 # Restore rootvg LVM (rest of OS) |
---|
| | |
---|
| | |
---|
| | Restoring To A Different Sized Drive |
---|
| | ------------------------------------ |
---|
| |
---|
| | |