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
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.
Adding QA ack for 6.4. Devel will need to provide unit testing results however before this bug can be ultimately verified by QA.
http://git.fedorahosted.org/git/?p=lvm2.git;a=commit;h=4dbf872a9fc0aac34f73fd8214cc75846554e501
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.
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