[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] What happens with full snapshots



  The summary answer to the list of questions below
is "it works well".


1. What happens if the snap gets full (e.g. someone copies large data from one lv to a snapshotted lv or something other you didn't expect), some sites say it original and snapshot gets deactivated, some sites say the snap lv gets invalidated. What does this mean? Is my original volume just crap afterwards or can I work on as usual (with the difference that nothing is
written on the snap anymore), or just need to remove the snap ..

   The original LV is unaffected.  The snapshot stops being valid.
This is because, as you said:

I know you should size your snapshot volume to a size that can hold all the changes. As I see a snap lv only contains the "original" datachunks and the
original lv is in a normal state as if there were no snapshot.

   That is correct, the snapshot contains the old data, while
the LV holds the current data.  Overfilling the snapshot will
simply mean no more old data is saved as it's changed, so the
snapshot is therefore invalid.


2.       What happens if there is a problem with a snap? I've heard on
reboot the snapshots are lost. What if there is a power shortage, so the
snap is lost, you boot and the original lv just seeks for the snap?

   LVM snapshots are NOT lost on reboot.  That information may apply
to some other type of snapshot mechanism unrelated to LVM, or some
system could potentially be built on top of LVM which holds snapshots
in RAM, but in the normal use case snapshots are written to disk
just like any other data you might write to disk.

What if there is a power shortage, so the snap is lost, you boot
and the original lv just seeks for the snap?

   Just like anything else written to disk, a sudden loss of power
could result in some lost data.  Snapshots are not different from
your normal "file system on a partition" in this respect.  With LVM
or without, battery backups systems (UPS) are advised for critical
systems.

   LVM can be set to maintain a log of backups of the LVM metadata
in case you had a power failure or other major "oops" in the middle
of creating a snapshot or something like that.  The tool "vgcfgrestore"
can restore the LVM configuration to any of your last X valid
configurations.  I've used that several times when I've done
something stupid like deleting an important LVM, as I'm doing a
lot of weird stuff with LVM.
--
Ray Morris
support bettercgi com

Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/

Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/

Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php


On 02/12/2010 08:56:11 AM, Harald Heigl wrote:
Hello,

I'm relatively new to lvm, I'm using Fedora for almost 3 years, but up to now I just set up lvm on install, formatted my ext3/ext4 and it just works.

Now I want to go somehow deeper playing around with snapshots.



I know you should size your snapshot volume to a size that can hold all the changes. As I see a snap lv only contains the "original" datachunks and the
original lv is in a normal state as if there were no snapshot.



My questions:

1. What happens if the snap gets full (e.g. someone copies large data from one lv to a snapshotted lv or something other you didn't expect), some sites say it original and snapshot gets deactivated, some sites say the snap lv gets invalidated. What does this mean? Is my original volume just crap afterwards or can I work on as usual (with the difference that nothing is
written on the snap anymore), or just need to remove the snap ..

2.       What happens if there is a problem with a snap? I've heard on
reboot the snapshots are lost. What if there is a power shortage, so the snap is lost, you boot and the original lv just seeks for the snap? Are there implications on this. Can you just mount such a original lv or do you
have to remove the (non existent) snap lv before (How can you remove a
snapshot that doesn't exist anymore)



That would be nice to know before I use snaps.

Thanks in advance,

Harald (Harry) Heigl





------quoted attachment------
_______________________________________________
linux-lvm mailing list
linux-lvm redhat com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]