Description of problem: There is a bug in LVM that appears somewhere around version 2.02.84 (2.02.83 works fine) and is fixed in 2.02.97. All versions between those two suffer from this bug. Here is how it manifests itself: if the physical volumes are on read only disks, then vgchange will produce this error: [root@QAGrid04 ~]# vgchange -ay /dev/dasdf1: open failed: Read-only file system /dev/dasdf1: open failed: Read-only file system device-mapper: reload ioctl failed: Invalid argument 1 logical volume(s) in volume group "v-9c0ed7a0-1271-452a-9342-60dacafe5d17" now active And the volumegroup is not activated (despite what the messages said). The cause of the bug is a change in architecture, where lib/device/dev-io.c has a function called dev_open which was later split into dev_open and dev_open_readonly. Looks like someone forgot to change dev_open to dev_open_readonly in _dev_read_ahead_dev which is the cause of this bug. The 2.02.97 version has the call changed to dev_open_readonly. Version-Release number of selected component (if applicable): lvm2-2.02.87-6.el6 How reproducible: Every time. Steps to Reproduce: 1. Create a volume group 2. Make the media read-only 3. Attempt to activate the volume group Actual results: See above Expected results: The volume group should be activated. Additional info:
This probably represents a "regression" and loss of prior functionality, in that it is a loss of function, compared to the LVM2 that shipped earlier in the RHEL 6 lifecycle
I see http://rhn.redhat.com/errata/RHBA-2012-1399.html issued today, without this regression fix. Any change of getting it slated into the 6.4 update cycle? -- Russ herrold
6.4 is based upon 2.02.98, so this fix should already be included.
Checked the VG activation with a write protect on one of the disks. No errors issued, and VG was activated: sd 10:0:0:1: [sdb] Write Protect is on (07:43:14) [root@r6-node01:~]$ lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert lv_root VolGroup -wi-ao--- 7.54g lv_swap VolGroup -wi-ao--- 1.97g mylv vg_one -wi------ 2.00g second_lv vg_one -wi------ 5.00g (07:44:00) [root@r6-node01:~]$ pvs PV VG Fmt Attr PSize PFree /dev/sda1 vg_one lvm2 a-- 9.99g 7.99g /dev/sdb1 vg_one lvm2 a-- 9.99g 4.99g /dev/vda2 VolGroup lvm2 a-- 9.51g 0 (07:44:00) [root@r6-node01:~]$ vgchange -ay vg_one 2 logical volume(s) in volume group "vg_one" now active (07:44:11) [root@r6-node01:~]$ lvs -a -o +devices LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert Devices lv_root VolGroup -wi-ao--- 7.54g /dev/vda2(0) lv_swap VolGroup -wi-ao--- 1.97g /dev/vda2(1930) mylv vg_one -wi-a---- 2.00g /dev/sda1(0) second_lv vg_one -wi-a---- 5.00g /dev/sdb1(0) Tested with: lvm2-2.02.98-2.el6.x86_64 lvm2-libs-2.02.98-2.el6.x86_64 kernel-2.6.32-335.el6.x86_64
Marking as verified based on my previous comment :)
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