Christophe Varoqui [Sun, 30 Nov 2008 23:35:42 +0000 (00:35 +0100)]
[doc] path_checker can't be set in a multipath {} config block
All docs wrongly stated that as valid. It is not, mainly
because path checker selection happens before assigning the
path to a multipath.
Thanks to Matthew Kent for pointing this out.
Christophe Varoqui [Sun, 30 Nov 2008 22:56:46 +0000 (23:56 +0100)]
[lib] add '%c' wildcard to display path checker type in cli
$ sudo multipathd show paths format "%d %i %c"
dev hcil checker
sdb 5:0:0:0 readsector0
sdc 5:0:0:1 readsector0
Matthew Kent [Sun, 30 Nov 2008 22:55:10 +0000 (23:55 +0100)]
[build] rpm specfile fix
catch up with recent file movement.
Christophe Varoqui [Mon, 24 Nov 2008 22:14:59 +0000 (23:14 +0100)]
[multipath] set "multipath -f|-F" return code correctly
Thanks to Diedrich Ehlerding <diedrich.ehlerding@fujitsu-siemens.com>
for reporting this.
Christophe Varoqui [Thu, 20 Nov 2008 22:16:01 +0000 (23:16 +0100)]
strip ANSI color markers in non-interactive mode
Tested with piped and redirected stdout, using either "multipath -l"
or "multipathd show topo". Seems there are no more blatant regression.
Let me know if there are, because I'm tempted to go a little further
with those ANSI codes by highlighting degrated/failure situation.
Christophe Varoqui [Wed, 19 Nov 2008 23:41:45 +0000 (00:41 +0100)]
[multipathd] easier multipathd interaction method
Previously using the CLI commands from the shell was done using :
multipathd -k"show paths format \"%w %d %i %s %t %T %D\""
Now you can also use :
multipathd -- show paths format "%w %d %i %s %t %T %D"
or
multipathd show paths format "%w %d %i %s %t %T %D"
Christophe Varoqui [Wed, 19 Nov 2008 22:26:59 +0000 (23:26 +0100)]
[lib] fix quote doubling when using "show conf"
Christophe Varoqui [Wed, 19 Nov 2008 21:52:57 +0000 (22:52 +0100)]
[lib] fix compilation warnings
Newer gcc versions are more strict with was we pass a format arg
to *printf(). Please it.
Christophe Varoqui [Wed, 19 Nov 2008 21:26:13 +0000 (22:26 +0100)]
[lib] a little try with bold term chars
... to force feedback from the community. If proven to be harmful,
I can still revert the change, but it really enhance readability of
"show topo" and "multipath -l", in my opinion.
Christophe Varoqui [Wed, 19 Nov 2008 21:17:50 +0000 (22:17 +0100)]
[lib] reset multipath field widths before printing topology
Doing a "show topo" after "show maps" gave different output than "show topo"
on a freshly started multipathd or than "multipath -ll". This is due to
"show map" doing a get_multipath_layout(), which result is persistent, and
affects all subsequent users of the snprint_*() functions.
This patch ensures a predictable output format by reseting the multipath
field widths in snprint_multipath_topology().
Christophe Varoqui [Tue, 18 Nov 2008 23:05:21 +0000 (00:05 +0100)]
[lib] printing readability enhancements
o use the ascii-mode pstree branching representation
o discard the bracketing around status informations
Christophe Varoqui [Tue, 18 Nov 2008 00:44:31 +0000 (01:44 +0100)]
[multipath] ignore header sizes when printing through "multipath -l"
This suppresses spurious whitespaces in the output.
Christophe Varoqui [Thu, 13 Nov 2008 22:52:20 +0000 (23:52 +0100)]
[multipathd] add "show maps format ..." cli command
Just like "show paths format ...", it gives users more control
over the report format of multipaths information.
Example:
$ sudo multipathd -k'show maps format "%n %s %S %d %t %r %Q %N"'
name vend/prod/rev size sysfs dm-st write_prot queueing paths
353333330000007d0 Linux,scsi_debug 8.0M dm-1 active rw - 2
353333330000007d1 Linux,scsi_debug 8.0M dm-2 active rw - 2
35333333000000bb8 Linux,scsi_debug 8.0M dm-3 active rw - 2
35333333000000bb9 Linux,scsi_debug 8.0M dm-4 active rw - 2
Christophe Varoqui [Tue, 4 Nov 2008 00:20:11 +0000 (01:20 +0100)]
Amend previous patch
Forgot to remove another fix trial remnent before commit
Christophe Varoqui [Mon, 3 Nov 2008 23:26:42 +0000 (00:26 +0100)]
[multipath] re-enable path checks in "multipath -ll"
Path checker state was reported as [undef], even when the -ll
flag was passed to multipath. This was regression.
Christophe Varoqui [Sun, 2 Nov 2008 01:19:17 +0000 (02:19 +0100)]
[multipathd] set offline path state to faulty
If not explicitely set to faulty, the default is undef.
Christophe Varoqui [Sun, 2 Nov 2008 00:52:21 +0000 (01:52 +0100)]
[lib] fix the scsi state fetching in sysfs
Wrong lookup directory for the "state" node
Christophe Varoqui [Sun, 2 Nov 2008 00:46:25 +0000 (01:46 +0100)]
[hwtable] fix old style getprio for IBM hardware
This issue failed the build. Note to contributers, upstream has a
changed its way to specify prioritizers and checkers (.so) :
.getprio => .prio_name
.checker_index => .checker_name
Yanqing Liu [Thu, 23 Oct 2008 21:00:33 +0000 (23:00 +0200)]
[lib] add defaults for Dell M3000 and M3000i
Christophe Varoqui [Thu, 23 Oct 2008 20:47:20 +0000 (22:47 +0200)]
[lib] terminate the words fetched by get_word()
get_word is used to parse words from device maps and status
for example. Not terminating these words ended up with unpleasant
outputs.
Chandra Seetharaman [Thu, 16 Oct 2008 00:20:01 +0000 (17:20 -0700)]
Add support for couple of IBM storage devices
Few of the IBM rdac storage devices are not available in the multipath
tools. This patch adds support for those.
Signed-Off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Martin Petermann [Wed, 15 Oct 2008 20:42:31 +0000 (22:42 +0200)]
[lib] libdevmapper api check
In libmultipath Makefile it is checked if the
symbol dm_task_no_flush is defined within the device mapper
library. On my system beside the library there exists a
symbolic link within the same directory pointing to this
library and containing libdevmapper.so in it's name:
lrwxrwxrwx 1 root root 20 Sep 22 22:15 /lib64/libdevmapper.so -> libdevmapper.so.1.02
-rwxr-xr-x 1 root root 89928 Feb 14 2008 /lib64/libdevmapper.so.1.02
In this case "grep -c" returns a 2 instead of 1 that is assumed
in the Makefile. I changed this check to not equal zero.
Christophe Varoqui [Sat, 11 Oct 2008 00:00:22 +0000 (02:00 +0200)]
[lib] add offlined paths logic
o don't check offlined paths
Avoids log polution and useless work
o display offlined status
This information is quite useful because offlining can be done
by the kernel as a response to an unsane situation, but un-offlining
is not automatic. This helps the offlining being aknowledged by
admins.
Christophe Varoqui [Tue, 30 Sep 2008 21:39:27 +0000 (23:39 +0200)]
[multipathd] add "quit" cli command
"exit" or "quit" may be more straight-forward than CTRL-D
Put dummy cli commands in place for auto-generated help,
even if we exit from the socket client code before sending
the command packet to the daemon.
Christophe Varoqui [Sun, 28 Sep 2008 23:37:02 +0000 (01:37 +0200)]
[multipathd] add "show wildcards" cli command
The fact I had to look at the code to find the wildcards to use
in "show paths format ...", "show multipath format ..." and
"show pathgroup format ..." was a clear sign that more help was
necessary.
The "show wildcards" command outputs :
multipath format wildcards:
%n name
%w uuid
%d sysfs
%F failback
%Q queueing
%N paths
%r write_prot
%t dm-st
%S size
%f features
%h hwhandler
%A action
%0 path_faults
%1 switch_grp
%2 map_loads
%3 total_q_time
%4 q_timeouts
%s vend/prod/rev
path format wildcards:
%w uuid
%i hcil
%d dev
%D dev_t
%t dm_st
%T chk_st
%s vend/prod/rev
%C next_check
%p pri
%S size
pathgroup format wildcards:
%s selector
%p pri
%t dm_st
And for example, "show paths format foo:%d:%S:%i", outs
foo:dev:size:hcil
foo:sda:149G:2:0:0:0
Christophe Varoqui [Sun, 28 Sep 2008 22:44:46 +0000 (00:44 +0200)]
[libmultipath] fixes for "show paths format"
o undue 1-char rollback when encountering unknown wildcard
o fix segfault when format starts with an unknown wildard
o continue parsing the format after an unknown wildcard
Dave Wysochanski [Sun, 28 Sep 2008 20:32:29 +0000 (22:32 +0200)]
[lib] Increase bindings file lock timeout to avoid failure of user_friendly_names
On setups with a large number of paths / multipath maps, contention for
the advisory lock on the bindings file may take longer than 3 seconds,
and some multipath processes may create maps based on WWID despite having
user_friendly_names set. Increasing the timeout is a simple fix that
gets us a bit further.
Jim Lester [Sun, 21 Sep 2008 10:36:33 +0000 (12:36 +0200)]
[lib] new hardware from compellent in defaults table
Christophe Varoqui [Wed, 10 Sep 2008 22:17:37 +0000 (00:17 +0200)]
[multipathd] add "show status" cli command
For now just print the number of paths in each path checker state,
if not zero. For example :
path checker states:
up 2
down 1
ghost 1
Mike Anderson [Wed, 20 Aug 2008 21:55:31 +0000 (23:55 +0200)]
[lib] add IBM IPR to hwtable.
Andrey Panin [Wed, 20 Aug 2008 21:17:45 +0000 (23:17 +0200)]
[lib] add IBM DS3400 to hwtable
Guido Günther [Tue, 19 Aug 2008 18:54:25 +0000 (20:54 +0200)]
[lib] udev as of 0.124 doesn't support -s anymore
sysfs as of 0.124 doesn't support -s anymore and the whole sysfs code
got removed, we'll have to use the devnodes in /dev/ from now on. I
also changed the last remaining call from /sbin/scsi_id to
/lib/udev/scsi_id.
Hannes Reinecke [Wed, 23 Jul 2008 20:49:52 +0000 (22:49 +0200)]
Fix whitespace issues
One wouldn't believe how many of them are in the code ...
Christophe Varoqui [Sat, 19 Jul 2008 17:11:23 +0000 (19:11 +0200)]
[lib] create read-only multipath if rw try failed
May be soon the devmapper will return more precise return codes.
Use that for now.
Christophe Varoqui [Sat, 19 Jul 2008 16:26:54 +0000 (18:26 +0200)]
[lib] abstract a little more devmapper internals
o move DEFAULT_TARGET define from defaults.h to devmapper.h
o rename DEFAULT_TARGET into TGT_MPATH (multipath)
o introduce TGT_PART (linear)
o remove the type param from functions used only with TGT_MPATH
o abstract dm_addmap() with to wrappers dm_addmap_create() and
dm_addmap_reload(). Wrappers don't require the type and task
params.
o move the dm_addmap(DM_DEVICE_CREATE, ...) cleanup on failure
from configure.c into devmapper.c::dm_addmap_create()
Christophe Varoqui [Sat, 19 Jul 2008 16:24:08 +0000 (18:24 +0200)]
[kpartx] don't return 0 if a partition removal failed
Benjamin Marzinski [Wed, 11 Jun 2008 18:46:16 +0000 (13:46 -0500)]
multipath-tools: DESTDIR makefiles cleanup
This patch makes the $(DESTDIR) makefile option for multipath-tools more
useful. First, it makes sure that everything that's installed uses it.
Second, it removes the forced root installs, so that you can can install
to any $(DESTDIR) that you have permissions for, even if you aren't
root.
Signed-off-by: Benjamin Marzinski <bmarzins redhat com>
Christophe Varoqui [Thu, 12 Jun 2008 21:36:08 +0000 (23:36 +0200)]
[multitpathd] add "show paths format" cli command
to let users extract custom reports from the daemon data stractures.
format is printf fmt-like with :
%w uuid
%i hcil
%d dev
%D dev_t
%t dm_st
%T chk_st
%s vend/prod/rev
%C next_check
%p pri
%S size
example:
$ mutlipathd -k'show paths format "/dev/%d is a path to %w"'
Stefan Haberland [Wed, 11 Jun 2008 20:51:37 +0000 (22:51 +0200)]
[lib] new hwtable entry
S/390 FBA DASDs are not blacklisted because they are not detected correctly.
Added S/390 FBA DASDs to hwtable.c to solve this problem
Hannes Reinecke [Mon, 2 Jun 2008 08:52:30 +0000 (10:52 +0200)]
Allow zero paths for multipath map
There is no reason why multipath should handle the removal
of the last path from a multipath map different than any other
path removal. In fact, in doing so we'll shed the stale reference
to the dead device in the map and allow for a clean reconnection.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Tue, 20 May 2008 13:35:10 +0000 (15:35 +0200)]
fine-grained hwentry config override
== Before:
adding
device {
vendor EMC
product FOO
checker tur
}
resets all hwentry vars not specified in the block to internal
defaults ... losing the precious bits in the internal default
hwtable.
== After:
adding the same block retains all info present in the
default hwtable and override only the bits specified in the conf
file.
Christophe Varoqui [Sun, 18 May 2008 13:07:13 +0000 (15:07 +0200)]
print the multipath map write-protection status
wildcard is %r
appears in "multipath -l" and cli command "show topo"
Christophe Varoqui [Sun, 18 May 2008 13:23:30 +0000 (15:23 +0200)]
don't include header length in column width in "show topo"
which aligns daemon output to "multipath -l" output
Christophe Varoqui [Sun, 18 May 2008 13:32:06 +0000 (15:32 +0200)]
add write protect column to "show maps status"
Christophe Varoqui [Sun, 18 May 2008 15:48:37 +0000 (17:48 +0200)]
apply the same treatment to prioritizer than Ben applied to checkers
ie:
o don't so prio shared object if not used
o error if prioritizer lib is not found instead of falling back to default
I also had to move up the multipath_dir initialization in load_config()
because add_prio/add_checker need the var to load the shared object.
Also realize the multpath_dir keyword has to be set before default:prio
and default:checker in the config file.
A correct solution would be to defer the loads to the end of the config
file processing. Contribution welcome.
Christophe Varoqui [Mon, 19 May 2008 22:07:45 +0000 (00:07 +0200)]
add '-r' option to force devmap reload
This takes care of updating the write-protection flag
of the devmap in case the write-prot of the underlying
paths has changed (and the kernel somehow has discovered
so).
Now a RO->RW change scenario for a multipathed device can
be treated with :
1/ echo 1 >/sys/block/XX/device/rescan on all paths to dev
2/ multipath -r dev
Which minimaly fulfills my needs with Symmetrix SRDF spliting
in interim of more collaboration from other subsystems.
Christophe Varoqui [Tue, 20 May 2008 08:35:18 +0000 (10:35 +0200)]
make "show conf" output usable as a /etc/multipath.conf
Some multipath.conf keywords take strings values, which can embed
spaces. Add quotes to those.
vendor
product
hwhandler
getuid
features
udev_dir
multipath_dir
and blacklist regexps
Christophe Varoqui [Wed, 21 May 2008 19:47:37 +0000 (21:47 +0200)]
track .gitignore so everyone can benefit from its presence
Christophe Varoqui [Tue, 13 May 2008 22:41:32 +0000 (00:41 +0200)]
[lib] adapt checker print function to Ben's change
Benjamin Marzinski [Tue, 13 May 2008 22:36:29 +0000 (00:36 +0200)]
[checkers]
checker_lookup() silently returns the default checker if the requested
one can't be loaded. Even worse, it the default checker can't be loaded,
it gets stuck in an infinite loop.
It seems to me that if the requested checker can't be loaded, we should
just throw an error. That's what this patch does.
multipath.conf should be order independent, and with the existing
checker code, it isn't. The multipath_dir had to be set before
you could set a checker, otherwise the checker load failed (since the
multipath_dir wasn't specified).
Hannes Reinecke [Wed, 30 Apr 2008 09:04:55 +0000 (11:04 +0200)]
Fixup Makefiles
We're now using dlopen() etc, so we should link to libdl
explicitely instead of relying on some other library to do
this for us.
And '-fPIC' is a mandatory CFLAGS setting now, not an
optimisation.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:04:50 +0000 (11:04 +0200)]
Remove DAEMON defines
We're now building just one shared library for both programs,
multipath and multipathd. So any DAEMON defines are quite
pointless.
Remove them and use 'mpp->waiter == NULL' to distinguish between
multipath and multipathd where required.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:01:04 +0000 (11:01 +0200)]
block SIGPIPE before writing to a pipe
We have to block SIGPIPE before we're writing to the communication
pipe otherwise the daemon will be killed if the listening program
terminates prematurely.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:04:59 +0000 (11:04 +0200)]
Make modules directory configurable
As we know have a separate directory for the various shared
libraries we should make this configurable.
And use that variable a prefix for dlopen() to make that
work correctly.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:03:24 +0000 (11:03 +0200)]
multipathd crash on shutdown
On shutdown multipathd flushes its internal message queue;
but we have to check if the messages on the queue are not empty.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:03:39 +0000 (11:03 +0200)]
libdevmapper prints garbage on shutdown
This patch fixes 2 logging bugs:
o multipath command prints unexpected log message like
"libdevmapper: libdm-common.c(303): Created /dev/mapper/<mapname>"
o multipathd doesn't log messages like "--------shut down------"
during the exit path
What is the problem:
o multipath command and multipathd register dm_write_log() using
dm_log_init() and it can be called from libdevmapper codes like
dm_lib_release().
o dm_write_log() references the global "conf" to find the verbosity,
but it is freed before dm_lib_release() calls dm_write_log().
o So dm_write_log() reads garbage value like big vervosity.
What does the patch do:
o multipath command sets NULL to "conf" after freeing it.
This prevents dm_write_log() from reading garbage data.
o multipath command and multipathd free "conf" after all logging
are completed, because the logging functions reference it
to find the verbosity.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:03:45 +0000 (11:03 +0200)]
Improve sense code scanning in sg_read() and tur checker
sg_read and tur should be able to correctly parse sense data,
as we might need to retry any UNIT ATTENTION sense codes.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:03:29 +0000 (11:03 +0200)]
Use 'mpatha' for user_friendly_names option
We really should use 'mpatha' instead of 'mpath0' for the
generated names with the user_friendly_names option.
Otherwise we can't distinguish them from EVMS names.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:04:38 +0000 (11:04 +0200)]
Add cciss_tur checker
The 'normal' SG_IO tur checker has some issues with cciss, so
we'd better use a dedicated path checker here.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:04:26 +0000 (11:04 +0200)]
Don't print failure messages for callouts by default
Calling 'multipath -ll' on devices with paths results in
lots of error messages; they really should be suppressed
for the normal output. The user can always have them printed
out by increasing verbosity.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:03:34 +0000 (11:03 +0200)]
Fixup varags usage
We already call va_end() at the correct position, no need to
duplicate it in log_safe().
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:04:45 +0000 (11:04 +0200)]
Define LIBDM_API_FLUSH for 64bit systems correctly
64bit Installation will have libraries in /lib64, not /lib.
So we'll have to check against this directory, too, to calculate
the correct LIBDM_API_FLUSH define.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Hannes Reinecke [Wed, 30 Apr 2008 09:04:33 +0000 (11:04 +0200)]
Update hardware table
Update the built-in hardware table with definitions for various
new machines.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Wed, 30 Apr 2008 09:37:49 +0000 (11:37 +0200)]
[lib] preparation for user-defined output format
Christophe Varoqui [Thu, 17 Apr 2008 21:06:56 +0000 (23:06 +0200)]
[build] remove references to prio callouts in spec file
Christophe Varoqui [Thu, 17 Apr 2008 21:05:29 +0000 (23:05 +0200)]
Remove devmap_name tool, redundant with dmsetup
Christophe Varoqui [Sun, 13 Apr 2008 00:57:47 +0000 (02:57 +0200)]
[lib] add "checker" keyword as an alias to "patch_checker"
Christophe Varoqui [Sat, 12 Apr 2008 21:57:57 +0000 (23:57 +0200)]
[checkers] checkers are now dlopen'ed plugins
just like prioritizers.
A lot of files shuffling too.
Christophe Varoqui [Tue, 8 Apr 2008 21:21:48 +0000 (23:21 +0200)]
[lib] merge libprio in libmultipath
There is actually just the prio plugins api files linked into libmultipath.so
Prioritizers proper go under libmultipath/prioritizers
Christophe Varoqui [Tue, 8 Apr 2008 20:55:03 +0000 (22:55 +0200)]
[build] move SHARED_FLAGS to Makefile include
Christophe Varoqui [Tue, 8 Apr 2008 20:47:34 +0000 (22:47 +0200)]
[libmultipath] remove unused KEEP_VEC define
Christophe Varoqui [Thu, 3 Apr 2008 23:05:23 +0000 (01:05 +0200)]
[libprio] prioritizer libs loading message level up'ed to 3
Christophe Varoqui [Thu, 3 Apr 2008 22:58:41 +0000 (00:58 +0200)]
Move to a shared lib model for
1) checkers (one lib for all checkers for a start)
2) prioritizers (one helper lib, plus one lib per prioritizer)
3) libmultipath
Collaterals include :
o Remove old prioritizer callouts.
o Drop the klibc support
o Add remove_map(s)/remove_map(s)_and_stop_waiter(s) helpers
Regression testing is needed now.
Hannes Reinecke [Thu, 20 Mar 2008 22:55:17 +0000 (23:55 +0100)]
[libmultipath] update sysfs code
This updates the sysfs code to work with the latest driver core
changes. Copied from udev sources.
Hannes Reinecke [Thu, 20 Mar 2008 22:53:48 +0000 (23:53 +0100)]
[libmultipath] Update discovery to work with new sysfs layout
With the new sysfs layout the parent device of a block device
it 'block', and only the parent of this is the 'real' parent.
Benjamin Marzinski [Tue, 15 Jan 2008 23:32:02 +0000 (00:32 +0100)]
[libmultipath] ignore nonascii characters in multipath.conf
Ritesh Raj Sarraf [Tue, 15 Jan 2008 23:16:41 +0000 (00:16 +0100)]
[doc] Document "queue_if_no_path" behavior
Document the queue_if_no_path behavior in situations where
all the paths to the LUN go offline.
Kiyoshi Ueda [Tue, 15 Jan 2008 23:09:11 +0000 (00:09 +0100)]
[config] fixes some wrong annotations about default value.
Benjamin Marzinski [Tue, 15 Jan 2008 22:59:04 +0000 (23:59 +0100)]
[libmultipath] fix the "too many files" error
Added a max_fds parameter to /etc/multipath.conf. This allows
you to set the maximum number of open fds that multipathd can use, like with
ulimit -n. Also added some code so that multipath closes the file descriptor
after it's used by the checker function, since multipath doesn't need to keep
them always open like multipathd does.
Christophe Varoqui [Wed, 9 Jan 2008 00:28:20 +0000 (01:28 +0100)]
Merge branch 'origin'
Christophe Varoqui [Wed, 9 Jan 2008 00:14:37 +0000 (01:14 +0100)]
[libmultipath] reset the multipath struct "action" field after usage
This is necessary for the daemon is stateful, and it will remember
this action value forever.
One example of a thing gone wrong is when daemon takes actions upon startup.
"show topo" will then always display these initial actions, though they are
long done.
Christophe Varoqui [Wed, 9 Jan 2008 00:11:01 +0000 (01:11 +0100)]
[libmultipath] discard trailing whitespaces from vendor/product strings
Christophe Varoqui [Tue, 8 Jan 2008 23:39:57 +0000 (00:39 +0100)]
[libmultipath] add %s wildcard the multipath printing function
same as %s for path printing function,
prints the vendor/product string
Christophe Varoqui [Tue, 8 Jan 2008 23:07:23 +0000 (00:07 +0100)]
[libmultipath] correctly place a whitespace in "multipath -l" output
When user_friendly_names is no set, wwid and dm-* infos are not correctly separed. Fix.
Christophe Varoqui [Tue, 8 Jan 2008 22:37:47 +0000 (23:37 +0100)]
[libprio] random prio was still printing instead of returning value
fix
Guido Guenther [Mon, 26 Nov 2007 15:20:37 +0000 (16:20 +0100)]
kpartx: remove unused "-n" code
Signed-Off-By: Guido Guenther <agx@sigxcpu.org>
Guido Guenther [Mon, 26 Nov 2007 15:27:32 +0000 (16:27 +0100)]
kpartx: on delete process partitions in reverse order
otherwise we try to remove the extended partition of MSDOS labels
(/dev/mapper/mpathX-part[1-4]) before the logical partition
/dev/mapper/mpathX-partY (Y>5) which fails.
Signed-Off-By: Guido Guenther <agx@sigxcpu.org>
Guido Guenther [Mon, 26 Nov 2007 15:20:16 +0000 (16:20 +0100)]
kpartx: document "-g"
Signed-Off-By: Guido Guenther <agx@sigxcpu.org>
Christophe Varoqui [Mon, 19 Nov 2007 00:12:23 +0000 (01:12 +0100)]
[libprio] initial commit
Priority callouts are nice, but have drawbacks.
1) multipathd holds a fd per path, but callouts have to open another for themselves. Which may fail.
2) callouts stored on a multipahed filesystem may hang multipathed on paging operation when there are no active path for the hosting device (getprio is in the salvation codepath). The window is small but Netapp fault injection tool manage to triggers the bug reliably.
This patch merges to priority methods in multipathd.
Christophe Varoqui [Sun, 18 Nov 2007 18:26:44 +0000 (19:26 +0100)]
[libmultipath] update path group prio on pg display
pg prio was previously only computed upon switching.
Updating upon display make sense too.
Christophe Varoqui [Sun, 18 Nov 2007 18:10:12 +0000 (19:10 +0100)]
[libmultipath] change all readsector0 defaults to directio
Follow-up the readsector0 deprecation in favor of the async
directio checker.
Christophe Varoqui [Sun, 18 Nov 2007 18:01:15 +0000 (19:01 +0100)]
[libmultipath] fix "show devices" CLI command
Whatever this command was intented to do, it did not.
I still don't see the usefulness, but now it displays :
...
sdf devnode whitelisted, monitored
sdb devnode whitelisted, unmonitored
sda devnode whitelisted, unmonitored
ram15 devnode blacklisted, unmonitored
...
Christophe Varoqui [Sun, 11 Nov 2007 08:26:04 +0000 (09:26 +0100)]
[defaults] add Pivot3 RAIGE defaults
Submitted by Bart Brooks, Pivot3
Christophe Varoqui [Sat, 10 Nov 2007 01:22:26 +0000 (02:22 +0100)]
[libmultipath] blacklist exceptions issues
the current situation is fishy. Ben pointed a true braino in the
code I introduced when restructuring the blacklist lib :
in _filter_path(), I test each _filter_*() for r!=0 , where I intented
to check for r>0.
r==0 implements : "exit on first blacklist or exception match".
r>0 implements : "exit on first blacklist match".
With this later behaviour I can set things like that for max safety and
efficiency :
blacklist {
devnode .*
device {
vendor .*
product .*
}
wwid .*
}
blacklist_exceptions {
devnode sd.*
device {
vendor IET.*
product .*
}
wwid "
1646561646265.*"
}
or pragmatically :
blacklist {
devnode .*
wwid .*
}
blacklist_exceptions {
devnode sd.*
wwid "
1646561646265.*"
}
Working that out, I also realized there may be another small
misbehaviour :
First, a little background on path discovery operations :
1) /sys/block parsing shows devnode names
2) devnode names examination shows device identification strings
3) these strings help us choose a getuid helper, which finally shows
wwids
Meaning we want the devnode blacklisting to prevail over device and
wwid, in case we know we don't have device strings available (loop, dm-,
raw, ...)
Similarily, we want the device blacklist to prevail over wwid, in case
we know we don't have getuid callout available. I have no example for
this case though, so it shouldn't be as important as the previous one.
Problem is we challenge _filter_device() after _filter_wwid().
This can be easily shufled around.
Christophe Varoqui [Wed, 24 Oct 2007 20:31:21 +0000 (22:31 +0200)]
[defaults] rename hp_sw hwhandler
HP storageworks handler has been submitted upstream. During the review,
the name of the handler was changed from "dm_hp" to "dm-hp" for consistency
with kernel code. This patch updates the hwtable for these HP arrays
Signed-off-by: Dave Wysochanski <dwysocha redhat com>
Christophe Varoqui [Wed, 24 Oct 2007 20:29:41 +0000 (22:29 +0200)]
[defaults] new cciss multipath-capable hardware
Christophe Varoqui [Wed, 10 Oct 2007 21:13:31 +0000 (23:13 +0200)]
[kpartx] use uint64_t to account slices start/size
And thus support >2TB partitioned devices.
Redhat patch, pushed by Gerald Nowitzky.
Christophe Varoqui [Wed, 10 Oct 2007 20:42:55 +0000 (22:42 +0200)]
[kpartx] missing ptr init
Redhat fix, pushed by Gerald Nowitzky.
Stefan Bader [Fri, 14 Sep 2007 17:48:08 +0000 (19:48 +0200)]
[libmultipath] filter_wwid() is called with the wrong lists from filter_path()
When filter_path() calls filter_wwid() it passes the devnode lists instead
of the wwid lists.
Signed-off-by: Christophe Varoqui <christophe.varoqui@free.fr>
Christophe Varoqui [Sat, 11 Aug 2007 12:33:06 +0000 (14:33 +0200)]
[multipathd] extract a spaghetto from checkerloop()
Code reorg only.