Bug 839811 - Invalid snapshot incorrectly set the first attribute flag to 'S'
Invalid snapshot incorrectly set the first attribute flag to 'S'
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.5
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Alasdair Kergon
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-12 18:25 EDT by benscott
Modified: 2013-02-21 03:11 EST (History)
12 users (show)

See Also:
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 03:11:40 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-07-12 18:25:50 EDT
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 19:19:13 EDT
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 14:42:31 EDT
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 06:21:44 EST
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 03:11:40 EST
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

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