linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>,
	Gionatan Danti <g.danti@assyoma.it>
Subject: Re: [linux-lvm] Reserve space for specific thin logical volumes
Date: Tue, 12 Sep 2017 14:03:32 +0200	[thread overview]
Message-ID: <b51c8dfd-bdd0-2e38-cc47-bef358bbc8e6@redhat.com> (raw)
In-Reply-To: <e3bc609f-a1fd-e2e8-e431-4820cd9f9487@assyoma.it>

Dne 12.9.2017 v 13:34 Gionatan Danti napsal(a):
> On 12/09/2017 13:01, Zdenek Kabelac wrote:
>> There is very good reason why thinLV is fast - when you work with thinLV -
>> you work only with data-set for single thin LV.
>>
>>
>> Sad/bad news here - it's not going to work this way....
> 
> No, I absolutely *do not want* thinp to automatically dallocate/trash some 
> provisioned blocks. Rather, I all for something as "if free space is lower 
> than 30%, disable new snapshot *creation*"
> 



# lvs -a
   LV              VG Attr       LSize  Pool Origin Data%  Meta%  Move Log 
Cpy%Sync Convert
   [lvol0_pmspare] vg ewi-------  2,00m 

   lvol1           vg Vwi-a-tz-- 20,00m pool        40,00 

   pool            vg twi-aotz-- 10,00m             80,00  1,95 

   [pool_tdata]    vg Twi-ao---- 10,00m 

   [pool_tmeta]    vg ewi-ao----  2,00m 

[root@linux export]# lvcreate -V10 vg/pool
   Using default stripesize 64,00 KiB.
   Reducing requested stripe size 64,00 KiB to maximum, physical extent size 
32,00 KiB.
   Cannot create new thin volume, free space in thin pool vg/pool reached 
threshold.

# lvcreate -s vg/lvol1
   Using default stripesize 64,00 KiB.
   Reducing requested stripe size 64,00 KiB to maximum, physical extent size 
32,00 KiB.
   Cannot create new thin volume, free space in thin pool vg/pool reached 
threshold.

# grep thin_pool_autoextend_threshold /etc/lvm/lvm.conf
	# Configuration option activation/thin_pool_autoextend_threshold.
	# thin_pool_autoextend_threshold = 70
	thin_pool_autoextend_threshold = 70

So as you can see - lvm2 clearly prohibits you to create a new thinLV
when you are above defined threshold.


To keep things single for a user - we have a single threshold value.


So what else is missing ?


>> lvm2 also DOES protect you from creation of new thin-pool when the fullness
>> is about lvm.conf defined threshold - so nothing really new here...
> 
> Maybe I am missing something: this threshold is about new thin pools or new 
> snapshots within a single pool? I was really speaking about the latter.

Yes - threshold applies to 'extension' as well as to creation of new thinLV.
(and snapshot is just a new thinLV)

> Let me repeat: I do *not* want thinp to automatically drop anything. I simply 
> what it to disallow new snapshot/volume creation when unallocated space is too 
> low

as said - already implemented....

  Committed (fsynced) writes are safe, and this is very good. However, *many*
> application do not properly issue fsync(); this is a fact of life.
> 
> I absolutely *do not expect* thinp to automatically cope well with this 
> applications - I full understand & agree that application *must* issue proper 
> fsyncs.
> 

Unfortunatelly lvm2 nor dm  can be responsible for whole kernel logic and
all user-land apps...


Yes - anonymous pages cache is somewhat Achilles' heel - but it's not a 
problem of thin-pool - all other 'provisioning' systems has some troubles....

So we really cannot fix it here.

You would need to prove that different strategy is better and fix linux kernel 
for this.

Until this moment - you need use well written user-land apps :) properly 
syncing written data - or not use thin-provisioning (and others).

You can also minimize amount of 'dirty' pages to avoid loosing too much data
in case you hit full thin-pool unexpectedly.....

You can sync every second to minimize amount of dirty pages....

Lots of things....  all of them will in some other the other impact system 
performance....


> In the past, I testified that XFS take its relatively long time to recognize 
> that a thin volume is unavailable - and many async writes can be lost in the 
> process. Ext4 + data=journaled did a better job, but a) it is not the default 
> filesystem in RH anymore and b) data=journaled is not the default option and 
> has its share of problems.

journaled is very 'secure' - but also very slow....

So depends what you aim for.

But this really cannot be solved on DM side...

> So, if in the face of a near-full pool, thinp refuse me to create a new 
> filesystem, I would be happy :)

So you are already happy right  :) ?
Your wish is upstream already for quite some time ;)

Regards

Zdenbek

  reply	other threads:[~2017-09-12 12:03 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
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 [this message]
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=b51c8dfd-bdd0-2e38-cc47-bef358bbc8e6@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=g.danti@assyoma.it \
    --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).