linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: LVM general discussion and development <linux-lvm@redhat.com>,
	Xen <list@xenhideout.nl>
Subject: Re: [linux-lvm] Reserve space for specific thin logical volumes
Date: Mon, 11 Sep 2017 19:34:18 +0200	[thread overview]
Message-ID: <14ec0303-5e4e-3100-7d0b-251532717ecc@gmail.com> (raw)
In-Reply-To: <d834399d42da2d585673e8e24a8a9383@xenhideout.nl>

Dne 11.9.2017 v 16:00 Xen napsal(a):
> Just responding to second part of your email.
> 
>>> Only manual intervention this one... and last resort only to prevent crash 
>>> so not really useful in general situation?
>>
>> Let's simplify it for the case:
>>
>> You have  1G thin-pool
>> You use 10G of thinLV on top of 1G thin-pool
>>
>> And you ask for 'sane' behavior ??
> 
> Why not? Really.

Because all filesystems put on top of thinLV  do believe all blocks on the 
device actually exist....

>> Any idea of having 'reserved' space for 'prioritized' applications and
>> other crazy ideas leads to nowhere.
> 
> It already exists in Linux filesystems since long time (root user).

Did I say you can't compare filesystem problem with block level problem ?
If not ;) let's repeat - being out of space in a single filesystem
is completely different fairy-tail with out of space thin-pool.

> 
>> Actually there is very good link to read about:
>>
>> https://lwn.net/Articles/104185/
> 
> That was cute.
> 
> But we're not asking aeroplane to keep flying.
IMHO you just don't yet see the parallelism....


>> And we believe it's fine to solve exceptional case  by reboot.
> 
> Well it's hard to disagree with that but for me it might take weeks before I 
> discover the system is offline.

IMHO it's problem of proper monitoring.

Still the same song here - you should actively trying to avoid car-collision, 
since trying to resurrect often seriously injured or even dead passenger from 
a demolished car is usually very complex job with unpredictable result...

We do put number of 'car-protection' safety mechanism - so the newer tools,
newer kernel the better -  but still when you hit the wall in top-speed
you can't expect you just 'walk-out' easily... and it's way cheaper to solve 
the problem in way you will NOT crash at all..

> 
> Otherwise most services would probably continue.
> 
> So now I need to install remote monitoring that checks the system is still up 
> and running etc.

Of course you do.

thin-pool needs attention/care :)

> If all solutions require more and more and more and more monitoring, that's 
> not good.

It's the best we can provide....


>> So don't expect lvm2 team will be solving this - there are more prio work....
> 
> Sure, whatever.
> 
> Safety is never prio right ;-).

We are safe enough (IMHO) to NOT loose committed data,
We cannot guarantee stable system though - it's too complex.
lvm2/dm can't be fixing extX/btrfs/XFS and other kernel related issues...
Bold men can step in - and fix it....


>> If the system volume IS that important - don't use it with over-provisiong!
> 
> System-volume is not overprovisioned.

If you have  enough blocks in thin-pool to cover all needed block for all 
thinLV attached to it - you are not overprovisioning.


> Just something else running in the system....


Use different pools ;)
(i.e. 10G system + 3 snaps needs  40G of data size & appropriate metadata size 
to be safe from overprovisioning)

> That will crash the ENTIRE SYSTEM when it fills up.
> 
> Even if it was not used by ANY APPLICATION WHATSOEVER!!!

Full thin-pool on recent kernel is certainly NOT randomly crashing entire 
system :)

If you think it's that case - provide full trace of crashed kernel and open BZ 
- just be sure you use upstream Linux...

> My system LV is not even ON a thin pool.

Again - if you reproduce on kernel 4.13 - open BZ and provide reproducer.
If you use older kernel - take a recent one and reproduce.

If you can't reproduce - problem has been already fixed.
It's then for your kernel provider to either back-port fix
or give you fixed newer kernel - nothing really for lvm2...


> It's way more practical solution the trying to fix  OOM problem :)
> 
> Aye but in that case no one can tell you to ensure you have auto-expandable 
> memory ;-) ;-) ;-) :p :p :p.

I'd probably recommend reading some books about how is memory mapped on a 
block device and what are all the constrains and related problems..

>>> Yes email monitoring would be most important I think for most people.
>> Put mail messaging into  plugin script then.
>> Or use any monitoring software for messages in syslog - this worked
>> pretty well 20 years back - and hopefully still works well :)
> 
> Yeah I guess but I do not have all this knowledge myself about all these 
> different kinds of softwares and how they work, I hoped that thin LVM would 
> work for me without excessive need for knowledge of many different kinds.

We do provide some 'generic' script - unfortunately - every use-case is 
basically pretty different set of rules and constrains.

So the best we have is 'auto-extension'
We used to trying to umount - but this has possibly added more problems then 
it has actually solved...

>>> I am just asking whether or not there is a clear design limitation that 
>>> would ever prevent safety in operation when 100% full (by accident).
>>
>> Don't user over-provisioning in case you don't want to see failure.
> 
> That's no answer to that question.

There is a lot of technical complexity behind it.....

I'd say the main part is -  'fs'  would need to be able to know understand
it's living on provisioned device (something we actually do not want to,
as you can change 'state' in runtime - so 'fs' should be aware & unaware
at the same time ;) -   checking with every request that thin-provisioning
is in the place would impact performance, doing in mount-time make it
also bad.

Then you need to deal with fact, that writes to filesystem are 'process' 
aware, while writes to block-device are some anonymous page writes for your 
page cache.
Have I said the level of problems for a single filesystem is totally different 
story yet ?

So in a simple statement  - thin-p has it's limits - if you are unhappy with 
them, then you probably need to look for some other solution - or starting
sending patches and improve things around...

> 
>> It's the same as you should not overcommit your RAM in case you do not
>> want to see OOM....
> 
> But with RAM I'm sure you can typically see how much you have and can thus 
> take account of that, filesystem will report wrong figure ;-).

Unfortunately you cannot....

Number of your free RAM is very fictional number ;) and you run in much bigger 
problems if you start overcommiting memory in kernel....

You can't compare your user-space failing malloc and OOM crashing Firefox....

Block device runs in-kernel - and as root...
There are no reserves, all you know is you need to write block XY,
you have no idea what is the block about..
(That's where ZFS/Btrfs was supposed to excel - they KNOW.... :)

Regard

Zdenek

  reply	other threads:[~2017-09-11 17:34 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 [this message]
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=14ec0303-5e4e-3100-7d0b-251532717ecc@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=linux-lvm@redhat.com \
    --cc=list@xenhideout.nl \
    /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).