diff options
author | greg@kroah.com <greg@kroah.com> | 2003-11-13 06:30:57 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:06:24 -0700 |
commit | 04a091d47e32d6480b99424e41db093b013dfaf5 (patch) | |
tree | f78a0940a6d7cc1b2a41080d0a0f1a2ed903a100 /extras/multipath/README | |
parent | 20ff86bd7111221e8709c614c5e3969950293664 (diff) |
[PATCH] Add multipath "extra" program from Christophe Varoqui, <christophe.varoqui@free.fr>
Diffstat (limited to 'extras/multipath/README')
-rw-r--r-- | extras/multipath/README | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/extras/multipath/README b/extras/multipath/README new file mode 100644 index 0000000000..6a5637de4b --- /dev/null +++ b/extras/multipath/README @@ -0,0 +1,82 @@ +Dependancies : +============== + +o libdevmapper : comes with device-mapper-XXXX.tar.gz + See www.sistina.com +o libsysfs : comes with sysutils + See ftp.kernel.org/pub/linux/utils/kernel/hotplug/ + +How it works : +============== + +Fill the all_paths array. Each path store this info : + +struct path { + char dev[FILE_NAME_SIZE]; + char sg_dev[FILE_NAME_SIZE]; + struct scsi_idlun scsi_id; + struct sg_id sg_id; + int state; + char wwid[WWID_SIZE]; +}; + +scsi_id, sg_dev and sg_id are only really useful for 2.4 +kernels, for which SG cmnds must go through sg devs. +In 2.5+ we have the nice opportunity to send SG cmnds +through SCSI bdevs. + +For 2.4 compat, we pivot on idlun tupple to map sg devs +to SCSI bdevs. + +2.4 does not do device enumeration, so we must scan a +defined number of sg devs and scsi bdevs. Good enough. +In 2.5+, we rely on libsysfs (sysutils) to access to +sysfs device enums. + +the wwid is retrieved by a switch fonction. Only White +Listed HW can filled this field. For now only +StorageWorks HW is White Listed. (See notes) + +When all_paths is filled, we coalesce the paths and store +the result in mp array. Each mp is a struct like this : + +struct multipath { + char wwid[WWID_SIZE]; + int npaths; + int pindex[MAX_MP_PATHS]; +}; + +When mp is filled, the device maps are fed to the kernel +through libdevmapper. Stale paths (failed TUR) are +discarded. + +Notes : +======= + +o make sure you have enough /dev/sg* nodes + (/dev/MAKEDEV if necesary) + +o path coalescing relies on a path unique id being found. + This unique id, lacking a standard method, is vendor + specific. A switch function (get_unique_id) is present + and an example function is provided for storageworks + arrays (get_storageworks_wwid). Feel free to enrich + with hardware you have at hand :) + +o Something goes wrong with sd.o, qla2200 & dm-mod + refcounting : I can't unload these modules after exec. + +o The kernel does NOT manage properly ghosts paths + with StorageWorks HW. Seems nobody cares after a load + of posts to linux-scsi. + +o 2.4.21 version of DM does not like even segment size. + if you enconter pbs with this, upgrade DM. + +Credits : +========= + +o Heavy cut'n paste from sg_utils. Thanks goes to D. + Gilbert. +o Light cut'n paste from dmsetup. Thanks Joe Thornber. +o Greg KH for the nice sysfs API. |