[linux-lvm] Possible bug in expanding thinpool: lvextend doens't expand the top-level dm-linear device

M.H. Tsai mingnus at gmail.com
Mon Jan 4 05:08:44 UTC 2016


2016-01-03 7:05 GMT+08:00 Zdenek Kabelac <zkabelac at redhat.com>:
> Dne 1.1.2016 v 19:10 M.H. Tsai napsal(a):
>> 2016-01-01 5:25 GMT+08:00 Zdenek Kabelac <zkabelac at redhat.com>:
>>> There is even sequencing problem with creating snapshot in kernel target
>>> which needs to be probably fixed first.
>>> (the rule here should be - to never create/allocate something when
>>> there is suspended device

Excuse me, does the statement
'to never create/allocate something when there is suspended device'
describes the case that the thin-pool is full, and the volume is
'suspend with no flush' ? Because there's no free blocks for
allocation.

Otherwise, it would be strange if we cannot do these operations when
the pool is not full.

>>> and this rule is broken with current thin
>>> snapshot creation, so thin snap create message should go in front
>>> to ensure there is a space in thin-pool ahead of origin suspend  - will
>>> be addressed in some future version....)
>>>
>>> However when taking snapshot - only origin thin LV is now suspended and
>>> should not influence rest of thin volumes (except for thin-pool commit
>>> points)
>>
>> Does that mean in future version of dm-thin, the command sequence of
>> snapshot creation will be:
>>
>> dmsetup message /dev/mapper/pool 0 "create_snap 1 0"
>> dmsetup suspend /dev/mapper/thin
>> dmsetup resume /dev/mapper/thin
>>
> Possibly different message - since everything must remain
> fully backward compatible (i.e. create_snap_on_suspend,
> or maybe some other mechanism will be there).
> But yes something in this direction...

I'm not well understood. Is the new message designed for the case that
thin-pool is nearly full?
Because the pool's free data blocks might not sufficient for 'suspend
with flush' (i.e., 'suspend with flush' might failed if the pool is
nearly full), so we should move the create_snap message before
suspending. However, the created snapshots are inconsistent.
If the pool is full, then there's no difference between taking
snapshots before or after 'suspend without flush'.
Is that right?


Thanks,
Ming-Hung Tsai




More information about the linux-lvm mailing list