[linux-lvm] pvs complains of missing PVs that are not missing
prajnoha at redhat.com
Thu Oct 10 18:38:03 UTC 2013
On 10/10/2013 05:04 PM, Joe Harvell wrote:
> Le 09/10/2013 18:30, matthew patton a écrit :
>>> So I should set 'obtain_device_list_from_udev' to 0, then pvscan, vgscan
>>> and lvscan?
>> worth a shot. have you confirmed that udev has all the basic disk
>> devices created?
> I tried that to no avail. Yes, all the block devices were present in
> /dev, both for the raw partitions and the RAID ones.
> Does anyone know the algorithm LVM uses to determine whether PVs are
> present? Also, I'd really like an LVM tool that reads the PV label off
> of a PV and displays it...I want to see what UUID label is actually on
> each PV.
Two important questions here - which distro is this?
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). The latter one
is controlled by use_lvmetad setting. The lvmetad (and metadata cache) has
been added to LVM just recently, while the device cache is there for a long
As for the other important question:
Is lvmetad used or not? (check global/use_lvmetad lvm.conf setting).
If lvmetad is used, it gathers incoming PVs based on events which means
once the PV is available in the system, lvmetad gets notified automatically.
Then the PV is scanned for LVM metadata and lvmetad stores that information.
This information is then reused for each LVM command call instead of scanning
the /dev again and again for PVs. The lvmetad requires udev for its operation!
If lvmetad is used, does pvscan --cache call help?
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 it's enabled, we get the list of block devices from udev database
(which is a bit quicker as we don't need to iterate over all the content of
/dev and decide which item is a block device or not, saving a bit of time
More information about the linux-lvm