4 o libdevmapper : comes with device-mapper-XXXX.tar.gz
6 This lib has been dropped in the multipath tree
7 o libsysfs : comes with sysutils
8 See ftp.kernel.org/pub/linux/utils/kernel/hotplug/
13 Fill the all_paths array. Each path store this info :
16 char dev[FILE_NAME_SIZE];
17 char sg_dev[FILE_NAME_SIZE];
18 struct scsi_idlun scsi_id;
24 scsi_id, sg_dev and sg_id are only really useful for 2.4
25 kernels, for which SG cmnds must go through sg devs.
26 In 2.5+ we have the nice opportunity to send SG cmnds
29 For 2.4 compat, we pivot on idlun tupple to map sg devs
32 2.4 does not do device enumeration, so we must scan a
33 defined number of sg devs and scsi bdevs. Good enough.
34 In 2.5+, we rely on libsysfs (sysutils) to access to
37 the wwid is retrieved by a switch fonction. Only White
38 Listed HW can filled this field. For now every FC array
39 HW listed in kernel's devinfo.c is White Listed, assuming
40 the WWID is stored is the SCSI-3 standard 0x83 EVPD page.
42 When all_paths is filled, we coalesce the paths and store
43 the result in mp array. Each mp is a struct like this :
48 int pindex[MAX_MP_PATHS];
51 When mp is filled, the device maps are fed to the kernel
57 o On 2.4, make sure you have enough /dev/sg* nodes
58 (/dev/MAKEDEV if necesary). Same goes for /dev/sd*
60 o path coalescing relies on a path unique id being found.
61 This unique id, lacking a standard method, is vendor
62 specific. A switch function (get_unique_id) is present
63 and an example function is provided for storageworks
64 arrays (get_evpd_wwid). Feel free to enrich
65 with hardware you have at hand :)
67 o The kernel does NOT manage properly ghosts paths
68 with StorageWorks HW. Seems nobody cares after a load
69 of posts to linux-scsi.
71 o 2.4.21 version of DM does not like even segment size.
72 if you enconter pbs with this, upgrade DM.
77 o Heavy cut'n paste from sg_utils. Thanks goes to D.
79 o Light cut'n paste from dmsetup. Thanks Joe Thornber.
80 o Greg KH for the nice sysfs API.