Linux LVM users
 help / color / mirror / Atom feed
From: "Jean Marie Ariès" <jeanmarie.aries@groupe-ips.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Understand the snapshot process
Date: Fri Jan  2 01:17:01 2004	[thread overview]
Message-ID: <3FF51A81.DC58AC89@groupe-ips.com> (raw)
In-Reply-To: 1072905045.15299.38.camel@grandmother.littlebald.com

Great !

Your explanation is perfect :o)

So, I understand better the use of a snapshot.

The /data contains files sharing with Samba. So, I think I can do one
snapshot per day at midnight, and remove it immediatly. If I have to restore
data for the snapshot, its's alway possible to mount the /dev/OVG/snap_admin
?

Thanks in advance and happy new year !

David Johnston a �crit :

> On Wed, 2003-12-31 at 02:17, Jean Marie Ari�s wrote:
> > Hi,
> >
> > I'm using LVM under SuSE Linux 8.0, and I don't understand all the
> > snapshot process.
> >
> > Our config is :
> > 2 disks 73 Go RAID 1
> > --> 1 VG "OVG" (60 GB)
> > --> 1 LV /dev/OVG/data (40 GB) mounted on /share/data
> >
> > To create a snapshot with ReiserFS, we do this:
> > Tux :# lvcreate -L30G -s -n snap_admin /dev/OVG/data
> >     and so, we mount the snapshot :
> > Tux :# mount /dev/OVG/snap_admin /share/snapshot
> >
> > At this point, the /share/snapshot contain a copy of the /share/data
> > directory.
> >
> > The How To say "Do the backup" for exemple with tar.
> >
> > My question is : Why we must to copy the data with a system command on
> > the snapshot ? Is a "create snapshot/remove snapshot" not possible ?
>
> Jean Marie,
> The snapshot is useful for narrowing a backup window, but is not useful
> as a backup.
>
> In other words, a backup can take hours while a snapshot takes seconds.
> This is possible because the snapshot creation process does not copy
> your data; it simply sets up a process that will track any future
> changes.
>
> Once you've created a snapshot, you can go back to work (restart your
> database, for example).  The data in the original LV (/dev/OVG/data)
> will change, but the data in /share/snapshot won't.  Once you've copied
> /share/snapshot/ somewhere safe, you remove the snapshot with lvremove.
> The How-To suggests tar, but other commands are possible.
>
> Why not leave the snapshot in place all the time?  Well, there are three
> reasons.
>
> 1) As long as the snapshot exists, writes to /dev/OVG/data will be
> slower than usual because they have to be done twice (once to record the
> new data in /dev/OVG/data, once to record the changes in
> /dev/OVG/snap_admin).
>
> 2)If you leave a snapshot in place long enough, it will run out of space
> to store the changes; once this happens, your snapshot is useless.  In
> the example you gave, you can make roughly 30GB worth of changes before
> the snapshot fills up.  You can extend the snapshot to the size of the
> original lv (40GB) but not beyond.
>
> 3) If the disk drive fails, both the original LV and the snapshot will
> be lost.
>
> I hope my explanation is clear and correct.  If not, somebody please let
> me know ;-)
> --
> David Johnston <david@littlebald.com>
> Little Bald Consulting, LLC
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

--
Sinc�rement,

Jean Marie Ari�s
Imprimeries IPS
Responsable Syst�mes/R�seaux

  reply	other threads:[~2004-01-02  1:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-31  1:19 [linux-lvm] Understand the snapshot process Jean Marie Ariès
2003-12-31 15:11 ` David Johnston
2004-01-02  1:17   ` Jean Marie Ariès [this message]
2004-01-02 10:40     ` David Johnston
2004-01-02 11:40       ` Jean Marie Ariès

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=3FF51A81.DC58AC89@groupe-ips.com \
    --to=jeanmarie.aries@groupe-ips.com \
    --cc=linux-lvm@sistina.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox