I'm trying to do a very simple test were a single block device should be ignored by LVM as a result of setting the filter directive in lvm.conf. However, it isn't. That block device happens to be a DM target (mapped to the zero target): # dmsetup create foo7 --table "0 $((1*1024*1024*1024/512)) zero" The filter in lvm.conf is not honored, here's how it's set: devices { ... filter = [ "r|/dev/mapper/foo7|" ] ... } I did run vgscan after editing lvm.conf. The relevant output of strace: # strace -o strace lvs -vvvv -d > lvs 2>&1 ... stat("/dev/mapper/foo7", {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 4), ...}) = 0 open("/dev/mapper/foo7", O_RDONLY|O_DIRECT|O_NOATIME) = 5 fstat(5, {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 4), ...}) = 0 write(2, "#device/dev-io.c:533 ", 29) = 29 write(2, "Opened /dev/mapper/foo7 RO O_DIR"..., 35) = 35 write(2, "\n", 1) = 1 ioctl(5, BLKGETSIZE64, 1073741824) = 0 write(2, "#device/dev-io.c:310 ", 27) = 27 write(2, "/dev/mapper/foo7: size is 209715"..., 41) = 41 write(2, "\n", 1) = 1 close(5) = 0 write(2, "#device/dev-io.c:587 ", 29) = 29 write(2, "Closed /dev/mapper/foo7", 23) = 23 write(2, "\n", 1) = 1 write(2, "#ioctl/libdm-iface.c:1795 "..., 34) = 34 write(2, "dm status (253:4) OF [16384]"..., 37) = 37 write(2, "\n", 1) = 1 ioctl(4, DM_TABLE_STATUS, 0x7fa013383190) = 0 stat("/dev/mapper/foo7", {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 4), ...}) = 0 open("/dev/mapper/foo7", O_RDONLY|O_DIRECT|O_NOATIME) = 5 fstat(5, {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 4), ...}) = 0 write(2, "#device/dev-io.c:533 ", 29) = 29 write(2, "Opened /dev/mapper/foo7 RO O_DIR"..., 35) = 35 write(2, "\n", 1) = 1 ioctl(5, BLKBSZGET, 4096) = 0 write(2, "#device/dev-io.c:144 ", 29) = 29 write(2, "/dev/mapper/foo7: block size is "..., 42) = 42 write(2, "\n", 1) = 1 ioctl(5, BLKPBSZGET, 512) = 0 write(2, "#device/dev-io.c:155 ", 29) = 29 write(2, "/dev/mapper/foo7: physical block"..., 50) = 50 write(2, "\n", 1) = 1 lseek(5, 0, SEEK_SET) = 0 read(5, It's stuck forever in read(2). And the output of lvs -vvvv -d: # grep -E "foo7|dm-4" lvs #device/dev-cache.c:338 /dev/dm-4: Added to device cache #device/dev-cache.c:335 /dev/mapper/foo7: Aliased to /dev/dm-4 in device cache (preferred name) #device/dev-cache.c:335 /dev/disk/by-id/dm-name-foo7: Aliased to /dev/mapper/foo7 in device cache #device/dev-cache.c:335 /dev/block/253:4: Aliased to /dev/mapper/foo7 in device cache #device/dev-io.c:533 Opened /dev/mapper/foo7 RO O_DIRECT #device/dev-io.c:310 /dev/mapper/foo7: size is 2097152 sectors #device/dev-io.c:587 Closed /dev/mapper/foo7 #device/dev-io.c:533 Opened /dev/mapper/foo7 RO O_DIRECT #device/dev-io.c:144 /dev/mapper/foo7: block size is 4096 bytes #device/dev-io.c:155 /dev/mapper/foo7: physical block size is 512 bytes The LVM version is: # lvm version LVM version: 2.02.118(2)-RHEL6 (2015-09-08) Library version: 1.02.95-RHEL6 (2015-09-08) Driver version: 4.33.1 Is this how it's supposed to work? Am I missing something? -- Thanos Makatos _______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/