[linux-lvm] Reserve space for specific thin logical volumes

Xen list at xenhideout.nl
Wed Sep 20 13:05:06 UTC 2017


Gionatan Danti schreef op 18-09-2017 21:20:

> Xen, I really think that the combination of hard-threshold obtained by
> setting thin_pool_autoextend_threshold and thin_command hook for
> user-defined script should be sufficient to prevent and/or react to
> full thin pools.

I will hopefully respond to Zdenek's message later (and the one before 
that that I haven't responded to),

> I'm all for the "keep it simple" on the kernel side.

But I don't mind if you focus on this,

> That said, I would like to see some pre-defined scripts to easily
> manage pool fullness. (...) but I would really
> like the standardisation such predefined scripts imply.

And only provide scripts instead of kernel features.

Again, the reason I am also focussing on the kernel is because:

a) I am not convinced it cannot be done in the kernel
b) A kernel feature would make space reservation very 'standardized'.

Now I'm not convinced I really do want a kernel feature but saying it 
isn't possible I think is false.

The point is that kernel features make it much easier to standardize and 
to put some space reservation metric in userland code (it becomes a 
default feature) and scripts remain a little bit off to the side.

However if we *can* standardize on some tag or way of _reserving_ this 
space, I'm all for it.

I think a 'critical' tag in combination with the standard 
autoextend_threshold (or something similar) is too loose and ill-defined 
and not very meaningful.

In other words you would be abusing one feature for another purpose.

So I do propose a way to tag volumes with a space reservation (turning 
them cricical) or alternatively to configure a percentage of reserved 
space and then merely tag some volumes as critical volumes.

I just want these scripts to be such that you don't really need to 
modify them.

In other words: values configured elsewhere.

If you think that should be the thin_pool_autoextend_threshold, fine, 
but I really think it should be configured elsewhere (because you are 
not using it for autoextending in this case).

thin_command is run every 5%:

https://www.mankier.com/8/dmeventd

You will need to configure a value to check against.

This is either going to be a single, manually configured, fixed value 
(in % or extents)

Or it can be calculated based on reserved space of individual volumes.

So if you are going to have a kind of "fsfreeze" script based on 
critical volumes vs. non-critical volumes I'm just saying it would be 
preferable to set the threshold at which to take action in another way 
than by using the autoextend_threshold for that.

And I would prefer to set individual space reservation for each volume 
even if it can only be compared to 5% threshold values.

So again: if you want to focus on scripts, fine.




More information about the linux-lvm mailing list