[linux-lvm] pvs complains of missing PVs that are not missing

Peter Rajnoha prajnoha at redhat.com
Thu Oct 10 18:48:52 UTC 2013

On 10/10/2013 08:38 PM, Peter Rajnoha wrote:
> There are two notions of cache in LVM. One is device cache, the other one
> is metadata cache. The first one is controlled by write_cache_state setting
> (which is obsoleted by obtaining the device list from udev).
> If lvmetad is not used, whenever the LVM command is executed, each
> block device in /dev is scanned for PV labels, every time! Here,
> the obtain_device_list_from_udev lvm.conf setting makes a difference
> in a way how we get the list of block devices - if this setting is
> disabled, LVM directly scans all the /dev content and it selects block devices
> itself.

...if LVM selects block devices itself, it can cache this 'selection' by using
'write_cache_state=1' - LVM will write this list of block devices to a cache
file which is read next time, hence LVM does not need to select them once again
on next command execution. Of course, this cache file is of no use when
'obtain_device_list_from_udev=1' and we get that list of block devices from
udev all the time... that's the reason why 'obtain_device_list_from_udev=1'
obsoletes 'write_cache_state=1'. This is the *device cache* - either from udev
or from file written by LVM itself.


More information about the linux-lvm mailing list