Christophe Varoqui [Fri, 17 Feb 2006 22:58:26 +0000 (23:58 +0100)]
[multipathd] due failback not happening
If the failback period is set to more that four times the polling interval,
paths will never fail back. This is because the failback_tick keeps getting
reset. The attached patch fixes this.
Benjamin Marzinski, Redhat
Christophe Varoqui [Fri, 17 Feb 2006 22:55:44 +0000 (23:55 +0100)]
[multipathd] blacklisting and blacklist changes ignored on spots
multipathd doesn't correctly blacklist devices by wwid, because the
blacklist check happens before the device information is known.
This patch fixes that.
Benjamin Marzinski, Redhat
Christophe Varoqui [Fri, 17 Feb 2006 22:47:37 +0000 (23:47 +0100)]
[build] fix install target glitch in alua prioritizer
Triggered by "make rpm" on fresh systems.
Spotted and fixed by Brian Wong, Pillardata
Christophe Varoqui [Tue, 14 Feb 2006 08:03:19 +0000 (09:03 +0100)]
[checkers] fix segfault in the checker lookup function
Multipath was segfaulting on startup because of some pointer arithmatic
craziness with the checkers. The attached patch fixes it.
Benjamin Marzinski, Redhat
Christophe Varoqui [Mon, 13 Feb 2006 10:33:31 +0000 (11:33 +0100)]
[checkers] API rewrite
The context handling and the layering were poor, so rewrite.
The users now need to :
- alloc a "struct checker"
- select a checker by name : checker_lookup()
- init own checker instance : checker_get()
- set the path file descriptor to check : checker_set_fd()
- use : checker_check()
- release : checker_put()
Checkers now are asked to provide 3 functions :
- foo_init : alloc and initialize the checker context
- foo_free : free the context
- foo : the checking function proper
These 3 are registered in a static checkers array, along with the checker
name. Lookups are based on checker name.
The users are all updated :
- checker_get is folded into path (re)discovery
- checker_put is folded into path free/orphan
Additional gains :
- directio is updated to use a context to avoid computations upon each
check
- checkers code is leaner
Please test and report.
Christophe Varoqui [Thu, 9 Feb 2006 22:12:51 +0000 (23:12 +0100)]
Merge ... 137.250.31.225/rsync/git/linux/storage/multipath-tools.git
Bastian Blank [Thu, 9 Feb 2006 17:22:18 +0000 (17:22 +0000)]
[kpartx] Add support for mac partition table
Signed-off-by: Bastian Blank <waldi@debian.org>
Christophe Varoqui [Thu, 9 Feb 2006 11:31:19 +0000 (12:31 +0100)]
[build] make rpm fix
Adaptation to new prioritizer and path changes
Brian Wong, Pillardata
Christophe Varoqui [Thu, 2 Feb 2006 16:16:19 +0000 (17:16 +0100)]
[libmultipath] discovery broken for DASD
Since I moved the configlet setting right after vendor/product string
fetching in sysfs_scsi_pathinfo() and forgot about its *ccw* counterpart.
Stefan Weinhuber and Stefan Bader spotted and fixed that.
Christophe Varoqui [Sun, 22 Jan 2006 16:37:38 +0000 (17:37 +0100)]
[libmultipath] set_default_blacklist() : fix the fix
Christophe Varoqui [Sun, 22 Jan 2006 16:17:19 +0000 (17:17 +0100)]
[libmultipath] set_default_blacklist() should not register .rodata strings
... because free_blacklist will try to free those strings, and some glibc
are set to be verbose about that by default.
Christophe Varoqui [Sat, 21 Jan 2006 16:47:34 +0000 (17:47 +0100)]
[libmultipath] snprint_hw_prio_callout() segv
... if prio_callout is not defined in the default config section.
Christophe Varoqui [Sat, 21 Jan 2006 16:31:19 +0000 (17:31 +0100)]
[libmultipath] correct keyword lookup in snprint_hwentry()
Christophe Varoqui [Sat, 21 Jan 2006 11:36:49 +0000 (12:36 +0100)]
[libmultipath] fix blacklist printing segv when "show config"
Christophe Varoqui [Sat, 21 Jan 2006 10:55:36 +0000 (11:55 +0100)]
[libmultipath] fix uninitialized var in discovery.c:get_serial()
Christophe Varoqui [Sat, 21 Jan 2006 10:30:23 +0000 (11:30 +0100)]
[libmultipath] plug leaks in blacklist free_* functions
Christophe Varoqui [Sat, 21 Jan 2006 10:26:58 +0000 (11:26 +0100)]
[libmultipath] plug leak in discover.c:syfs_get_*()
Christophe Varoqui [Fri, 20 Jan 2006 23:29:17 +0000 (00:29 +0100)]
[config] synthetic template mispelled the "user_friendly_names" keyword
Missed the ending 's'.
Christophe Varoqui [Fri, 20 Jan 2006 15:09:03 +0000 (16:09 +0100)]
[libmultipath] "show conf" CLI command to output the blacklist too
All multipath.conf keywords and sections are now covered by "show conf".
Christophe Varoqui [Fri, 20 Jan 2006 14:34:45 +0000 (15:34 +0100)]
[libmultipath] fix new "blacklist" keyword incorrectly spelled to "devnode"
Christophe Varoqui [Fri, 20 Jan 2006 14:33:37 +0000 (15:33 +0100)]
[libmultipath] yet more output prefixing
Christophe Varoqui [Fri, 20 Jan 2006 14:01:58 +0000 (15:01 +0100)]
[libmultipath] move apply_format() from discovery.c to callout.c
Christophe Varoqui [Fri, 20 Jan 2006 13:53:12 +0000 (14:53 +0100)]
[libmultipath] don't set the hwe configlet pointer if !(mask & DI_SYSFS)
Vendor and product strings are fetched if (mask & DI_SYSFS).
We shouldn't even try to find_hwe(vendor, product) if there is a chance
the params are not set.
Christophe Varoqui [Fri, 20 Jan 2006 11:46:52 +0000 (12:46 +0100)]
[libmultipath] more path: and multipath: output prefixing
Christophe Varoqui [Fri, 20 Jan 2006 11:09:07 +0000 (12:09 +0100)]
[libmultipath] add "map:" prefix to propsel functions output
Christophe Varoqui [Fri, 20 Jan 2006 10:54:21 +0000 (11:54 +0100)]
[libmultipath] path discovery reorganisation
o split logic in smaller functions
o prefix output with "%s:...", pp->dev
o rename "curpath" to "pp"
Christophe Varoqui [Thu, 19 Jan 2006 16:08:10 +0000 (17:08 +0100)]
[config] add the "device" blacklist keyword to config templates
Christophe Varoqui [Thu, 19 Jan 2006 15:51:09 +0000 (16:51 +0100)]
[libmultipath] adapt discover.c to the new libsysfs2 API
In fact, I tried to use only the functions common to libsysfs v1 and v2.
Christophe Varoqui [Wed, 18 Jan 2006 16:30:17 +0000 (17:30 +0100)]
[libmultipath] rename conf->default_hwhandler to conf->hwhandler
Misleading name. The real default is DEFAULT_HWHANDLER.
Christophe Varoqui [Wed, 18 Jan 2006 16:27:43 +0000 (17:27 +0100)]
[libmultipath] rename conf->default_getprio to conf->getprio
Misleading name. The real default is DEFAULT_GETPRIO.
Christophe Varoqui [Wed, 18 Jan 2006 16:24:24 +0000 (17:24 +0100)]
[libmultipath] rename conf->default_getuid to conf->getuid
Misleading name. The real default is DEFAULT_GETUID.
Christophe Varoqui [Wed, 18 Jan 2006 16:16:55 +0000 (17:16 +0100)]
[libmultipath] rename conf->default_checker_index to conf->checker_index
Misleading name. The real default is DEFAULT_CHECKER_ID.
Christophe Varoqui [Wed, 18 Jan 2006 16:14:33 +0000 (17:14 +0100)]
[libmultipath] rename conf->default_pgpolicy to conf->pgpolicy
Misleading name. The real default is DEFAULT_PGPOLICY.
Christophe Varoqui [Wed, 18 Jan 2006 16:06:23 +0000 (17:06 +0100)]
[libmultipath] remove vector.h include from config.h
Christophe Varoqui [Wed, 18 Jan 2006 11:20:51 +0000 (12:20 +0100)]
[libmultipath] deprecate the "devnode_blacklist" keyword
Please use the "blacklist" keyword instead.
The blacklist section implements the "devnode", "wwid" and "device"
keywords, so it's misleading to keep the old section name.
Christophe Varoqui [Wed, 18 Jan 2006 11:07:26 +0000 (12:07 +0100)]
[libmultipath] add device blacklisting
Syntax is :
devnode_blacklist {
devnode sr*
wwid 6005*
device {
vendor DEC
product *
}
}
Christophe Varoqui [Tue, 17 Jan 2006 13:52:11 +0000 (14:52 +0100)]
[libmultipath] renaming a map triggers its partitions renames
Christophe Varoqui [Tue, 17 Jan 2006 09:13:29 +0000 (10:13 +0100)]
[multipathd] "show topo" as a "show maps topo" alias
Christophe Varoqui [Tue, 17 Jan 2006 09:08:49 +0000 (10:08 +0100)]
[multipathd] add "show config" CLI command
This commands dumps a multipath.conf config file.
The "defaults" section is factorized : settings in sync with the internal
defaults are not printed.
The "devices" section lists the internal hwtable, plus mods and adds from
the actual config file. The layout is factorized : settings in sync with
the "defaults" section are not printed.
The "devnode_blacklist" section is ommited for now, as this requires a bit
more infrastructure.
The "multipaths" section is not factorized as we can not reliably guess the
hardware a multipath is parented to. Multipath entries are just clones
of their actual config file equivalent.
Christophe Varoqui [Mon, 16 Jan 2006 15:44:40 +0000 (16:44 +0100)]
[libmultipath] add internal some defaults handling to propsel.c
o getprio
o checker_index
o getuid
Christophe Varoqui [Sun, 15 Jan 2006 16:16:00 +0000 (17:16 +0100)]
Merge branch 'master' of /linux/storage/multipath-tools/
Christophe Varoqui [Sun, 15 Jan 2006 15:47:51 +0000 (16:47 +0100)]
[libmultipath] fix the internal defaults loading
hwtable.c segfaults : the increment of the hwe pointer is wrong
Mark Haverkamp, OSDL
Christophe Varoqui [Sun, 15 Jan 2006 15:45:09 +0000 (16:45 +0100)]
[libmultipath] STK D280 to use the tpc prioritizer
Align the defaults to SGI TP4500 ones.
Suggested by Chris Penney
Christophe Varoqui [Sun, 15 Jan 2006 15:41:38 +0000 (16:41 +0100)]
[libmultipath] add a buffer len param to get_pgpolicy_name()
Christophe Varoqui [Sun, 15 Jan 2006 15:32:51 +0000 (16:32 +0100)]
[libmultipath] do proper string equality checks in dict.c
Christophe Varoqui [Sun, 15 Jan 2006 15:20:08 +0000 (16:20 +0100)]
[libmultipath] move CHECKINT definition to defaults.h
And transform MAX_CHECKINT into a macro.
Use that in dict.c to set conf->max_checkint with the same formula we
use when we set the in-core default.
Christophe Varoqui [Sun, 15 Jan 2006 15:10:36 +0000 (16:10 +0100)]
[libmultipath] define more defaults to defaults.h
And use them in propsel.c when appropriate.
Christophe Varoqui [Sun, 15 Jan 2006 15:01:38 +0000 (16:01 +0100)]
[libmultipath] add a buffer len param to get_checker_name()
Christophe Varoqui [Sun, 15 Jan 2006 14:24:21 +0000 (15:24 +0100)]
[build] adapt to new "make" rules
compatibility with the new make's line continuation rules.
Steve Langasek
Christophe Varoqui [Thu, 5 Jan 2006 22:30:56 +0000 (23:30 +0100)]
[libmultipath] fix the fix
braino.
Christophe Varoqui [Thu, 5 Jan 2006 22:25:38 +0000 (23:25 +0100)]
[libmultipath] fix segfault on dlog() format violation
Noticed by Kiyoshi Ueda, NEC
Alasdair Kergon, Redhat, suggested the compilation checking.
Christophe Varoqui [Mon, 2 Jan 2006 10:24:16 +0000 (11:24 +0100)]
[multipathd] 'show maps xxx' CLI tweaks
o rename PRINT_MAP_FAILBACK to PRINT_MAP_STATUS
o 'print maps' command renamed to 'print maps status'
o 'print maps' now use the PRINT_MAP_NAMES layout, ie name|dm_name|wwid
o remove the dm_name field from PRINT_MAP_STATUS and PRINT_MAP_STATS
Christophe Varoqui [Mon, 19 Dec 2005 14:48:41 +0000 (15:48 +0100)]
[libmultipath] hardware defaults framework overhaul
- Access to all "struct hwentry" parameters
- Removes old store_hwe{_ext} functions
- Remove unused selector_args param in all config.h structs
- Add hardware family maintainership banner, and pre-populate
- Move hardcoded minio in a defaults.h:DEFAULT_MINIO define
Please verify I didn't mess the defaults for hardware you care about,
and start claiming maintainership.
Christophe Varoqui [Mon, 19 Dec 2005 09:26:31 +0000 (10:26 +0100)]
[multipathd] remove unused variable
Christophe Varoqui [Mon, 19 Dec 2005 09:25:08 +0000 (10:25 +0100)]
[multipathd] "multipath" is a "map" synonym
Like "multipaths" is a "maps" synonym
Christophe Varoqui [Sun, 18 Dec 2005 10:53:01 +0000 (11:53 +0100)]
[multipathd] convert another user to find_mp_by_str()
Christophe Varoqui [Sun, 18 Dec 2005 10:46:43 +0000 (11:46 +0100)]
[multipathd] add "show map $map topo" CLI command
multipathd> sho map dm-1 topo
mpath0 (149455400000000000000000000000000d00600000b000000)
[size=67 GB][features=1 queue_if_no_path][hwhandler=0]
\_ round-robin 0 [prio=10][enabled]
\_ 3:0:0:1 sdb 8:16 [active][ready]
\_ round-robin 0 [prio=6][enabled]
\_ 4:0:0:1 sde 8:64 [active][ready]
and :
multipathd> sho map mpath0 topo
mpath0 (149455400000000000000000000000000d00600000b000000)
[size=67 GB][features=1 queue_if_no_path][hwhandler=0]
\_ round-robin 0 [prio=0][enabled]
\_ 3:0:0:1 sdb 8:16 [active][ready]
\_ round-robin 0 [prio=0][enabled]
\_ 4:0:0:1 sde 8:64 [active][ready]
Christophe Varoqui [Fri, 16 Dec 2005 21:07:13 +0000 (22:07 +0100)]
[multipathd] allow shortcut in CLI syntax
For example "li maps topo" is allowed and synonymous of "list maps
topology".
Christophe Varoqui [Fri, 16 Dec 2005 20:48:37 +0000 (21:48 +0100)]
[multipathd] change last CLI command syntax
"show multipaths" was confusing because "show maps" looks so awfuly close.
Now :
1) "multipaths" is a "maps" synomym
2) "show multipaths topology" shows what "show multipaths" did
There is a bit of function naming sanitizing in the lib too.
Christophe Varoqui [Tue, 13 Dec 2005 13:46:53 +0000 (14:46 +0100)]
[libmultipath] tweaks for IBM / SGI common hardware
here's a small update for the hardware table.
I've added a new controller (IBM DS4100), which uses the same controller
than SGI TPC. For a proper support I had to relax the checks in pp_tpc
slightly.
Secondly, it sets the FAILBACK for all machines supported by pp_tpc to
-FAILBACK_IMMEDIATE, as we cannot (yet) adjust the path setting. Hence
we need to switch back to the preferred path as soon as it becomes
available again.
Hannes Reinecke, Suse
Christophe Varoqui [Fri, 9 Dec 2005 16:02:27 +0000 (17:02 +0100)]
[build] Makefile cleanup
Fixup CFLAGS so that it can be adjusted by setting 'OPTFLAGS'
from the commandline.
General cleanup of Makefiles; move common parts into Makefile.inc.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Fri, 9 Dec 2005 15:59:57 +0000 (16:59 +0100)]
[devmapper] Compilation fixes
As we're returning a strdup()ed string from dm_mapname() it hardly
qualifies as 'const'.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Fri, 9 Dec 2005 15:58:53 +0000 (16:58 +0100)]
[kpartx] Add suport for S/390 ECKD DASD
This patch adds support for S/390 ECKD DASD partition tables.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Fri, 9 Dec 2005 15:54:48 +0000 (16:54 +0100)]
[devmapper] Check mapname length
dm_task_get_name might return a zero-length string, which also
seem to indicate an invalid mapname. Fix dm_mapname() to always
return NULL if either no mapname or an zero-length mapname
was returned.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Fri, 9 Dec 2005 15:40:53 +0000 (16:40 +0100)]
[multipathd] add "show multipaths" CLI command
Mimics the 'multipath -ll' output in the CLI.
Christophe Varoqui [Fri, 9 Dec 2005 15:39:10 +0000 (16:39 +0100)]
[libmultipath] groundwork to share print_mp() between multipath & deamon
Introduce snprint_mp() and teach print_mp() to use it.
print_mp() uses a 64 lines buffer, which mean multipath(8) can only
print 62 "paths or pathgroup". Daemon will use the buffer doubling
trick to work around that.
You are allowed to report your unhappiness about this default :/
Christophe Varoqui [Wed, 7 Dec 2005 22:54:04 +0000 (23:54 +0100)]
[kpartx] use lseek64 instead of self-defined syscall
Hannes Reinecke, Suse
Christophe Varoqui [Wed, 7 Dec 2005 22:40:41 +0000 (23:40 +0100)]
[priority] new prioritizer for some SGI hardware (take 2)
Add to files for real.
Hannes Reinecke, Suse
Christophe Varoqui [Wed, 7 Dec 2005 22:39:01 +0000 (23:39 +0100)]
[libmultipath] add DASD discovery profile
Make DASD fits the vendor/product scsi-ism the tools use to
index its hardware table.
Hannes Reinecke, Suse
Christophe Varoqui [Wed, 7 Dec 2005 22:29:38 +0000 (23:29 +0100)]
[multipathd] adjust oom_adj to the 2.6.14 standards
As of 2.6.14, the kernel will only accept oom_adj values of > -17.
Writing '-17' into oom_adj will be ignored. This patch fixes the
value to -16.
Hannes Reinecke, Suse
Christophe Varoqui [Wed, 7 Dec 2005 22:23:32 +0000 (23:23 +0100)]
[libmultipath] SGI hardware defaults tuning
Switch TPs to GROUP_BY_PRIO now that we have a priority checker
That enables multiple paths to the prefered array port to
be grouped together and load-balanced. I'll do that and see if users get
annoyed.
Suggested by Hannes Reinecke, Suse
Christophe Varoqui [Wed, 7 Dec 2005 14:23:55 +0000 (15:23 +0100)]
[libmultipath] add some IBM hardware defaults
Hannes Reinecke, Suse
Christophe Varoqui [Wed, 7 Dec 2005 14:23:06 +0000 (15:23 +0100)]
[priority] new prioritizer for some SGI hardware
Hannes Reinecke, Suse
Christophe Varoqui [Thu, 1 Dec 2005 20:58:49 +0000 (21:58 +0100)]
[kpartx] bug fixes for dos extended partition [4/4]
There is meaninglessly duplicated code in read_dos_pt().
It should be safe to remove it.
un'ichi "Nick" Nomura, NEC
Christophe Varoqui [Thu, 1 Dec 2005 20:57:29 +0000 (21:57 +0100)]
[kpartx] bug fixes for dos extended partition [3/4]
in the for loop in read_extended_partition,
'here' is updated if the next extended partition is found.
However, the 'here' value should be updated in the next while loop.
Otherwise it's possible that following partition table
entry refers updated value and generate wrong mapping.
I'm not sure if there is any partitioning tool which can generate
such table. But it's safer to fix this.
Jun'ichi Nomura, NEC
Christophe Varoqui [Thu, 1 Dec 2005 20:54:15 +0000 (21:54 +0100)]
[kpartx] bug fixes for dos extended partition [2/4]
kpartx usually doesn't create a mapping for extended partition.
However, it does if it's empty.
It's harmless but not consistent.
Attached patch makes it consistent by not creating a mapping
even when the extended partition is empty.
Please consider to apply.
If you have logical partitions in extended partition:
# parted /dev/sdc p
Disk geometry for /dev/sdc: 0.000-34686.000 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 7.844 31.376 extended
5 7.875 23.532 logical
No mapping is created for extended partition:
# dmsetup table|grep sdc|sort
sdc5: 0 32067 linear 8:32 16128
However, if the extended partition is empty:
# parted /dev/sdc p
Disk geometry for /dev/sdc: 0.000-34686.000 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 7.844 31.376 extended
The following mapping is created:
# dmsetup table|grep sdc|sort
sdc1: 0 48195 linear 8:32 16065
Jun'ichi Nomura, NEC
Christophe Varoqui [Thu, 1 Dec 2005 20:50:27 +0000 (21:50 +0100)]
[kpartx] bug fixes for dos extended partition [1/4]
the latest kpartx generates wrong mapping for
MS-DOS extended partitions.
Attached patch fixes the problem.
Please consider to apply.
Consider you created the following partition table.
# parted /dev/sdc p
Disk geometry for /dev/sdc: 0.000-34686.000 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 7.844 primary
2 7.844 31.376 extended
5 7.875 23.532 logical
6 23.563 31.376 logical
kpartx should generate the following mappings:
# dmsetup table|grep sdc|sort
sdc1: 0 16002 linear 8:32 63
sdc5: 0 32067 linear 8:32 16128
sdc6: 0 16002 linear 8:32 48258
However, actually it generates:
# dmsetup table|grep sdc|sort
sdc1: 0 16002 linear 8:32 63
sdc5: 0 32067 linear 8:32 16128
sdc6: 0 16065 linear 8:32 80325
sdc7: 0 16002 linear 8:32 48258
Jun'ichi Nomura, NEC
Christophe Varoqui [Wed, 30 Nov 2005 08:52:12 +0000 (09:52 +0100)]
[multipathd] move show_{paths,maps} in cli_handlers.c
Near their users.
Christophe Varoqui [Tue, 29 Nov 2005 17:01:05 +0000 (18:01 +0100)]
[libmultipath] remove remnents of the old print padding framework
Christophe Varoqui [Tue, 29 Nov 2005 16:35:33 +0000 (17:35 +0100)]
[libmultipath] extend the printing framework
- for pathgroup information printing
- for print_mp() start of integration
Christophe Varoqui [Tue, 29 Nov 2005 14:14:49 +0000 (15:14 +0100)]
[libmultipath] sysfs_get_size() returning 0 is not necessarily an error
0-sized devices exist in real life but sysfs_get_size() returns 0 on
errors.
Current behaviour cascade the failure in :
- sysfs_get_size
- up to sysfs_pathinfo
- up to pathinfo
- up to discovery
Not fair at all.
So feed the &size as sysfs_get_size() parameter and use the return code
only to report status to caller.
Noted by Maxim Kozover
Christophe Varoqui [Tue, 29 Nov 2005 10:08:39 +0000 (11:08 +0100)]
[libmultipath] remove math lib dependency
The new printing framework does not need the math lib anymore.
So remove it from the includes and Makefiles.
Christophe Varoqui [Tue, 29 Nov 2005 10:05:08 +0000 (11:05 +0100)]
[libmultipath] drop the path cache
- remove the cache library files
- remove the cache loading in multipath
- remove the "dump pathvec" facility in multipathd
- remove a small cache assertion in the discovery
Christophe Varoqui [Tue, 29 Nov 2005 08:55:41 +0000 (09:55 +0100)]
[libmultipath] max column size incorrectly trimed to 32 in previous patch
Set it back to 64 to enable display of full wwid fields.
Christophe Varoqui [Mon, 28 Nov 2005 16:15:59 +0000 (17:15 +0100)]
[libmultipath] fix multipath renaming
This handles a rename from within multipath
now only via multipath.conf file.
Edward Goggin, EMC
Christophe Varoqui [Mon, 28 Nov 2005 13:53:23 +0000 (14:53 +0100)]
[libmultipath] extensible padded printing framework
And decrement author shame counter :/
Christophe Varoqui [Mon, 28 Nov 2005 08:38:09 +0000 (09:38 +0100)]
[multipathd] add "show maps stats" CLI command
xa-s05:~# multipathd -k"show maps stats"
name sysfs path_fails switch_grp map_loads total_q_time q_tmo
mpath0 dm-0 1 4424 2 0 0
mpath1 dm-1 0 13717 2 0 0
Christophe Varoqui [Thu, 24 Nov 2005 17:06:06 +0000 (18:06 +0100)]
[libmultipath] log-friendly version of print_mp() in domap()
Seeing this in log files is not nice :
mpath1 (149455400000000000000000000000000d20600000b000000)
[size=33 GB][features="1 queue_if_no_path"][hwhandler="0"]
\_ round-robin 0 [enabled]
\_ 8:0:0:2 sdc 8:32 [active][undef]
\_ round-robin 0 [enabled]
\_ 9:0:0:2 sde 8:64 [active][undef]
\_ round-robin 0 [enabled]
\_ 10:0:0:2 sdg 8:96 [active][undef]
\_ round-robin 0 [active]
\_ 6:0:0:2 sdl 8:176 [active][undef]
Let's rather print this :
Nov 24 18:05:38 | mpath1: load table [0
71122560 multipath 0 0 4 1
round-robin 0 1 1 8:32 100 round-robin 0 1 1 8:64 100 round-robin 0 1 1
8:96 100 round-robin 0 1 1 8:176 100]
Christophe Varoqui [Thu, 24 Nov 2005 16:43:53 +0000 (17:43 +0100)]
[multipathd] make clear in the logs what triggered an action
Nov 24 17:37:58 | mpath0: event checker started
Nov 24 17:37:58 | mpath1: event checker started
Nov 24 17:37:58 | path checkers start up
Nov 24 17:38:08 | sdb: add path (uevent)
Nov 24 17:38:08 | 8:16: ownership set to mpath0
Nov 24 17:38:08 | sdc: add path (uevent)
Nov 24 17:38:08 | 8:32: ownership set to mpath1
Nov 24 17:38:23 | mpath1: switch to path group #1
Nov 24 17:39:21 | mpath1: switch to path group #2 (operator)
Nov 24 17:39:36 | mpath1: switch to path group #1
Nov 24 17:39:39 | mpath0: switch to path group #2
Nov 24 17:39:42 | sdb: remove path (operator)
Nov 24 17:39:47 | mpath1: switch to path group #2
Nov 24 17:40:15 | mpath1: switch to path group #1
Nov 24 17:40:50 | sdb: remove path (uevent)
Nov 24 17:40:50 | sdb: spurious uevent, path not in pathvec
Nov 24 17:40:50 | uevent trigger error
Nov 24 17:41:03 | sdb: add path (uevent)
Nov 24 17:41:04 | 8:16: ownership set to mpath0
Christophe Varoqui [Thu, 24 Nov 2005 14:27:09 +0000 (15:27 +0100)]
[libmultipath] log the date in "multipathd -d" output
xa-s05:~/scm/multipath-tools-0.4.7# multipathd/multipathd -d
Nov 24 15:22:18 | mpath0: event checker started
Nov 24 15:22:18 | mpath1: event checker started
Nov 24 15:22:18 | path checkers start up
Nov 24 15:22:18 | mpath1: switch to path group #1
Nov 24 15:22:52 | mpath0: switch to path group #4
Nov 24 15:23:00 | mpath1: switch to path group #3
Christophe Varoqui [Thu, 24 Nov 2005 11:09:58 +0000 (12:09 +0100)]
[multipathd] remove the retry login in uev_remove_path()
The last uev_remove_path() should succeed since in addition to
removing from the map the path being removed by the uevent, it will
also remove all paths found in the current map which do not appear
in pathvec.
This avoids long delays due to path verifying in the old code.
Edward Goggin, EMC
Christophe Varoqui [Wed, 23 Nov 2005 17:03:28 +0000 (18:03 +0100)]
[multipathd] "add/del map" to keep the DM in sync
The reach that goal, the following changes were applied :
- call dm_lib_release() after each map creation/deletion
- coalesce_paths() new refwwid parameter to do scope-limiting
- flush_map() didn't really need the devname parameter, remove
- uev_{add,remove}_map extended to manipulate DM maps
- trap devmap umount events to try a little house-keeping
(For testing. Might be removed latter)
Christophe Varoqui [Wed, 23 Nov 2005 13:47:50 +0000 (14:47 +0100)]
[libmultipath] move get_refwwid() to libmultipath/configure.c
And pass "dev" and "dev_type" as params
to make it usable from multipathd.
Christophe Varoqui [Wed, 23 Nov 2005 09:57:46 +0000 (10:57 +0100)]
[multipathd] discarding an event is not an error
This avoids sending misleading "uxtrigger error" messages.
Christophe Varoqui [Wed, 23 Nov 2005 00:45:35 +0000 (01:45 +0100)]
[libmultipath] fix non-daemon build
The waiting logic in sysfs_get_bus() does not matter for multipath(8).
Pre-process it out.
Christophe Varoqui [Wed, 23 Nov 2005 00:42:18 +0000 (01:42 +0100)]
[libmultipath] move messages from crit to warn in domap()
Edward Goggin, EMC
Christophe Varoqui [Wed, 23 Nov 2005 00:38:38 +0000 (01:38 +0100)]
[libmultipath] discovery too fast for sysfs_get_bus
discovery.c:sysfs_get_bus() is unreliable in the following code path :
uev_add_path
-> store_pathinfo
-> pathinfo
Example trace :
### sdb: sdev = 539720
### sdb: attr_path = /sys/block/sdb/device
### sdb: attr_buff = /sys/devices/platform/host3/target3:0:0/3:0:0:1
### sdb: sdev->bus =
For whatever reason sysfs_open_device_path() can silently fails to
produce a usable ->bus.
As a consequence,
pp->hwe is NULL
-> mpp->hwe inherits this pp->hwe == NULL through add_map_with_path
-> the prop selectors fails to detect hardware settings
So this patch adds a sleep there.
Christophe Varoqui [Tue, 22 Nov 2005 22:02:48 +0000 (23:02 +0100)]
[multipath] resurect the rules file
I overlooked the fact we still need the rules file to handle the
partitions through kpartx.
So revert
3872743f0b2479b0450368e56a664583821bc5a3, but remove the
multipath(8) trigger from the rules file.
Christophe Varoqui [Tue, 22 Nov 2005 13:17:47 +0000 (14:17 +0100)]
[multipathd] more symmetry in lock/unlock macro usage
Edward Goggin, EMC
Christophe Varoqui [Tue, 22 Nov 2005 13:16:13 +0000 (14:16 +0100)]
[multipathd] use DM rename instead of a remove/create cycle
This patch depends on a kernel patch yet to be merged. Beware.
Also fixed callers of dm_info() to check for <=0 as an error instead of
just == 0.
Edward Goggin, EMC.