Le jeudi 25 novembre 2004 �8:55 +0100, Andreas Huck a �it : > Hi, > > I struggle to setup multipath devices by dmsetup, multipath-tools > and multipathd. I followed the description at > http://christophe.varoqui.free.fr/multipath.html > and refered to all I could find on the web, but some questions > remain. Maybe you could give some advices? > I'd rather remove this doc as it out of date and generate more trouble than enlightenment. > First, how to get a WWID? I have 4 devices with 2 paths each. > `scsidev -s` should provide it but doesn't: > what is the output of "multipath -v2" ? > > So how can I provide WWIDs for /etc/multipath.conf ? > That is only necessary for aliases. You can safely leave the config file multipath section empty. > How to identify the devices if for XXX=[a-h]: > # /sbin/scsi_id -g -p 0x83 -s /block/sdXXX > 220000003390011d3 > And without "-p 0x83" ? > I.e. all IDs are equal (but configured right, i.e. > a=e,b=f,c=g,d=h). > > Is it wise to take the unique path as ID? : > # ls -l /sys/block/sdb/device > /sys/block/sdb/device -> ../../devices/pci0000:04/0000:04:08.0/host0/0:0:0:1 > No : we want a unique LU id, not a unique path id. > The hardware is not listed in setup_default_hwtable and I wonder > whether I can define it by multipath.conf at all since sysfs does > provide the vendor but NOT the "product": > Sane defaults are applied when there is no corresponding entry in the config file nor in setup_default_hwtable. Notably the failover pgpolicy is selected, which is what you want. > # ls /sys/block/sdb/device/ > . .. block delete detach_state device_blocked generic model > online power queue_depth rescan rev scsi_level timeout type vendor > > Instead I could use 'model "FC2502 "' - but that's not implemented. > This is just terminology : "vendor / product /rev" used by most scsi people, "vendor / model / rev" chosen by dreaming sysfs developers :) model == product, so you can add the configlet if you want. > I tried a direct approach by dmsetup, but didn't get a device: > > # echo "0 274968576 multipath 10 2 1 round-robin 1 0 \ > /dev/sdb 1 round-robin 1 0 /dev/sdf" | dmsetup create /dev/dm-0 > k_set_name: Device /dev/dm-0 not found > Command failed > # echo "0 274968576 multipath 10 2 1 round-robin 1 0 \ /dev/sdb 1 round-robin 1 0 /dev/sdf" | dmsetup create just_the_map_name_you_want_not_a_path > Maybe I am not too familiar with hotplug and udev. > I already did add a udev rule: > # grep dm /etc/udev/udev.rules > KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c" > > but > > # /sbin/devmap_name 8 16 > No devices found > major:minor are devmap's one, as listed in "dmsetup ls" ? And the map must exist for the command to work. > Although the devices exist: > brw-rw---- 1 root disk 8, 0 Jun 30 21:04 /dev/sda > brw-rw---- 1 root disk 8, 16 Jun 30 21:04 /dev/sdb > brw-rw---- 1 root disk 8, 32 Jun 30 21:04 /dev/sdc > brw-rw---- 1 root disk 8, 48 Jun 30 21:04 /dev/sdd > brw-rw---- 1 root disk 8, 64 Jun 30 21:04 /dev/sde > brw-rw---- 1 root disk 8, 80 Jun 30 21:04 /dev/sdf > brw-rw---- 1 root disk 8, 96 Jun 30 21:04 /dev/sdg > brw-rw---- 1 root disk 8, 112 Jun 30 21:04 /dev/sdh > > Do I overlook something important here? > certainly :) > Last but not least, I use > kernel-smp-2.6.5-7.111 > udev-021-36.32 > multipath-tools-0.2.1-1.5 > device-mapper-1.00.09-17.5 > from SLES9 and also played around with multipath-tools-0.3.7 from source. > I guess you'll have more feedback from Suse folk then. I don't really know how the combination in SLES9 behave and what patch pile they applied to the listed products. > So if you have some hints for me that would be great. > Hope it is enough to get you a bit further. regards, -- christophe varoqui <christophe.varoqui@xxxxxxx>