[linux-lvm] auto_activation_volume_list in lvm.conf not honored

Peter Rajnoha prajnoha at redhat.com
Thu Nov 24 13:55:50 UTC 2016


On 11/24/2016 02:38 PM, Peter Rajnoha wrote:
> On 11/24/2016 01:21 PM, Stefan Bauer wrote:
>> hi folks, 
>>
>> howto avoid pvescan to initialize lvm volume groups on startup (it's for a cluster setup)? auto_activation_volume_list was filled with the remaining VGs we want to setup. Manually it does what it should 
>>
>> /sbin/lvm pvescan --config 'activation { auto_activation_volume_list = "vg2" }'  only activates vg2 but keeps vg1 "untouched".
>>
>> But on system startup, all VGs are activated. (ubuntu 14.04.5 LTS)
>>
>> We also updated the ramdisk and verified, the changes are also in the ramdisks lvm.conf
>>
>> However vg1 is also enabled.
>>
>> Any help is greatly appreciated.
> 
> It's important that all scripts which handle LVM activation at boot are
> executed with vgchange -aay that honours the auto_activation_volume_list
> (so not "vgchange -ay").
> 
> All init scripts and systemd units which upstream LVM2 provides are
> executed with "-aay" already.
> 
> You mentioned cluster setup - so are your VGs clustered and are you
> using clvmd? If that's the case, the clustered VGs are activated either
> by clvmd init script/systemd unit or external cluster resource agent
> (e.g. pacemaker and clvm ocf file) which calls the vgchange to activate
> the clustered VGs - that one needs to use "-aay" too.
> 

I looked at Ubuntu specific environment and I can see there's
/lib/udev/rules.d/85-lvm2.rules with:

SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}="lvm*|LVM*",
RUN+="watershed sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange -a y'"

So that "watershed" should use vgchange -aay. Please report this for
Ubuntu directly for them to fix this (as the "watershed" helper binary
is specific to Debian/Ubuntu only).

-- 
Peter




More information about the linux-lvm mailing list