Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 839811

Summary: Invalid snapshot incorrectly set the first attribute flag to 'S'
Product: Red Hat Enterprise Linux 6 Reporter: benscott
Component: lvm2Assignee: Alasdair Kergon <agk>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.5CC: agk, cmarthal, coughlan, dwysocha, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, thornber, zkabelac
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.97-2.el6 Doc Type: Bug Fix
Doc Text:
lvs no longer capitalises the first LV attribute character for invalid snapshots. This state is available from the 5th char (I or S). (An 'S' in the first position is supposed to indicate only a merging snapshot.)
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:11:40 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:
Embargoed:

Description benscott 2012-07-12 22:25:50 UTC
Version-Release number of selected component (if applicable):

  LVM version:     2.02.96(2)-cvs (2012-03-06)
  Library version: 1.02.75-cvs (2012-03-06)
  Driver version:  4.22.0

When lvs displays an invalid snapshot the first column
of the attribute flags is set wrong for the snapshot.


1. Create a volume and a snapshot:

  LV       VG    Attr     LSize   Origin   Data%
  MyOrigin NewVg owi-a-s-   1.00g
  MySnap   NewVg swi-a-s- 500.00m MyOrigin 0.00


2. Fill it up untill it becomes invalid:

  LV       VG    Attr     LSize   Origin   Data%
  MyOrigin NewVg owi-a-s-   1.00g
  MySnap   NewVg Swi-I-s- 500.00m MyOrigin 100.00

Note that column one is a capital 'S' not 's'.
The capital is supposed to represent a merging
snapshot. It was originally used for invalid snaps
but was supposed to be changed when merging of snaps
was introduced.

3. The expected output would be:

  LV       VG    Attr     LSize   Origin   Data%
  MyOrigin NewVg owi-a-s-   1.00g
  MySnap   NewVg swi-I-s- 500.00m MyOrigin 100.00

Comment 2 Alasdair Kergon 2012-07-12 23:19:13 UTC
It does look like:
                                 repstr[0] = toupper(repstr[0]);
in lv.c serves no useful purpose now: the 5th position will either be I or S in those circumstances.

Comment 3 Corey Marthaler 2012-07-26 18:42:31 UTC
Adding QA ack for 6.4.

Devel will need to provide unit testing results however before this bug can be
ultimately verified by QA.

Comment 6 Nenad Peric 2013-01-28 11:21:44 UTC
Tested with

lvm2-2.02.98-8.el6.x86_64


(04:09:05) [root@r6-node01:~]$ lvs
  LV      VG       Attr      LSize  Pool Origin Data%  Move Log Cpy%Sync Convert
  lv_root VolGroup -wi-ao---  7.54g                                             
  lv_swap VolGroup -wi-ao---  1.97g                                             
  lvol0   vg       owi-a-s-- 20.00m                                             
  lvol1   vg       swi-a-s-- 20.00m      lvol0    0.00                

(04:10:23) [root@r6-node01:~]$ lvs
  LV      VG       Attr      LSize  Pool Origin Data%  Move Log Cpy%Sync Convert
  lv_root VolGroup -wi-ao---  7.54g                                             
  lv_swap VolGroup -wi-ao---  1.97g                                             
  lvol0   vg       owi-a-s-- 20.00m                                             
  lvol1   vg       swi-I-s-- 20.00m      lvol0  100.00                          

The attributes changed as expected to swi-I-s-- after snapshot is 100% full. 


Without lvmetad:
(04:19:48) [root@r6-node01:~]$ lvs
  /dev/vg/lvol1: read failed after 0 of 4096 at 20905984: Input/output error
  /dev/vg/lvol1: read failed after 0 of 4096 at 20963328: Input/output error
  /dev/vg/lvol1: read failed after 0 of 4096 at 0: Input/output error
  /dev/vg/lvol1: read failed after 0 of 4096 at 4096: Input/output error
  LV      VG       Attr      LSize  Pool Origin Data%  Move Log Cpy%Sync Convert
  lv_root VolGroup -wi-ao---  7.54g                                             
  lv_swap VolGroup -wi-ao---  1.97g                                             
  lvol0   vg       owi-a-s-- 20.00m                                             
  lvol1   vg       swi-I-s-- 20.00m      lvol0  100.00             




Marking Verified with a note that lvs should maybe try and suppress errors which are expected, and not wite those I/O errors.

Comment 7 errata-xmlrpc 2013-02-21 08:11:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0501.html