linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] confused with lvm2 filter rules
@ 2019-06-03 13:03 Heming Zhao
  2019-06-05  2:41 ` Heming Zhao
  2019-06-05 10:20 ` Zdenek Kabelac
  0 siblings, 2 replies; 13+ messages in thread
From: Heming Zhao @ 2019-06-03 13:03 UTC (permalink / raw)
  To: linux-lvm

Hello,

I met below filter action when executed 'vgextend'.
why the filter take no effect on executing pvcreate or vgcreate?

```
# ls -l /dev/disk/by-id/scsi-*
lrwxrwxrwx 1 root root 9 Jun  3 20:44 /dev/disk/by-id/scsi-360073a707 -> 
../../sda
lrwxrwxrwx 1 root root 9 Jun  3 20:44 /dev/disk/by-id/scsi-36007c0036 -> 
../../sdb
lrwxrwxrwx 1 root root 9 Jun  3 20:27 /dev/disk/by-id/scsi-3600b99ec4 -> 
../../sdc
# pvcreate /dev/disk/by-id/scsi-36073a707 /dev/disk/by-id/scsi-36007c0036
# pvs
   PV         VG Fmt  Attr PSize PFree
   /dev/sda      lvm2 ---  2.00g 2.00g
   /dev/sdb      lvm2 ---  2.00g 2.00g
# vgcreate vgtst /dev/disk/by-id/scsi-36073a707 
/dev/disk/by-id/scsi-36007c0036hy the filter take no effect on executing 
pvcreate or vgcreate?
# vgs
   VG    #PV #LV #SN Attr   VSize VFree
   vgtst   2   0   0 wz--n- 3.98g 3.98g
# vgextend vgtst /dev/disk/by-id/scsi-3600b99ec4
   Device /dev/disk/by-id/scsi-3600b99ec4 excluded by a filter.
# vgs
   VG    #PV #LV #SN Attr   VSize VFree
   vgtst   2   0   0 wz--n- 3.98g 3.98g

my enviroment:
# rpm -qa | grep lvm2
lvm2-clvm-2.02.180-8.16.x86_64
lvm2-cmirrord-2.02.180-8.16.x86_64
lvm2-2.02.180-8.16.x86_64

the filter rules:  (you can see all the disk in /dev/disk/by-id/ are 
rejected)
# grep filter /etc/lvm/lvm.conf | grep -v "#"
     filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", 
"r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]
```


Thank you.
zhm

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-06-26  6:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 13:03 [linux-lvm] confused with lvm2 filter rules Heming Zhao
2019-06-05  2:41 ` Heming Zhao
2019-06-05 10:20 ` Zdenek Kabelac
2019-06-06  6:42   ` Heming Zhao
2019-06-06  8:16   ` Heming Zhao
2019-06-06  8:43     ` Zdenek Kabelac
2019-06-06 13:30       ` Heming Zhao
2019-06-06 13:51         ` Zdenek Kabelac
2019-06-10  2:43           ` Heming Zhao
     [not found]             ` <60982841-fabc-71d9-b8b1-6d98b87ba738@suse.com>
2019-06-25  7:56               ` Martin Wilck
2019-06-25  8:56                 ` Zdenek Kabelac
2019-06-25  9:13                   ` Heming Zhao
2019-06-26  6:49                     ` Heming Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).