From: Xen <list@xenhideout.nl>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Reserve space for specific thin logical volumes
Date: Wed, 13 Sep 2017 20:43:03 +0200 [thread overview]
Message-ID: <f2e24a01b1e548b6b15db6d30596208b@xenhideout.nl> (raw)
In-Reply-To: <B6F45B41-86FC-4810-BC40-0EEE8DD9E372@redhat.com>
Brassow Jonathan schreef op 13-09-2017 1:25:
> I’m the manager of the LVM/DM team here at Red Hat.
Thank you for responding.
> 2) allow users to reserve some space for critical volumes when a
> threshold is reached
> #2 doesn’t seem crazy hard to implement - even in script form.
> - Add a “critical” tag to all thinLVs that are very important:
> # lvchange --addtag critical vg/thinLV
> - Create script that is called by thin_command, it should:
> - check if a threshold is reached (i.e. your reserved space) and if so,
> - report all lvs associated with the thin-pool that are NOT critical:
> # lvs -o name --noheadings --select 'lv_tags!=critical &&
> pool_lv=thin-pool’ vg
> - run <command> on those non-critical volumes, where <command> could
> be:
> # fsfreeze <mnt_point>
I think the above is exactly (or almost exactly) in agreement with the
general idea yes.
It uses filesystem tool to achieve it instead of allocation blocking (so
filesystem level, not DM level).
But if it does the same thing that is more important than having
'perfect' solution.
The issue with scripts is that they feel rather vulnerable to
corruption, not being there etc.
So in that case I suppose that you would want some default, shipped
scripts that come with LVM as example for default behaviour and that are
also activated by default?
So fixed location in FHS for those scripts and where user can find then
and can install new ones.
Something similar to /etc/initramfs-tools/ (on Debian), so maybe
/etc/lvm/scripts/ and /usr/share/lvm/scripts/ or similar.
Also easy to adjust by each distribution if they wanted to.
If no one uses critical tag -- nothing happens, but if they do use it,
check unallocated space on critical volumes and sum it up to arrive at
threshold value?
Then not even a threshold value needs to be configured.
> If the above is sufficient, then great. If you’d like to see
> something like this added to the LVM repo, then you can simply reply
> here with ‘yes’ and maybe provide a sentence of what the scenario is
> that it would solve.
Yes. One obvious scenario is root on thin.
It's pretty mandatory for root on thin.
There is something else though.
You cannot set max size for thin snapshots?
This is part of the problem: you cannot calculate in advance what can
happen, because by design, mayhem should not ensue, but what if your
predictions are off?
Being able to set a maximum snapshot size before it gets dropped could
be very nice.
This behaviour is very safe on non-thin.
It is inherently risky on thin.
> (I know there are already some listed in this
> thread, but I’m wondering about those folks that think the script is
> insufficient and believe this should be more standard.)
You really want to be able to set some minimum free space you want per
volume.
Suppose I have three volumes of 10GB, 20GB and 3GB.
I may want the 20GB volume to be least important. The 3GB volume most
important. The 10GB volume in between.
I want at least 100MB free on 3GB volume.
When free space on thin pool drops below ~120MB, I want the 20GB volume
and the 10GB volumes to be frozen, no new extents for 30GB volume.
I want at least 500MB free on 10GB volume.
When free space on thin pool drops below ~520MB, I want the 20GB volume
to be frozen, no new extents for 20GB volume.
So I would get 2 thresholds and actions:
- threshold for 3GB volume causing all others to be frozen
- threshold for 10GB volume causing 20GB volume to be frozen
This is easily scriptable and custom thing.
But it would be nice if you could set this threshold in LVM per volume?
So the script can read it out?
100MB of 3GB = 3.3%
500MB of 10GB = 5%
3-5% of mandatory free space could be a good default value.
So the default script could also provide a 'skeleton' for reading the
'critical' tag and then calculating a default % of space that needs to
be free.
In this case there is a hierarchy:
3GB > 10GB > 20GB.
Any 'critical volume' could cause all others 'beneath it' to be frozen.
But the most important thing is to freeze or drop snapshots I think.
And to ensure that this is default behaviour?
Or at least provide skeletons for responding to thin threshold values
being reached so that the burden on the administrator is very minimal.
next prev parent reply other threads:[~2017-09-13 18:43 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 10:35 [linux-lvm] Reserve space for specific thin logical volumes Gionatan Danti
2017-09-08 11:06 ` Xen
2017-09-09 22:04 ` Gionatan Danti
2017-09-11 10:35 ` Zdenek Kabelac
2017-09-11 10:55 ` Xen
2017-09-11 11:20 ` Zdenek Kabelac
2017-09-11 12:06 ` Xen
2017-09-11 12:45 ` Xen
2017-09-11 13:11 ` Zdenek Kabelac
2017-09-11 13:46 ` Xen
2017-09-12 11:46 ` Zdenek Kabelac
2017-09-12 12:37 ` Xen
2017-09-12 14:37 ` Zdenek Kabelac
2017-09-12 16:44 ` Xen
2017-09-12 17:14 ` Gionatan Danti
2017-09-12 21:57 ` Zdenek Kabelac
2017-09-13 17:41 ` Xen
2017-09-13 19:17 ` Zdenek Kabelac
2017-09-14 3:19 ` Xen
2017-09-12 17:00 ` Gionatan Danti
2017-09-12 23:25 ` Brassow Jonathan
2017-09-13 8:15 ` Gionatan Danti
2017-09-13 8:33 ` Zdenek Kabelac
2017-09-13 18:43 ` Xen [this message]
2017-09-13 19:35 ` Zdenek Kabelac
2017-09-14 5:59 ` Xen
2017-09-14 19:05 ` Zdenek Kabelac
2017-09-15 2:06 ` Brassow Jonathan
2017-09-15 6:02 ` Gionatan Danti
2017-09-15 8:37 ` Xen
2017-09-15 7:34 ` Xen
2017-09-15 9:22 ` Zdenek Kabelac
2017-09-16 22:33 ` Xen
2017-09-17 6:31 ` Xen
2017-09-17 7:10 ` Xen
2017-09-18 19:20 ` Gionatan Danti
2017-09-20 13:05 ` Xen
2017-09-21 9:49 ` Zdenek Kabelac
2017-09-21 10:22 ` Xen
2017-09-21 13:02 ` Zdenek Kabelac
2017-09-21 14:34 ` [linux-lvm] Clarification (and limitation) of the kernel feature I proposed Xen
2017-09-21 14:49 ` [linux-lvm] Reserve space for specific thin logical volumes Xen
2017-09-21 20:32 ` Zdenek Kabelac
2017-09-18 8:56 ` Zdenek Kabelac
2017-09-11 14:00 ` Xen
2017-09-11 17:34 ` Zdenek Kabelac
2017-09-11 15:31 ` Eric Ren
2017-09-11 15:52 ` Zdenek Kabelac
2017-09-11 21:35 ` Eric Ren
2017-09-11 17:41 ` David Teigland
2017-09-11 21:08 ` Eric Ren
2017-09-11 16:55 ` David Teigland
2017-09-11 17:43 ` Zdenek Kabelac
2017-09-11 21:59 ` Gionatan Danti
2017-09-12 11:01 ` Zdenek Kabelac
2017-09-12 11:34 ` Gionatan Danti
2017-09-12 12:03 ` Zdenek Kabelac
2017-09-12 12:47 ` Xen
2017-09-12 13:51 ` pattonme
2017-09-12 14:57 ` Zdenek Kabelac
2017-09-12 16:49 ` Xen
2017-09-12 16:57 ` Gionatan Danti
[not found] <832949972.1610294.1505170613541.ref@mail.yahoo.com>
2017-09-11 22:56 ` matthew patton
2017-09-12 5:28 ` Gionatan Danti
[not found] <1806055156.426333.1505228581063.ref@mail.yahoo.com>
2017-09-12 15:03 ` matthew patton
2017-09-12 17:09 ` Gionatan Danti
2017-09-12 22:41 ` Zdenek Kabelac
2017-09-12 22:55 ` Gionatan Danti
2017-09-12 23:11 ` Zdenek Kabelac
[not found] <418002318.647314.1505245480415.ref@mail.yahoo.com>
[not found] ` <418002318.647314.1505245480415@mail.yahoo.com>
2017-09-12 21:36 ` Gionatan Danti
2017-09-12 22:16 ` Zdenek Kabelac
2017-09-12 22:41 ` Gionatan Danti
2017-09-12 23:02 ` Zdenek Kabelac
2017-09-12 23:15 ` Gionatan Danti
2017-09-12 23:31 ` Zdenek Kabelac
2017-09-13 8:21 ` Gionatan Danti
[not found] <1575245610.821680.1505258554456.ref@mail.yahoo.com>
2017-09-12 23:22 ` matthew patton
2017-09-13 7:53 ` Gionatan Danti
2017-09-13 8:15 ` Zdenek Kabelac
2017-09-13 8:28 ` Gionatan Danti
2017-09-13 8:44 ` Zdenek Kabelac
2017-09-13 10:46 ` Gionatan Danti
[not found] <691633892.829188.1505258696384.ref@mail.yahoo.com>
2017-09-12 23:24 ` matthew patton
[not found] <57374453.843393.1505261050977.ref@mail.yahoo.com>
2017-09-13 0:04 ` matthew patton
2017-09-13 7:10 ` Zdenek Kabelac
[not found] <1771452279.913055.1505269434212.ref@mail.yahoo.com>
2017-09-13 2:23 ` matthew patton
2017-09-13 7:25 ` Zdenek Kabelac
[not found] <498090067.1559855.1505338608244.ref@mail.yahoo.com>
2017-09-13 21:36 ` matthew patton
[not found] <914479528.2618507.1505463313888.ref@mail.yahoo.com>
2017-09-15 8:15 ` matthew patton
2017-09-15 10:01 ` Zdenek Kabelac
2017-09-15 18:35 ` Xen
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=f2e24a01b1e548b6b15db6d30596208b@xenhideout.nl \
--to=list@xenhideout.nl \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).