From: Andreas Dilger <adilger@turbolabs.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Keep snapshots active for 24 hours?
Date: Sat Dec 15 00:31:02 2001 [thread overview]
Message-ID: <20011214233254.F855@lynx.no> (raw)
In-Reply-To: <wxxn10lcn70.fsf@nommo.uio.no>; from terjekv@math.uio.no on Sat, Dec 15, 2001 at 02:00:03AM +0100
On Dec 15, 2001 02:00 +0100, Terje Kvernes wrote:
> * Andreas Dilger
> > If you were really clever, you could write a script which checked
> > the free space in the snapshots every minute, and if they had less
> > than X PEs free, you extend the snapshot LV to have more free space.
> > If you run out of free PEs, you delete the oldest snapshot.
>
> heh. I was thinking of trying to get a snapshot taken every three
> hours or so, and storing it until the next one came about. but of
> course, you're right, I should check how much free space I have, and
> keep a backlog until I _need_ the space.
>
> come to think of it, it doesn't take that complicated a shell-script
> to get this working. hm... :)
In fact, the LVM snapshots have a facility where you can have it wake a
process when the snapshot is more than X percent full. You probably
couldn't do it with a shell script (it is an ioctl), but you could
either write a simple executable (e.g. lvmsnapwait 95 /dev/vgtest/lvtest),
or do it with Perl (there is a Perl ioctl module, whose name I have
forgotten).
This avoids polling for lots of snapshots of lots of LVs, and also prevents
you from over-committing PEs to snapshots.
Note that there is a system-wide hard limit of 255 LVs (ABS_MAX_LV). The
problem is that LVM only has a single block major number, with 256 minor
numers, so you might have to do some kernel/tool hackery to exceed that.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
prev parent reply other threads:[~2001-12-15 0:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-14 6:33 [linux-lvm] Keep snapshots active for 24 hours? Dave Alden
2001-12-14 12:36 ` Andreas Dilger
2001-12-14 15:50 ` Steve Wray
2001-12-14 16:34 ` Andreas Dilger
2001-12-14 17:05 ` Steve Wray
2001-12-14 19:03 ` [linux-lvm] catch-22 Erick Calder
2001-12-16 13:36 ` Wolfgang Weisselberg
2001-12-16 13:36 ` [linux-lvm] Keep snapshots active for 24 hours? Wolfgang Weisselberg
2001-12-16 16:08 ` Kirby C. Bohling
2001-12-16 18:53 ` Petro
2001-12-16 21:12 ` Wolfgang Weisselberg
2001-12-16 22:19 ` Steve Wray
2001-12-17 2:41 ` Wolfgang Weisselberg
2001-12-17 3:08 ` Anselm Kruis
2001-12-14 18:58 ` Terje Kvernes
2001-12-15 0:31 ` Andreas Dilger [this message]
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=20011214233254.F855@lynx.no \
--to=adilger@turbolabs.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