[DRBD-user] drbd9: drbdmanage.storage.lvm_thinlv.LvmThinLv plugin - free space calculation still wrong (drbdmanage update-pool)

Roberto Resoli roberto at resolutions.it
Thu Oct 12 13:33:46 CEST 2017

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Il 11/10/2017 14:57, Alexander Barton ha scritto:
> Hi!
> 
> Am 09.10.2017 um 15:35 schrieb Robert Altnoeder
> <robert.altnoeder at linbit.com>:
> 
>> On 10/09/2017 11:04 AM, Roberto Resoli wrote:
>>
>>> I currently remove snap_percent from used space in "update_pool"
>>> function inside
>>>
>>> /usr/lib/python2.7/dist-packages/drbdmanage/storage/lvm_thinlv.py
>> It is quite interesting that you even get any values in this column that
>> could then mess up your results.
>> I just tested this on three different installations (Debian 8, Ubuntu
>> 16.04, CentOS 7.3), and none of them even reports any values for the
>> snap_percent field, neither for the thinpool nor for any volumes or
>> snapshots inside the pool.
>>
>> We are still trying to figure out what LVM is supposed to report for
>> which one of all those values.
> 
> We are seeing the same problem here and are applying the patch below
> to all of our installations.

More or less the same here. My patch is much more rudimentary: it
consists simply in ignoring snap_used:

- space_used = data_used + snap_used
+ space_used = data_used

The concept of your patch is correct, and to my knowledge is a good
candidate for the final one.

For thin lv inside a thin pool the snap_percent column value should not
have a role in free space calculation inside the pool.

bye
rob




More information about the drbd-user mailing list