This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 863703 - Inconsistencies with flags of thin snapshots and origins
Inconsistencies with flags of thin snapshots and origins
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Zdenek Kabelac
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-06 14:33 EDT by benscott
Modified: 2014-11-26 02:34 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-11-25 13:16:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description benscott 2012-10-06 14:33:07 EDT
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 08:19:00 EDT
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 13:16:26 EST
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 02:34:29 EST
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.