Mailinglist Archive: opensuse-bugs (4292 mails)

< Previous Next >
[Bug 1006952] LVM : LV displayed multiple times if cache_mode option is used for lvs
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Tue, 02 May 2017 06:21:11 +0000
  • Message-id: <>

zhen ren <zren@xxxxxxxx> changed:

What |Removed |Added
Resolution|--- |INVALID

--- Comment #17 from zhen ren <zren@xxxxxxxx> ---
(In reply to Ladislav Mate from comment #15)
sorry for delay. I might found why lv_var was displayed exactly 5 times for
vg00/lv_var and reason is LV was extended several times and its Segments are
spread to 5 physical locations on PV. I've tried to --uncache vg00/lv_root
and output is same also for vg00/lv_root and LV is shown 4 times as LV is
split in 4 Segments. So I performed 'sudo pvmove --alloc anywhere -n
/dev/vg00/lv_root /dev/sda /dev/sda' to tighty LV to one Segment, and after
another --cache & --uncache operation is all OK. Same applies also for
vg00/lv_var which looks normal now and it's displayed only once. If I split
LV to more segments again LV is display multiple times.

If you feel that this is OK , feel free to close this bug.

Hi Ladislav,

This issue can be replicated easily as below:

tw1:~ # vgcreate vgtest /dev/vdb1
Volume group "vgtest" successfully created
tw1:~ # lvcreate -L 3G -n lv1 vgtest
Logical volume "lv1" created.
tw1:~ # lvcreate -L 3G -n lv2 vgtest
Logical volume "lv2" created.
tw1:~ # lvextend -L +1G vgtest/lv1
Size of logical volume vgtest/lv1 changed from 3.00 GiB (768 extents) to
4.00 GiB (1024 extents).
Logical volume vgtest/lv1 successfully resized.
tw1:~ # lvs -o+cache_mode
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync
Convert CacheMode
lv1 vgtest -wi-a----- 4.00g
lv1 vgtest -wi-a----- 4.00g
lv2 vgtest -wi-a----- 3.00g


tw1:~ # lvs -o+cache_total_blocks
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync
Convert CacheTotalBlocks
lv1 vgtest -wi-a----- 4.00g
lv2 vgtest -wi-a----- 3.00g

This is by design, because "cache_mode" is under "Logical Volume Segment
Fields", every fields in this category will be displayed per "segment" as
you've pointed out. See:

tw1:~ # lvs -o help
Logical Volume Device Status Fields
cache_total_blocks - Total cache blocks.
Logical Volume Segment Fields
cache_mode - For cache, how writes are cached.

So close as INVALID. Thanks for your report and contribution!

You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >