Bug 1399292 - lvreduce succeeded on a cached LV
Summary: lvreduce succeeded on a cached LV
Keywords:
Status: POST
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.167
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-28 17:06 UTC by rasoso
Modified: 2023-08-10 15:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

Description rasoso 2016-11-28 17:06:36 UTC
Description of problem:

(This comes after a discussion on irc.)
lvreduce succeeded on a cached LV, although this is not fully supported yet.
This resulted in <LV> and <LV>_corig having different sizes.
The cache cannot be removed anymore ("Command failed with status code 5." for lvconvert, lvremove).

Version-Release number of selected component (if applicable):

# lvreduce --version
LVM version:     2.02.167(2) (2016-11-05)
Library version: 1.02.136 (2016-11-05)
Driver version:  4.35.0
(packages from debian release "stretch")


How reproducible:

Did not try to reproduce.

Actual results:

# lvs -a
LV                  VG        Attr       LSize   Pool          Origin       Data%  Meta%  Move Log Cpy%Sync Convert
[DataLVcache]       vg Cwi---C--- 450.00g                            3.55   8.36            0.00
[DataLVcache_cdata] vg Cwi-ao---- 450.00g
[DataLVcache_cmeta] vg ewi-ao----   1.00g
home                vg Cwi-aoC---   2.00t [DataLVcache] [home_corig] 3.55   8.36            0.00
[home_corig]        vg owi-aoC---   3.62t
[lvol0_pmspare]     vg ewi-------   1.00g
root                vg -wi-ao----   8.38g
swap_1              vg -wi-ao----  11.75g
var                 vg -wi-ao----   2.79g

home is 2.00t after lvreduce, whereas [home_corig] is still 3.62t


Expected results:
- The "lvreduce" command should warn that the operation is not fully supported yet, and should fail.
- home and [home_corig] volumes should keep the same size
- subsequent commands to remove the cache should not fail with "Command failed with status code 5."

Additional info:
Thanks to kabi_ for help on irc.

Comment 2 Zdenek Kabelac 2017-01-10 08:46:21 UTC
Fixed upstream: 

https://www.redhat.com/archives/lvm-devel/2017-January/msg00010.html


Note You need to log in before you can comment on or make changes to this bug.