We're missing what your "preferred_names" and "filter" statements in lvm.conf look like. Please post them here.
I may be wrong, as I'm often wrong, but I'm not convinced that changing just the "preferred_names" will get LVM to use the multipath device. I still think it depends on what is in your "filter" statement.
I would suggest changing the "preferred_names" to
Code:
preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
then run 'pvscan -vvv' and post the results here. Also include the output from a 'pvs' command and an 'multipath -ll' command.
Here's what one of my systems looks like. Note that /dev/mapper/mpath0 and /dev/dm-7 are the same device, but preferred_names tells LVM to use /dev/mapper/mpath0 in displays.
Code:
[root@xlabwz2l ~]# multipath -ll
mpath0 (36005076305ffc1870000000000000400) dm-7 IBM,2107900
[size=50G][features=1 queue_if_no_path][hwhandler=0]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:1 sda 8:0 [active][ready]
\_ 1:0:0:1 sdb 8:16 [active][ready]
[root@xlabwz2l ~]# ll /dev/mapper/mpath0
brw-rw---- 1 root disk 253, 7 Sep 11 13:42 /dev/mapper/mpath0
[root@xlabwz2l ~]# ll /dev/dm-7
brw-rw---- 1 root root 253, 7 Sep 11 13:42 /dev/dm-7
[root@xlabwz2l ~]# grep "filter =\|preferred_names =" /etc/lvm/lvm.conf
preferred_names = [ "^/dev/mapper/mpath", "^/dev/[hs]d" ]
filter = [ "a|dasda|", "a|/dev/mapper/mpath.*|", "r|.*|" ]
[root@xlabwz2l ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/dasda2 rootvg lvm2 a- 24.88G 4.38G
/dev/mapper/mpath0 uservg lvm2 a- 50.00G 30.00G
[root@xlabwz2l ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rootvg 1 7 0 wz--n- 24.88G 4.38G
uservg 1 3 0 wz--n- 50.00G 30.00G
[root@xlabwz2l ~]# lsscsi
[0:0:0:1] disk IBM 2107900 1.50 /dev/sda
[1:0:0:1] disk IBM 2107900 1.50 /dev/sdb
And a 'pvscan -vvv'. Note where it says "Walking through all physical volumes", then "/dev/sda: Skipping (regex)", "/dev/sdb: Skipping (regex)", and "Using /dev/mapper/mpath0", etc.
Code:
[root@xlabwz2l ~]# pvscan -vvv
Processing: pvscan -vvv
O_DIRECT will be used
Setting global/locking_type to 1
File-based locking selected.
Setting global/locking_dir to /var/lock/lvm
Wiping cache of LVM-capable devices
/dev/console: Not a block device
/dev/core: Not a block device
/dev/dasd/0.0.0201/disc: Added to device cache
/dev/dasd/0.0.0201/part1: Already in device cache
/dev/dasd/0.0.0201/part2: Already in device cache
/dev/dasda: Aliased to /dev/dasd/0.0.0201/disc in device cache
(preferred name)
/dev/dasda1: Already in device cache
/dev/dasda2: Already in device cache
/dev/dasd_eer: Not a block device
/dev/dcssblk0: Added to device cache
/dev/disk/by-id/scsi-36005076305ffc1870000000000000400: Added to
devicecache
/dev/disk/by-label/boot: Already in device cache
/dev/disk/by-path/ccw-0.0.0201: Aliased to /dev/dasda in device
cache
/dev/disk/by-path/ccw-0.0.0201-part1: Already in device cache
/dev/disk/by-path/ccw-0.0.0201-part2: Already in device cache
/dev/disk/by-path/ccw-0.0.0300-zfcp-0x5005076305034187:0x400440000000000
0: Added to device cache
/dev/disk/by-path/ccw-0.0.0310-zfcp-0x5005076305084187:0x400440000000000
0: Aliased to /dev/disk/by-id/scsi-36005076305ffc1870000000000000400 in
device cache
/dev/disk/by-uuid/b6d11836-0ed9-4dff-b42d-27aa3596712f: Already
in device cache
/dev/dm-7: Already in device cache
/dev/fd: Symbolic link to directory
/dev/full: Not a block device
/dev/initctl: Not a block device
/dev/kmsg: Not a block device
/dev/log: Not a block device
/dev/loop0: Added to device cache
/dev/loop1: Added to device cache
/dev/loop2: Added to device cache
/dev/loop3: Added to device cache
/dev/loop4: Added to device cache
/dev/loop5: Added to device cache
/dev/loop6: Added to device cache
/dev/loop7: Added to device cache
/dev/MAKEDEV: Not a block device
/dev/mapper/control: Not a block device
/dev/mapper/mpath0: Already in device cache
/dev/mapper/rootvg-home: Added to device cache
/dev/mapper/rootvg-midrange: Added to device cache
/dev/mapper/rootvg-minidisk01: Added to device cache
/dev/mapper/rootvg-opt: Added to device cache
/dev/mapper/rootvg-root: Added to device cache
/dev/mapper/rootvg-swap: Added to device cache
/dev/mapper/rootvg-var: Added to device cache
/dev/mapper/uservg-saved_lab1: Added to device cache
/dev/mapper/uservg-saved_lab2: Added to device cache
/dev/mapper/uservg-zfcp01: Added to device cache
/dev/md0: Added to device cache
/dev/mem: Not a block device
/dev/mpath/mpath0: Already in device cache
/dev/net/tun: Not a block device
/dev/null: Not a block device
/dev/parport0: Not a block device
/dev/parport1: Not a block device
/dev/parport2: Not a block device
/dev/parport3: Not a block device
/dev/port: Not a block device
/dev/ppp: Not a block device
/dev/ptmx: Not a block device
/dev/pts/0: Not a block device
/dev/ram: Added to device cache
/dev/ram0: Added to device cache
/dev/ram1: Aliased to /dev/ram in device cache
/dev/ram10: Added to device cache
/dev/ram11: Added to device cache
/dev/ram12: Added to device cache
/dev/ram13: Added to device cache
/dev/ram14: Added to device cache
/dev/ram15: Added to device cache
/dev/ram2: Added to device cache
/dev/ram3: Added to device cache
/dev/ram4: Added to device cache
/dev/ram5: Added to device cache
/dev/ram6: Added to device cache
/dev/ram7: Added to device cache
/dev/ram8: Added to device cache
/dev/ram9: Added to device cache
/dev/ramdisk: Aliased to /dev/ram0 in device cache (preferred
name)
/dev/random: Not a block device
/dev/root: Aliased to /dev/mapper/rootvg-root in device cache
(preferred name)
/dev/rootvg/home: Aliased to /dev/mapper/rootvg-home in device
cache (preferred name)
/dev/rootvg/midrange: Aliased to /dev/mapper/rootvg-midrange in
device cache (preferred name)
/dev/rootvg/minidisk01: Aliased to /dev/mapper/rootvg-minidisk01
in device cache (preferred name)
/dev/rootvg/opt: Aliased to /dev/mapper/rootvg-opt in device
cache (preferred name)
/dev/rootvg/root: Aliased to /dev/root in device cache
/dev/rootvg/swap: Aliased to /dev/mapper/rootvg-swap in device
cache (preferred name)
/dev/rootvg/var: Aliased to /dev/mapper/rootvg-var in device
cache (preferred name)
/dev/rtc: Not a block device
/dev/sda: Aliased to
/dev/disk/by-path/ccw-0.0.0300-zfcp-0x5005076305034187:0x400440000000000
0 in device cache (preferred name)
/dev/sdb: Aliased to
/dev/disk/by-id/scsi-36005076305ffc1870000000000000400 in device cache
(preferred name)
/dev/sg0: Not a block device
/dev/sg1: Not a block device
/dev/stderr: Not a block device
/dev/stdin: Not a block device
/dev/stdout: Not a block device
/dev/systty: Not a block device
/dev/tty: Not a block device
/dev/ttyS0: Not a block device
/dev/ttyS1: Not a block device
/dev/ttyS2: Not a block device
/dev/ttyS3: Not a block device
/dev/ttysclp0: Not a block device
/dev/urandom: Not a block device
/dev/uservg/saved_lab1: Aliased to /dev/mapper/uservg-saved_lab1
in device cache (preferred name)
/dev/uservg/saved_lab2: Aliased to /dev/mapper/uservg-saved_lab2
in device cache (preferred name)
/dev/uservg/zfcp01: Aliased to /dev/mapper/uservg-zfcp01 in
device cache (preferred name)
/dev/X0R: Not a block device
/dev/zero: Not a block device
/dev/zfcp_cfdc: Not a block device
Wiping internal VG cache
Walking through all physical volumes
/dev/ramdisk: Skipping (regex)
/dev/loop0: Skipping (sysfs)
/dev/sda: Skipping (regex)
/dev/md0: Skipping (regex)
Opened /dev/dasda RO
/dev/dasda: size is 52428782 sectors
/dev/dasda: block size is 1024 bytes
/dev/dasda: Skipping: Partition table signature found
Closed /dev/dasda
/dev/dcssblk0: Skipping (regex)
/dev/root: Skipping (regex)
/dev/ram: Skipping (regex)
/dev/loop1: Skipping (sysfs)
Opened /dev/dasda1 RO
/dev/dasda1: size is 204799 sectors
Closed /dev/dasda1
/dev/dasda1: size is 204799 sectors
Opened /dev/dasda1 RO O_DIRECT
/dev/dasda1: block size is 1024 bytes
Closed /dev/dasda1
Using /dev/dasda1
Opened /dev/dasda1 RO O_DIRECT
/dev/dasda1: block size is 1024 bytes
/dev/dasda1: No label detected
Closed /dev/dasda1
/dev/rootvg/home: Skipping (regex)
/dev/ram2: Skipping (regex)
/dev/loop2: Skipping (sysfs)
Opened /dev/dasda2 RO
/dev/dasda2: size is 52219904 sectors
Closed /dev/dasda2
/dev/dasda2: size is 52219904 sectors
Opened /dev/dasda2 RO O_DIRECT
/dev/dasda2: block size is 4096 bytes
Closed /dev/dasda2
Using /dev/dasda2
Opened /dev/dasda2 RO O_DIRECT
/dev/dasda2: block size is 4096 bytes
/dev/dasda2: lvm2 label detected
lvmcache: /dev/dasda2: now orphaned
/dev/dasda2: Found metadata at 51712 size 2362 for rootvg
(UbQG3P-UQfk-KBhs-0XGD-zBVU-BeWR-05GCQR)
lvmcache: /dev/dasda2: now in VG rootvg
lvmcache: /dev/dasda2: setting rootvg VGID to
UbQG3PUQfkKBhs0XGDzBVUBeWR05GCQR
lvmcache: /dev/dasda2: VG rootvg: Set creation host to xlabwz2l.
Closed /dev/dasda2
/dev/rootvg/opt: Skipping (regex)
/dev/ram3: Skipping (regex)
/dev/loop3: Skipping (sysfs)
/dev/rootvg/midrange: Skipping (regex)
/dev/ram4: Skipping (regex)
/dev/loop4: Skipping (sysfs)
/dev/rootvg/var: Skipping (regex)
/dev/ram5: Skipping (regex)
/dev/loop5: Skipping (sysfs)
/dev/rootvg/swap: Skipping (regex)
/dev/ram6: Skipping (regex)
/dev/loop6: Skipping (sysfs)
/dev/rootvg/minidisk01: Skipping (regex)
/dev/ram7: Skipping (regex)
/dev/loop7: Skipping (sysfs)
Opened /dev/mapper/mpath0 RO
/dev/mapper/mpath0: size is 104857600 sectors
Closed /dev/mapper/mpath0
/dev/mapper/mpath0: size is 104857600 sectors
Opened /dev/mapper/mpath0 RO O_DIRECT
/dev/mapper/mpath0: block size is 4096 bytes
Closed /dev/mapper/mpath0
Using /dev/mapper/mpath0
Opened /dev/mapper/mpath0 RO O_DIRECT
/dev/mapper/mpath0: block size is 4096 bytes
/dev/mapper/mpath0: lvm2 label detected
lvmcache: /dev/mapper/mpath0: now orphaned
/dev/mapper/mpath0: Found metadata at 11776 size 1341 for uservg
(5U24Qp-pc28-NXYg-yBw7-n8Wj-ARhB-eGMORo)
lvmcache: /dev/mapper/mpath0: now in VG uservg
lvmcache: /dev/mapper/mpath0: setting uservg VGID to
5U24Qppc28NXYgyBw7n8WjARhBeGMORo
lvmcache: /dev/mapper/mpath0: VG uservg: Set creation host to
xlabwz2l.
Closed /dev/mapper/mpath0
/dev/ram8: Skipping (regex)
/dev/uservg/zfcp01: Skipping (regex)
/dev/ram9: Skipping (regex)
/dev/uservg/saved_lab1: Skipping (regex)
/dev/ram10: Skipping (regex)
/dev/uservg/saved_lab2: Skipping (regex)
/dev/ram11: Skipping (regex)
/dev/ram12: Skipping (regex)
/dev/ram13: Skipping (regex)
/dev/ram14: Skipping (regex)
/dev/ram15: Skipping (regex)
/dev/sdb: Skipping (regex)
Opened /dev/mapper/mpath0 RO O_DIRECT
/dev/mapper/mpath0: block size is 4096 bytes
/dev/mapper/mpath0: lvm2 label detected
/dev/mapper/mpath0: Found metadata at 11776 size 1341 for uservg
(5U24Qp-pc28-NXYg-yBw7-n8Wj-ARhB-eGMORo)
Closed /dev/mapper/mpath0
Opened /dev/mapper/mpath0 RO O_DIRECT
/dev/mapper/mpath0: block size is 4096 bytes
/dev/mapper/mpath0: lvm2 label detected
/dev/mapper/mpath0: Found metadata at 11776 size 1341 for uservg
(5U24Qp-pc28-NXYg-yBw7-n8Wj-ARhB-eGMORo)
Read uservg metadata (7) from /dev/mapper/mpath0 at 11776 size
1341
Closed /dev/mapper/mpath0
/dev/mapper/mpath0 0: 0 2560: zfcp01(0:0)
/dev/mapper/mpath0 1: 2560 1280: saved_lab1(0:0)
/dev/mapper/mpath0 2: 3840 1280: saved_lab2(0:0)
/dev/mapper/mpath0 3: 5120 7679: NULL(0:0)
Opened /dev/dasda2 RO O_DIRECT
/dev/dasda2: block size is 4096 bytes
/dev/dasda2: lvm2 label detected
/dev/dasda2: Found metadata at 51712 size 2362 for rootvg
(UbQG3P-UQfk-KBhs-0XGD-zBVU-BeWR-05GCQR)
Closed /dev/dasda2
Opened /dev/dasda2 RO O_DIRECT
/dev/dasda2: block size is 4096 bytes
/dev/dasda2: lvm2 label detected
/dev/dasda2: Found metadata at 51712 size 2362 for rootvg
(UbQG3P-UQfk-KBhs-0XGD-zBVU-BeWR-05GCQR)
Read rootvg metadata (25) from /dev/dasda2 at 51712 size 2362
Closed /dev/dasda2
/dev/dasda2 0: 0 64: root(0:0)
/dev/dasda2 1: 64 64: home(0:0)
/dev/dasda2 2: 128 64: opt(0:0)
/dev/dasda2 3: 192 16: midrange(0:0)
/dev/dasda2 4: 208 32: var(0:0)
/dev/dasda2 5: 240 32: swap(0:0)
/dev/dasda2 6: 272 64: midrange(16:0)
/dev/dasda2 7: 336 320: minidisk01(0:0)
/dev/dasda2 8: 656 140: NULL(0:0)
PV /dev/mapper/mpath0 VG uservg lvm2 [50.00 GB / 30.00 GB free]
PV /dev/dasda2 VG rootvg lvm2 [24.88 GB / 4.38 GB free]
Total: 2 [74.87 GB] / in use: 2 [74.87 GB] / in no VG: 0 [0 ]
[root@xlabwz2l ~]#