[CentOS] Mirroring disk.

Fri Feb 14 05:20:39 UTC 2014
Keith Keller <kkeller at wombat.san-francisco.ca.us>

On 2014-02-14, Jeff Allison <jeff.allison at allygray.2y.net> wrote:
> Although my data is on a RAID 5 array my OS is on a single disk.
> Any suggestions as to the best way to have a copy of my OS on an
> attached USB Drive?

It really depends on your use case.  Are you looking to keep the OS
running if your disk fails?  If so you need a real RAID (using real
disks, not a USB drive).  Are you looking to be able to do a very fast
restore and be mostly up to date with what you had before?  If so a
filesystem-level dump might work.  Are you looking to simply be able to
restore a file you botched by accident?  If so something like rsnapshot
might work.  Are you just looking to get back up and running?  If so
one way to go could be rsnapshot and kickstart--kickstart to
automatically install the packages you need without needing to go
through the full install prompts, and rsnapshot to capture your local
config files and software (likely primarily in /etc, perhaps some in
/usr/local or /opt).  (Or you can just record a list of your packages
somewhere offline, and make sure you install them, if you don't want to
mess with kickstart.)

> Been considering dump and restoring to the usb disk periodically? or
> maybe something using LVM or maybe creating and breaking a RAID 1
> array?

Constantly making and breaking a RAID1 with a USB drive is probably not
helpful.  It's just more wear and tear on the OS drive, because it has
to be constantly read in order to mirror the target drive, and your USB
drive is probably not what you want to boot off of if your system drive
fails.  You'd be much better off with a permanent RAID1, but if you
can't do that then at least make a RAID1 to a USB enclosure which
contains the same size and interface drive as your current system disk.
This way if it fails you can swap in the backup drive and not have to
boot from a USB drive.


kkeller at wombat.san-francisco.ca.us