| |
---|
| | |
---|
| | |
---|
| | :Author: Tim Daneliuk (tundra@tundraware.com) |
---|
| | |
---|
| | :Version: ``$Id: baremetal.rst,v 1.115 2014/08/23 19:13:36 tundra Exp $`` |
---|
| | :Version: ``$Id: baremetal.rst,v 1.116 2014/08/23 20:04:31 tundra Exp $`` |
---|
| | |
---|
| | |
---|
| | Précis |
---|
| | ------ |
---|
| |
---|
| | use another local hard drive, SAN connected storage or even a USB-connected |
---|
| | drive. |
---|
| | |
---|
| | |
---|
| | |
---|
| | Example Environment |
---|
| | ------------------- |
---|
| | |
---|
| | In our examples below, we're imaging a CentOS 6.5 machine. The only thing |
---|
| |
---|
| | |
---|
| | 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 |
---|
| |
---|
| | |
---|
| | 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. |
---|
| | |
---|
| | Depending on the speed of your processor and network, and the kind of |
---|
| | data on your hard disk, it may be possible to speed the process up by |
---|
| | 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) |
---|
| | |
---|
| | |
---|
| | |
---|
| | Restore Procedure |
---|
| | ----------------- |
---|
| | |
---|
| |
---|
| | |
---|
| | dd if=/shared/root.dd of=/dev/sda2 bs=12M # Restore rootvg LVM (rest of OS) |
---|
| | |
---|
| | Reboot machine to make it operational again |
---|
| | |
---|
| | |
---|
| | 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) |
---|
| | |
---|
| | |
---|
| | On the same network described above, restoring the 52MB ``rootvg`` |
---|
| | took about 35 mins. |
---|
| | |
---|
| |
---|
| | |