LVM2 and Read-Only Backing Devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Summary: should LVM2 report a VG as read-only if constructed from PVs
on read-only devices?

I've got a block device (an md-raid array actually) that is, for other
reasons, being assembled as read-only right now.  There are two
relevant filesystems on it:

* an ext4 FS directly on a partition on the device
* an ext4 FS on a LVM2 VG created from a PV on another partition on the device

When I mount the ext4 FS from the raw partition, mount sees that the
device is read-only and mounts it read-only.  So far so good.

When I mount the ext4 FS from the LVM2 VG, mount sees the VG as
read-write.  Indeed, vgdisplay shows that the VG is marked as
read-write.  This causes mount to try to mount the filesystem in
read-write mode.  The first thing that this does it cause a journal
replay which fails a few writes at the kernel block layer, resulting
in some scary-looking kernel spew about lost writes before the FS is
remounted in read-only mode.

My question is: is the behavior of the VG being marked read-write in
this case expected behavior?  If not, what's the most expedient way to
fix this?  I'd like to see that a VG that includes one or more PVs
located on read-only devices be automatically marked read-only,
instead.

Thanks,
-John Sheu

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux