Please allow me to better explain the LVM snapshot thing.
An LVM volume is like a partition, you format it and you mount it.
Your VMs reside on it and work as usual.
When you create a snapshot, you actually create a "virtual clone" of
the partition, which does not occupy any physical space, and can be
mounted just like the real partition.
Of course it is read-only.
The "free physical extents" are needed by LVM itself to store all the
changes that occur on the real data for as long as the LVM snapshot
exists.
How many of these are needed depends on how much time the snapshot
will exist; in fact, the more time the snapshot exists, the more the
changes to the real volume will have to store.
So, to answer your questions:
- How much space does a LVM snapshot actually take up?
Depends; I, for example, leave between 1GB and 4GB free space, and
never filled it, so I guess it should be enough.
- The LVM partition where my VM images resides is /home which
obviously
contains more than just my virtual machine images, so is there another
option for backing up the images? I guess tar'ing them up??
Wrong question!
The right one is: do you have enough (if any) free phyisical extents
in this LVM volume?
You can see how many there are with this command:
vgdisplay "your Volume Group name" | grep "Free PE"
If the number is 0 , and it most certainly will, you can't use this
LVM volume to create LVM snapshots.
Why am I so sure? Because the default when creating an LVM volume is
to NOT leave any free physical extents.
- Can I backup the LVM snapshots to a non LVM partition? I have a USB
disk
mounted on the server.
You can backup to any path you can mount, just remember to mount it
before running the script and update the BACKPATH variable
accordingly.
Regards,
Michele