Bug 1398863

Summary: LVM docs incorrectly mention snapshot tagging as not possible.
Product: Red Hat Enterprise Linux 6 Reporter: John Pittman <jpittman>
Component: doc-Logical_Volume_ManagerAssignee: Steven J. Levine <slevine>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: adstrong, agk, jbrassow, msnitzer, rhel-docs
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-30 14:18:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description John Pittman 2016-11-26 19:01:30 UTC
Document URL: 

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/lvm_tags.html

Section Number and Name: 

Appendix D. LVM Object Tags

Describe the issue: 

The document incorrectly describes lvm snapshot tagging as not possible.

Excerpt:

"Only objects in a volume group can be tagged. Physical volumes lose their tags if they are removed from a volume group; this is because tags are stored as part of the volume group metadata and that is deleted when a physical volume is removed. Snapshots cannot be tagged."

Per https://www.redhat.com/archives/linux-lvm/2012-April/msg00032.html this works and is supported.

Suggestions for improvement: 

Remove the last sentence from the mentioned paragraph.

Comment 2 Jonathan Earl Brassow 2016-11-28 21:56:01 UTC
Yes, it works (for both snapshots and thinsnaps):

[root@bp-01 ~]# lvs vg
  LV   VG Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv   vg rwi-a-r--- 500.00m                                    100.00
[root@bp-01 ~]# lvs -o name,attr,size,segtype,tags vg
  LV   Attr       LSize   Type  LV Tags
  lv   rwi-a-r--- 500.00m raid1
[root@bp-01 ~]# lvcreate -s -L 500M -n snap vg/lv
  Using default stripesize 64.00 KiB.
  Logical volume "snap" created.
[root@bp-01 ~]# lvs -o name,attr,size,segtype,tags vg
  LV   Attr       LSize   Type   LV Tags
  lv   owi-aor--- 500.00m raid1
  snap swi-a-s--- 500.00m linear
[root@bp-01 ~]# lvchange --addtag foo vg/snap
  Logical volume vg/snap changed.
[root@bp-01 ~]# lvs -o name,attr,size,segtype,tags vg
  LV   Attr       LSize   Type   LV Tags
  lv   owi-aor--- 500.00m raid1
  snap swi-a-s--- 500.00m linear foo
[root@bp-01 ~]# lvcreate -T -L 5G -V50G -n thinLV --thinpool vg/tpool
  Using default stripesize 64.00 KiB.
  WARNING: Sum of all thin volume sizes (50.00 GiB) exceeds the size of thin pool vg/tpool (5.00 GiB)!
  For thin pool auto extension activation/thin_pool_autoextend_threshold should be below 100.
  Logical volume "thinLV" created.
[root@bp-01 ~]# lvs -o name,attr,size,segtype,tags vg
  LV     Attr       LSize   Type      LV Tags
  lv     owi-aor--- 500.00m raid1
  snap   swi-a-s--- 500.00m linear    foo
  thinLV Vwi-a-tz--  50.00g thin
  tpool  twi-aotz--   5.00g thin-pool
[root@bp-01 ~]# lvcreate -s -n thinSnap vg/thinLV
  Using default stripesize 64.00 KiB.
  WARNING: Sum of all thin volume sizes (100.00 GiB) exceeds the size of thin pool vg/tpool (5.00 GiB)!
  For thin pool auto extension activation/thin_pool_autoextend_threshold should be below 100.
  Logical volume "thinSnap" created.
[root@bp-01 ~]# lvs -o name,attr,size,segtype,tags vg
  LV       Attr       LSize   Type      LV Tags
  lv       owi-aor--- 500.00m raid1
  snap     swi-a-s--- 500.00m linear    foo
  thinLV   Vwi-a-tz--  50.00g thin
  thinSnap Vwi---tz-k  50.00g thin
  tpool    twi-aotz--   5.00g thin-pool
[root@bp-01 ~]# lvchange --addtag bar vg/thinSnap
  Logical volume vg/thinSnap changed.
[root@bp-01 ~]# lvs -o name,attr,size,segtype,tags vg
  LV       Attr       LSize   Type      LV Tags
  lv       owi-aor--- 500.00m raid1
  snap     swi-a-s--- 500.00m linear    foo
  thinLV   Vwi-a-tz--  50.00g thin
  thinSnap Vwi---tz-k  50.00g thin      bar
  tpool    twi-aotz--   5.00g thin-pool

Comment 3 Steven J. Levine 2016-11-29 11:30:30 UTC
Updated in draft. I will close this bz when the fix appears on the Portal.

Comment 4 Steven J. Levine 2016-11-30 14:18:02 UTC
The RHEL 6 copy of the LVM manual on the portal no longer includes the two mentions that tagging is not supported on snapshots.

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/lvm_tags.html