From mboxrd@z Thu Jan 1 00:00:00 1970 References: <12562310-b26a-8a83-9481-d8b54fda40d5@gmail.com> From: Marian Csontos Message-ID: Date: Tue, 2 Jan 2018 12:03:01 +0100 MIME-Version: 1.0 In-Reply-To: <12562310-b26a-8a83-9481-d8b54fda40d5@gmail.com> Content-Language: en-MW Content-Transfer-Encoding: 8bit Subject: Re: [linux-lvm] unable to exclude LVs using global_filter Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="utf-8"; format="flowed" To: LVM general discussion and development , Gordon Messmer On 01/02/2018 07:47 AM, Gordon Messmer wrote: > I'd like to avoid scanning LVs, and I thought I'd set global_filter > appropriately.  The following logs show global_filter set to reject > ^/dev/VolGroup/vm_, but the system is scanning > /dev/VolGroup/vm_wiki_data.  Any hints as to what I'm doing wrong? > > > > Dec 06 13:08:37 kvm-test.private lvm[532]: Setting devices/global_filter > to global_filter = [ "r|^/dev/VolGroup/vm_|", "r|^/dev/dm-|", "a|.*/|" ] Hi Gordon, remove the last component in the filter: 'a|.*/|'. Filters accept any device if any of it's "names" (all symbolic links) is matched by an a pattern ("a|.*/|" in your case) and matches no previous r pattern - for example anything in /dev/mapper/ is accepted. When used as a blacklist filter(s) must contain only "r" paterns. BTW it is usually better to use white list: list "a" patterns for all disks you wish to accept and add "r|.*|" at the end. -- Martian