What version of the lvm RPM are you running? We have run into a problem on a
CentOS 6 installation where LVM would not put online disks that were read only.
The bug started at a version that I unfortunately forgot and was fixed in a
newer version that I forgot as well. But I managed to find one of the versions
that was wrong, which was lvm2-2.02.87-6. At that time we were on CentOS and
did not have support contract with Red Hat so we just rolled a custom RPM with
a patch which I was able to find:
--- ./lib/device/dev-io.c.orig 2012-08-31 03:45:14.000000000 -0400
+++ ./lib/device/dev-io.c 2012-08-31 03:46:22.000000000 -0400
@@ -282,7 +282,7 @@ static int _dev_read_ahead_dev(struct de
return 1;
}
- if (!dev_open(dev))
+ if (!dev_open_readonly(dev))
return_0;
if (ioctl(dev->fd, BLKRAGET, &read_ahead_long) < 0) {
The project where we needed this got cancelled so I have not followed up
whether Red Hat fixed it or not, but this should give you some leads.
HTH,
Tomas