Hash: RIPEMD160

Mauricio Tavares wrote:
> 	Let's say I have a linux box, say RHES 4 or Centos 4, which I have
> put everything but the boot partition in a LVM partition. Now I would like
> to back it up. So, I could connect an external USB drive, then create the
> snapshot LVM device and go from there. Now, let's say the disk I want to
> snapshot to is in a different machine running the same OS. Is it possible
> to somehow offer this disk to the first machine such that it can then
> create its snapshot lvm target and then run the snapshot?

Your question is not clear to me.  One thing I think you may not
understand is that an LVM snapshot of a logical volume doesn't really
occupy any space, at least not at the moment it is created.  When you
read from it you are just getting the data from the original LV.  Later,
when the underlying LV is changed the old, original block is written to
the snapshot so when you read the snapshot it doesn't appear to have
changed.  The amount of space used in the snapshot is equal to the
amount of space CHANGED in the original LV since the snapshot was created.

If your backup runs fast, and the original LV is not updated a lot
during that time you don't need a lot of space.  You can read about this

Your question sounds like you want to put the snapshot in a different PV
than the original LV.  I don't think you can do that.

If you are asking if you can backup to an external USB drive that is
physically attached to a different machine the answer is yes.  You can
share that drive using Samba or NFS, or several other sharing systems.

If your problem is that your PV is full because your LV(s) use it all up
you can resize the LVs.  If the filesystems they hold have free space
you can reduce the size of the file system and then reduce the size of
the LV.  If you can make 10 or 20% free space in your PV you will
probably be able to use snapshots to backup your LV's.  You should, of
course, backup a file system before you resize it.

For each LV, flush your DB buffers to disk and read-only lock the DB.
Create a snap shot and free the read lock on the DB.  Then backup that
snapshot and delete it.  Move on to the next LV.

Good luck.
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla -