All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Morris <support@bettercgi.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] What happens with full snapshots
Date: Fri, 12 Feb 2010 09:37:59 -0600	[thread overview]
Message-ID: <1265989079.22562.0@raydesk1.bettercgi.com> (raw)
In-Reply-To: <001501caabf3$85080b60$8f182220$@at> (from Harald_Heigl@gmx.at on Fri Feb 12 08:56:11 2010)

   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/

  reply	other threads:[~2010-02-12 15:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12 14:56 [linux-lvm] What happens with full snapshots Harald Heigl
2010-02-12 15:37 ` Ray Morris [this message]
2010-02-12 16:41   ` Harald Heigl
2010-02-12 19:22     ` Ray Morris
2010-02-13  7:13       ` Harald Heigl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265989079.22562.0@raydesk1.bettercgi.com \
    --to=support@bettercgi.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.