Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Thu, May 19, 2016 at 12:48:00PM +0200, Roberto Resoli wrote: > Il 12/05/2016 17:58, Gaudenz Steinlin ha scritto: > > > > Hi > > Hi > > > I ran into the same problem someone > > else previously reported here today: > > http://lists.linbit.com/pipermail/drbd-user/2016-May/022909.html > > that's me, and others before > > > I then looked into the code to better understand how drbdmanage > > calculates the free space and discocered that the code makes wrong > > assumptions about how lvmthin metadata allocation works. As described in > > the lvmthin(7) manpage a thin pool lv actually consists of 2 hidden > > lv's, one for the actual data and another much smaller one for metadata. > > > > But the code in storage/lvm_thinlv.py calculates the free space as > > > > total_space - %data_used*total_space - %metadata_used*total_space - %snap_used*total_space > > > > Where total_space is the size of the data LV on the thin pool lv. > > > > This is wrong because metadata is not allocated from the data lv and > > should not be considered in this calculation. I had a thin pool which > > was 50% full and the metadata was also 50% which resulted in 0 free > > space :-(. See below for the actual relevant code. > > > > IMO the free space should be calculated without even considering > > metadata space used. If you want to make sure that there is enough > > metadata space available this needs to be done in a separate > > calculation. > > > > I verified that removing meta_used on line 285 solves the problem and > > drbdmanage then reports the correct free space. > > You are right, imho. Will be fixed with 0.96, which is planed for next week. Regards, rck