[plug] imaging HD

James Devenish devenish at cyllene.uwa.edu.au
Sat Jan 4 12:14:03 WST 2003


On Sat, Jan 04, 2003 at 11:10:26AM +0800, Mike Holland wrote:
> Are there any potentially nasty race conditions in copying a live,
> running linux system to a new HDD?  Assuming its just idling - no
> databases running, or sysadmin in progress, etc.
> Just the usual daemons.

Assuming that things are running, and log messages are being generated,
and there may be daemons that haven't flushed data to disk even though
they have been idle, then...

For some platforms, there are no-cost/included tools that can assist 'on
the fly' backups by creating a snapshot of the filesystem. One mode of
operation is that if you can ensure that your daemons will flush data
and have their logs rotated at a particular quiescent time, the snapshot
facility will create a (read-only, usually) image of the filesystem at
that point in time and you can then mount/read the snapshot fs as though
it were the original (though if you mount it with the OS, you would have
to choose a different mountpoint to any live fs). If your real
filesystems get modified thereafter, the original contents are copied
to a temp area so that the snapshot filesystem can remain the same while
allowing continued activity on your real filesystems. (Of course, you
eventually have to close down the snapshot or you'll end up with the OS
keeping two copies of everything.) This means that the snapshot is a
completely static copy of your filesystem and as long as the files were
intact (hence the stress on making sure things were flushed/rotated)
then you probably have a useable backup. This can also be useful if you
would like to create a snapshot for forensic means (e.g. capturing what
a daemon is doing with spool directories or something).




More information about the plug mailing list