RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 863703 - Inconsistencies with flags of thin snapshots and origins
Summary: Inconsistencies with flags of thin snapshots and origins
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-06 18:33 UTC by benscott
Modified: 2014-11-26 07:34 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-25 18:16:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description benscott 2012-10-06 18:33:07 UTC
I have noticed inconsistencies in the flags with regard to
thin volumes. The first column of the flags is 'o' when a 
normal snapshot is taken of a thin volume but is 'V' when 
a thin snap is used. I haven't checked to see if 'O' is 
used for merging with thin snapshots.

The other issue I have run into is that a thin snapshot doesn't
put an 's' into column 1 or column 7. This makes parsing more
difficult since a thin volume and thin snap look the same in the
flags. It seems that one of the columns could be changed to
an 's' without losing any information. The first column also is
used for merging 'S' so that would probably be the best one.

~# lvs
  LV        VG      Attr      LSize   Pool     Origin    Data%  
  Pool_One  MyGroup twi-a-tz-   1.00g                      9.96
  fat_snap1 MyGroup swi-a-s-- 112.00m          thin_vol2   0.00
  thin_vol2 MyGroup owi-a-tz-   2.00g Pool_One             4.98


~# lvs
  LV         VG      Attr      LSize Pool     Origin    Data%   
  Pool_One   MyGroup twi-a-tz- 1.00g                      9.96
  thin_snap1 MyGroup Vwi-a-tz- 2.00g Pool_One thin_vol2   4.98
  thin_vol2  MyGroup Vwi-a-tz- 2.00g Pool_One             4.98



  LVM version:     2.02.98(2)-git (2012-08-24)
  Library version: 1.02.77-git (2012-08-24)
  Driver version:  4.22.0

Comment 2 Zdenek Kabelac 2012-10-08 12:19:00 UTC
It's worth to note here user should not be mistaking  old-style COW snapshots with new 'thin' snapshots - they are not the same in terms of reported data and behave differently in many areas.

Thus letter 's' should probably remain dedicated for old-style snaps. You cannot merge thin-snaps and you cannot get the 'real' size it takes.

The fact that thin volume is snapshot of some other volume is rather 'syntax sugar' here - since such volume is fully autonomous thin volume - you can  have it online/offline as you need (unlike with old snaps).

Comment 6 Zdenek Kabelac 2014-11-25 18:16:26 UTC
We are likely not going to change the behavior here.

Column 7 is target type - and target type really is (t)thin.
(s)napshot target segtype is dedicated to old-style snaps.
(lvcreate --type snapshot |  lvcreate --type thin)

Old-snaps and thin-snaps cannot be treated equally and also the lvm2 requires different treatment for those types.

If you need to check if 'thin' volume is still a snapshot - check presence of "Orig" field.

Comment 7 Peter Rajnoha 2014-11-26 07:34:29 UTC
Also, we've added separate fields for each lv_attr field recently in lvm2 v2.02.108 as well as additional fields that help with identification of the LV type in v2.02.110 (lv_layout and lv_role fields). These are much more readable than the lv_attr bits that provide condensed view only.


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