platform/upstream/multipath-tools.git
16 years ago[libmultipath] update sysfs code
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.

16 years ago[libmultipath] Update discovery to work with new sysfs layout
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.

16 years ago[libmultipath] ignore nonascii characters in multipath.conf
Benjamin Marzinski [Tue, 15 Jan 2008 23:32:02 +0000 (00:32 +0100)]
[libmultipath] ignore nonascii characters in multipath.conf

16 years ago[doc] Document "queue_if_no_path" behavior
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.

16 years ago[config] fixes some wrong annotations about default value.
Kiyoshi Ueda [Tue, 15 Jan 2008 23:09:11 +0000 (00:09 +0100)]
[config] fixes some wrong annotations about default value.

16 years ago[libmultipath] fix the "too many files" error
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.

16 years agoMerge branch 'origin'
Christophe Varoqui [Wed, 9 Jan 2008 00:28:20 +0000 (01:28 +0100)]
Merge branch 'origin'

16 years ago[libmultipath] reset the multipath struct "action" field after usage
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.

16 years ago[libmultipath] discard trailing whitespaces from vendor/product strings
Christophe Varoqui [Wed, 9 Jan 2008 00:11:01 +0000 (01:11 +0100)]
[libmultipath] discard trailing whitespaces from vendor/product strings

16 years ago[libmultipath] add %s wildcard the multipath printing function
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

16 years ago[libmultipath] correctly place a whitespace in "multipath -l" output
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.

16 years ago[libprio] random prio was still printing instead of returning value
Christophe Varoqui [Tue, 8 Jan 2008 22:37:47 +0000 (23:37 +0100)]
[libprio] random prio was still printing instead of returning value

fix

16 years agokpartx: remove unused "-n" code
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>
16 years agokpartx: on delete process partitions in reverse order
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>
16 years agokpartx: document "-g"
Guido Guenther [Mon, 26 Nov 2007 15:20:16 +0000 (16:20 +0100)]
kpartx: document "-g"

Signed-Off-By: Guido Guenther <agx@sigxcpu.org>
16 years ago[libprio] initial commit
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.

16 years ago[libmultipath] update path group prio on pg display
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.

16 years ago[libmultipath] change all readsector0 defaults to directio
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.

16 years ago[libmultipath] fix "show devices" CLI command
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
    ...

16 years ago[defaults] add Pivot3 RAIGE defaults
Christophe Varoqui [Sun, 11 Nov 2007 08:26:04 +0000 (09:26 +0100)]
[defaults] add Pivot3 RAIGE defaults

Submitted by Bart Brooks, Pivot3

16 years ago[libmultipath] blacklist exceptions issues
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.

16 years ago[defaults] rename hp_sw hwhandler
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>
16 years ago[defaults] new cciss multipath-capable hardware
Christophe Varoqui [Wed, 24 Oct 2007 20:29:41 +0000 (22:29 +0200)]
[defaults] new cciss multipath-capable hardware

16 years ago[kpartx] use uint64_t to account slices start/size
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.

16 years ago[kpartx] missing ptr init
Christophe Varoqui [Wed, 10 Oct 2007 20:42:55 +0000 (22:42 +0200)]
[kpartx] missing ptr init

Redhat fix, pushed by Gerald Nowitzky.

16 years ago[libmultipath] filter_wwid() is called with the wrong lists from filter_path()
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>
16 years ago[multipathd] extract a spaghetto from checkerloop()
Christophe Varoqui [Sat, 11 Aug 2007 12:33:06 +0000 (14:33 +0200)]
[multipathd] extract a spaghetto from checkerloop()

Code reorg only.

16 years ago[multipathd] fail/reinstate CLI commands disable/enable path checker
Christophe Varoqui [Sat, 11 Aug 2007 08:41:31 +0000 (10:41 +0200)]
[multipathd] fail/reinstate CLI commands disable/enable path checker

The "fail path X" CLI command was an interesting debug tool, showing the checkers automatically reinstating the failed path. But some fun spoilers want to use the thing to prepare cable unplugs and other maintenance ops. So make the command also care about diabling and enabling the checker to inhibit auto-reinstates.

16 years ago[libmultipath] update version 0.4.8
Christophe Varoqui [Thu, 2 Aug 2007 21:05:37 +0000 (23:05 +0200)]
[libmultipath] update version

16 years ago[multipathd] Add SuSE init script
Hannes Reinecke [Thu, 2 Aug 2007 20:56:01 +0000 (22:56 +0200)]
[multipathd] Add SuSE init script

16 years ago[libmultipath] add missing action messages
lbt [Mon, 30 Jul 2007 22:25:12 +0000 (00:25 +0200)]
[libmultipath] add missing action messages

There was some garbled output after renaming a multipath device and rerunning multipath.  This is just a minor fix to add some actions that were missing.

16 years ago[libmultipath] initial support for cciss multipathing
Hannes Reinecke [Mon, 30 Jul 2007 22:03:09 +0000 (00:03 +0200)]
[libmultipath] initial support for cciss multipathing

Whatever HP wants from this support, which is still not clear to me, merge this work from Hannes as an initial stage.

Beware Proliant owners: "unipathing" finest technology is comming to you.

16 years ago[priority] pp_sgi is actually a RDAC controller familly prioritizer
Christophe Varoqui [Mon, 30 Jul 2007 21:36:57 +0000 (23:36 +0200)]
[priority] pp_sgi is actually a RDAC controller familly prioritizer

So rename, as suggested by Hannes.

16 years ago[checkers] emc_clariion: change scsi read buffer size to 4096 bytes
Guido Guenther [Mon, 30 Jul 2007 21:27:29 +0000 (23:27 +0200)]
[checkers] emc_clariion: change scsi read buffer size to 4096 bytes

648833108fc5a95cbe15bd779289e98165c34d25 changed the scsi read buffer to 4096
bytes but forgot the emc patch checker. This fixes an immediate segfault on
startup.

16 years ago[multipathd] remove sysfs devices from cache
Hannes Reinecke [Wed, 25 Jul 2007 19:10:40 +0000 (21:10 +0200)]
[multipathd] remove sysfs devices from cache

Whenever a device is really removed from any multipath map we should
also remove it from the cache. Otherwise we'll induce a memory leak.

16 years ago[multipathd] whitespace cleanup
Hannes Reinecke [Tue, 24 Jul 2007 20:32:43 +0000 (22:32 +0200)]
[multipathd] whitespace cleanup

multipathd/main.c has quite some 'interesting' whitespace usage.
Better stick to established coding rules.

16 years ago[libmultipath] Add "^dcssblk[0-9]*" to default blacklist.
Stefan Bader [Tue, 24 Jul 2007 17:59:22 +0000 (19:59 +0200)]
[libmultipath] Add "^dcssblk[0-9]*" to default blacklist.

Added some System z specific device nodes, which would otherwise cause
problems, to default blacklist.

16 years ago[libmultipath] cache sysfs_devices
Guido Guenther [Fri, 20 Jul 2007 22:13:51 +0000 (00:13 +0200)]
[libmultipath] cache sysfs_devices

this one fixes the described bug of paths coming back as different block
devices:

Keep a list of sysfs devices for sysfs_device_get() so uev_trigger() can look
up the necessary information for proper path removal in case of a 'remove'
uevent - the sysfs files in the filesystem might be long gone at this point.

This also plugs a memory leak where we'd malloc space for the same sysfs device
over and over again for every processed uevent.

16 years ago[libmultipath] revert e1e1a1bfb2cf76bfd1a49335e3deec5360fb09db
Christophe Varoqui [Fri, 13 Jul 2007 21:26:12 +0000 (23:26 +0200)]
[libmultipath] revert e1e1a1bfb2cf76bfd1a49335e3deec5360fb09db

Counter productive change concerning hardware showing ghost paths,
like rdac.

17 years ago[libmultipath] filter_wwid() called with the wrong lists from filter_path()
Stefan Bader [Wed, 11 Jul 2007 21:43:37 +0000 (23:43 +0200)]
[libmultipath] filter_wwid() called with the wrong lists from filter_path()

I just found a small glitch blacklist.c. Patch is attached.

17 years ago[doc] Remove all statements of readsector0 as default checker
Christophe Varoqui [Thu, 5 Jul 2007 05:44:50 +0000 (07:44 +0200)]
[doc] Remove all statements of readsector0 as default checker

17 years ago[checkers] directio now is the internal default checker
Christophe Varoqui [Thu, 5 Jul 2007 05:41:33 +0000 (07:41 +0200)]
[checkers] directio now is the internal default checker

The directio is more advanced than readsector0 : async and unbuffered.
Make it the default choice.

17 years ago[checkers] handle >512 sector size in readsector0
John Kingman [Wed, 4 Jul 2007 21:38:53 +0000 (23:38 +0200)]
[checkers] handle >512 sector size in readsector0

I encountered a problem with the sg_read() routine in readsector0.c
while testing an InfiniBand target having 4096 byte sectors.  The
sg_read() routine assumes that sectors are 512 bytes long.

A patch for the problem follows.

Signed-off-by: Christophe Varoqui <christophe.varoqui@free.fr>
17 years ago[kpartx] kpartx large file support
Szabolcs Szakacsits [Tue, 3 Jul 2007 21:10:54 +0000 (23:10 +0200)]
[kpartx] kpartx large file support

Apparently -D_LARGEFILE64_SOURCE doesn't always work:

failed to stat() 40GB-disk.img: Value too large for defined data type

Potential fix what we're using everywhere on many platforms with no
reported LFS problems for 5 years:

17 years ago[Prioritizer] HDS update
Matthias Rudolph [Wed, 27 Jun 2007 21:35:52 +0000 (23:35 +0200)]
[Prioritizer] HDS update

o queue_if_no_path in hwtable.c
o tur instead of readsector0 in hwtable.c
o get prio with device name instead of major:minor in hwtable.c and pp_hds_modular.c

Signed-off-by: Christophe Varoqui <christophe.varoqui@free.fr>
17 years agoEase installation of unstripped binaries
Guido Guenther [Tue, 19 Jun 2007 07:15:19 +0000 (09:15 +0200)]
Ease installation of unstripped binaries

Introduce INSTALL_PROGRAM for installing binaries, so that:

make install INSTALL_PROGRAM=install

doesn't stip binaries on installation. The default is to still strip
binaries. Can be very handy for debugging builds.

Signed-off-by: Guido Guenther <agx@sigxcpu.org>
17 years agomove kpartx_id to /lib/udev
Guido Guenther [Sat, 16 Jun 2007 18:07:15 +0000 (20:07 +0200)]
move kpartx_id to /lib/udev

17 years agoCall /lib/udev/scsi_id instead of /sbin/scsi_id
Guido Guenther [Sat, 16 Jun 2007 18:07:14 +0000 (20:07 +0200)]
Call /lib/udev/scsi_id instead of /sbin/scsi_id

17 years ago[kpartx] remove bashisms from kpartx_id
Guido Guenther [Mon, 18 Jun 2007 23:19:10 +0000 (01:19 +0200)]
[kpartx] remove bashisms from kpartx_id

17 years ago[libmultipath] care for read-only alias file
Benjamin Marzinski [Mon, 18 Jun 2007 23:05:28 +0000 (01:05 +0200)]
[libmultipath] care for read-only alias file

On bootup, the bindings file in can't be written to.
This was causing multipath to not check it for aliases.
Now, it the bindings file is on a read-only filesystem,
it will be opened read-only.

17 years ago[libchecker] restore synchronous checker operation to async-capable checkers
Christophe Varoqui [Mon, 18 Jun 2007 22:49:36 +0000 (00:49 +0200)]
[libchecker] restore synchronous checker operation to async-capable checkers

Add a "sync" flag the struct checker to inform the checker the caller wants a synchronous or asynchronous answer to path status request.

Default value is "synchronous" to kept legacy code unchanged.

Set async mode in the daemon checker loop.

17 years ago[libcheckers] async path checking in the framework
Christophe Varoqui [Thu, 14 Jun 2007 23:12:40 +0000 (01:12 +0200)]
[libcheckers] async path checking in the framework

The directio path checker was recently moved to aio API, but the behaviour is still synchronous : io_getevents() blocks until (long) timeout expires.

Truely asynchronous behaviour imposes to
o lower the io_getevents timeout to mininum
o treat a new "pending" checker return status in the daemon (reschedule the checker early for a new io_getevents until the "long" timeout expires)

This patch explores this. This approach has the nice effect to behave well with still-synchronous checker. The daemon should see no regression. But multipath, which assumes synchronous path checking, is for now broken ... to be repaired.

Please comment abundantly this approach, before I start moving ahead.

17 years ago[libcheckers] use async I/O for directio checker
Hannes Reinecke [Tue, 12 Jun 2007 14:25:55 +0000 (16:25 +0200)]
[libcheckers] use async I/O for directio checker

The directio checker will block until the request is returned.
We should rather use async I/O to guarantee that the checker
will return after a certain time so as not to stall the entire
daemon.

Signed-off-by: Stefan Bader <bader@de.ibm.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christophe Varoqui <christophe.varoqui@free.fr>
17 years ago[build] exclude hidden dirs from the build candidates
Guido Günther [Sun, 10 Jun 2007 22:05:16 +0000 (00:05 +0200)]
[build] exclude hidden dirs from the build candidates

make sure we don't try to build in .svn, .pc, .git or other SCM metadata
directories.

Guido Günther <agx@sigxcpu.org>

17 years ago[libmultipath] fix debugging macro
Christophe Varoqui [Sat, 9 Jun 2007 16:37:04 +0000 (18:37 +0200)]
[libmultipath] fix debugging macro

Minor cleanup: let the macro do something useful when DEBUG is defined

Signed-off-by: Guido Guenther <agx@sigxcpu.org>
17 years ago[multipathd] Fix segfault on disappearing paths
Christophe Varoqui [Sat, 9 Jun 2007 16:35:09 +0000 (18:35 +0200)]
[multipathd] Fix segfault on disappearing paths

The path might already be gone when we process the udev event, in this case
sysfs_device_get return NULL:

Jun 09 16:56:06 | ID_FS_LABEL=
Jun 09 16:56:06 | ID_FS_LABEL_SAFE=
Jun 09 16:56:06 | DEVLINKS=/dev/disk/by-id/scsi-1494554000000000000000000000000010000069d0000000d /dev/disk/by-path/ip-10.0.0.3:3260-iscsi-iqn.2006-12.nix.rs45:storage.disk1-lun-0 /dev/disk/by-uuid/c8db60a3-7795-45cd-8369-a0f9ee876032
Jun 09 16:56:06 | DEVNAME=/dev/sda
/block/sda
open '/block/sda'
stat '/sys/block/sda' failed: No such file or directory
Segmentation fault (core dumped)

Signed-off-by: Guido Guenther <agx@sigxcpu.org>
17 years ago[kpartx] assorted build warning fixes
Christophe Varoqui [Thu, 7 Jun 2007 21:18:25 +0000 (23:18 +0200)]
[kpartx] assorted build warning fixes

o dm_task_get_uuid(dmt) returns a const char, but we used a simple char
o remove unused int variable in kpartx.c

17 years ago[kpartx] Add handling for SUN partition tables
Hannes Reinecke [Mon, 21 May 2007 08:39:24 +0000 (10:39 +0200)]
[kpartx] Add handling for SUN partition tables

Not that I've come across one of these disks, but it's a nice testbed for
the stacked partition handling. And might even be useful at one point.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[kpartx] Update BSD slice handling
Hannes Reinecke [Mon, 21 May 2007 08:37:35 +0000 (10:37 +0200)]
[kpartx] Update BSD slice handling

Now that we have the logic to stack dm-tables for partitions we can
handle BSD 'c' slices (which span the entire disk) properly.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[kpartx] Update extended partition handling
Hannes Reinecke [Mon, 21 May 2007 08:35:40 +0000 (10:35 +0200)]
[kpartx] Update extended partition handling

Currently we don't handle extended partitions at all.
This patch implements a proper handling for extended partitions so that we
first create the dm device for the extended partitions and then the logical
partitions as dm devices on top of the device for the extended partition.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[libmultipath] Fix segfault, when the syfs attribute doesn't exist
Christophe Varoqui [Thu, 7 Jun 2007 20:39:45 +0000 (22:39 +0200)]
[libmultipath] Fix segfault, when the syfs attribute doesn't exist

open '/class/fc_transport/target7:0:0'/'node_name'
new uncached attribute '/sys/class/fc_transport/target7:0:0/node_name'
add to cache '/sys/class/fc_transport/target7:0:0/node_name'
stat '/sys/class/fc_transport/target7:0:0/node_name' failed: No such file or directory

This would allocate no space for attr->value but and the next lookup tries to
dereference a NULL pointer.

Signed-off-by: Guido Guenther <agx@sigxcpu.org>
17 years ago[libmultipath] Remove libsysfs
Christophe Varoqui [Thu, 7 Jun 2007 20:32:50 +0000 (22:32 +0200)]
[libmultipath] Remove libsysfs

libsysfs is deprecated and doesn't work with recent kernels.
Copied over stuff from udev and implemented our own sysfs handling.
Much saner now.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Guido Guenther <agx@sigxcpu.org>
17 years ago[libmultipath] lower libdevmapper version expectation to 1.02.08
Christophe Varoqui [Tue, 5 Jun 2007 23:21:28 +0000 (01:21 +0200)]
[libmultipath] lower libdevmapper version expectation to 1.02.08

In fact, I guess it could be lowered again since the Makefile
detects features available in the lib (no_flush for example).

Feel free to make me lower it again if needed.

17 years ago[libmultipath] scalability fix for devt2devname()
Christophe Varoqui [Tue, 5 Jun 2007 23:17:54 +0000 (01:17 +0200)]
[libmultipath] scalability fix for devt2devname()

Move from the sysfs /block/*/dev nodes walking in search of maj:min
to a single file walking (/proc/partitions)

Based on idea and initial implementation from Hannes Reinecke, Suse.

17 years ago[udev] rules files for event proxying and kpartx split (2)
Christophe Varoqui [Tue, 5 Jun 2007 21:50:20 +0000 (23:50 +0200)]
[udev] rules files for event proxying and kpartx split (2)

So that multipathd can use the udev-provided socket for event listening
and kpartx can have a truly independent udev setup (think dmraid without
multipath case).

Hannes Reinecke, Suse.

17 years ago[udev] rules files for event proxying and kpartx split
Christophe Varoqui [Mon, 4 Jun 2007 21:41:24 +0000 (23:41 +0200)]
[udev] rules files for event proxying and kpartx split

So that multipathd can use the udev-provided socket for event listening
and kpartx can have a truly independent udev setup (think dmraid without
multipath case).

Hannes Reinecke, Suse.

17 years ago[multipathd] Use udev socket as source of events instead of Netlink socket
Christophe Varoqui [Mon, 4 Jun 2007 21:37:39 +0000 (23:37 +0200)]
[multipathd] Use udev socket as source of events instead of Netlink socket

When available. Keeps Netlink as a fallback.
Proper udev setup is required for this to work.
Patch to install such a setup follow.

Hannes Reinecke, Suse.

17 years ago[multipath] make install error on multipath.conf.5
Christophe Varoqui [Mon, 4 Jun 2007 21:32:36 +0000 (23:32 +0200)]
[multipath] make install error on multipath.conf.5

multipath.conf.5 was not compressed in the install target of the Makefile.
Do that, and move the gzips in the prepare target to factorize a bit too.

17 years ago[libmultipath] new devmapper log handler needs stdarg.h
Christophe Varoqui [Mon, 21 May 2007 22:24:22 +0000 (00:24 +0200)]
[libmultipath] new devmapper log handler needs stdarg.h

As it uses the va_list type.

Signed-off-by: Christophe Varoqui <christophe.varoqui@free.fr>
17 years ago[libmultipath] Fix pp_alua install target
Hannes Reinecke [Mon, 21 May 2007 08:06:42 +0000 (10:06 +0200)]
[libmultipath] Fix pp_alua install target

The install target in the pp_alua Makefile should reference the
program, not the build target. Otherwise the program gets recompiled
on each install.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[multipath] Add multipath.conf.5 manpage
Hannes Reinecke [Wed, 16 May 2007 11:51:43 +0000 (13:51 +0200)]
[multipath] Add multipath.conf.5 manpage

We finally have a manpage for multipath.conf.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[hwtable] Update entries for HP arrays
Hannes Reinecke [Wed, 16 May 2007 10:51:16 +0000 (12:51 +0200)]
[hwtable] Update entries for HP arrays

I finally figured out the different versions of HP storage
arrays. Thanks to Stephen Reilly of HP for this.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[libmultipath] Add new priority checker mpath_hp_sw
Hannes Reinecke [Wed, 16 May 2007 10:45:12 +0000 (12:45 +0200)]
[libmultipath] Add new priority checker mpath_hp_sw

All paths from a controller with HP Active/Standby firmware
should really be grouped according to their status; otherwise
the path switching will not work properly or you can use only
one path to that array.
This patch adds a new priority checker 'mpath_hp_sw' which
will allow these paths to be grouped accordingly.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[hwtable] Update SGI entries
Hannes Reinecke [Wed, 16 May 2007 10:41:02 +0000 (12:41 +0200)]
[hwtable] Update SGI entries

Add new entry for SGI Infinite Storage machines; and we should also
use the 'RDAC' path checker for SGI storage.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[libmultipath] Fix typo on blacklist_exceptions handler
Hannes Reinecke [Wed, 16 May 2007 10:38:24 +0000 (12:38 +0200)]
[libmultipath] Fix typo on blacklist_exceptions handler

blacklist_exceptions_handler() has a typo which prevents the handler
from working.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[hwtable] Update S/390 DASD entry
Hannes Reinecke [Wed, 16 May 2007 10:37:11 +0000 (12:37 +0200)]
[hwtable] Update S/390 DASD entry

Current s390-tools contain a program 'dasdinfo', which should be used
instead of the older 'dasd_id' program from udev.
And we should be using 'queue_if_no_path', too.

Signed-off-by: Stefan Bader <bader@de.ibm.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[multipathd] Fix handling of device-mapper devices
Hannes Reinecke [Mon, 30 Apr 2007 07:26:28 +0000 (09:26 +0200)]
[multipathd] Fix handling of device-mapper devices

Device-mapper devices are available only after a 'change' event,
so it's quite pointless to check for the 'add' event.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[libmultipath] Fix debugging output
Hannes Reinecke [Mon, 30 Apr 2007 07:23:46 +0000 (09:23 +0200)]
[libmultipath] Fix debugging output

Implement a proper output function for libdevmapper which ties
into our verbosity level. This allows us for a finer grained
control about the error messages from libdevmapper and we get
better debugging output to boot.

Signed-off-by: Stefan Bader <bader@de.ibm.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[kpartx] Use mapname for device-mapper devices
Hannes Reinecke [Wed, 16 May 2007 07:35:35 +0000 (09:35 +0200)]
[kpartx] Use mapname for device-mapper devices

When kpartx is run on a device-mapper device it makes more sense
to use the mapname for generating the device name, not the supplied
commandline arguments. This way we can run kpartx on '/dev/dm-X'
and still get sensible names.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[libmultipath] Fix overflow in circular queue
Hannes Reinecke [Wed, 16 May 2007 07:31:47 +0000 (09:31 +0200)]
[libmultipath] Fix overflow in circular queue

Multipathd has a circular buffer where messages are stored prior to being
passed into the system logs. Under certain circumstances the circular buffer
fills up; and the intention appears to be that new messages are dropped until
space is freed in the buffer.

However sometimes the result of a full circular buffer is to overwrite the
earlier messages before they have been passed to the system buffer; resulting
in the loss of early messages and corruption of later messages.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[libmultipath] Fixup EMC ALUA mode handling
Hannes Reinecke [Thu, 15 Mar 2007 08:24:15 +0000 (09:24 +0100)]
[libmultipath] Fixup EMC ALUA mode handling

Modern EMC machines support ALUA in addition to the vendor-specific
PNR (passive/not ready) method. Machines in ALUA mode will understand
PNR commands, too, so we only need to relax the check to operate
them correctly.

Signed-off-by: Ed Goggin <egoggin@vmware.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[kpartx] fix install target
Hannes Reinecke [Mon, 30 Apr 2007 06:45:54 +0000 (08:45 +0200)]
[kpartx] fix install target

The install target should refer the executable, otherwise it'll trigger
an entire rebuild.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years agokpartx: fix crash during boot
Hannes Reinecke [Tue, 20 Feb 2007 14:16:56 +0000 (15:16 +0100)]
kpartx: fix crash during boot

kpartx will crash during boot as device-mapper insists on freeing
all passed memory upon exit. So we don't have to do it.

Signed-off-by: Hannes Reinecke <hare@suse.de>
17 years ago[libmultipath] the forgotten bit
Christophe Varoqui [Wed, 16 May 2007 21:17:02 +0000 (23:17 +0200)]
[libmultipath] the forgotten bit

Thanks Hannes, for reporting this forgotten changeset.

17 years ago[multipathd] add CLI readline completion
Christophe Varoqui [Sun, 6 May 2007 22:21:17 +0000 (00:21 +0200)]
[multipathd] add CLI readline completion

This one needed a bit of work :

o Add a convenient vector_foreach_slot_after() to the vector lib
o Move all add_handler() calls from main.c to cli.c, but don't set handlers
  there. This way the multipathd binary execed as the CLI (-k flag) gains
  the leisure the load the CLI dictionnary too. Which is quite useful for
  keyword completion.
o Add a set_handler_callback() function and use it in main.c in place of
  former add_handler() calls.
o No need to compute len each vector_foreach_slot() iteration in find_key()
o get_cmdvec() returns more precise failure hints as int return value.
  The readline keyword generator needs those hints.

17 years ago[all] Path group timeout handling
Christophe Varoqui [Thu, 3 May 2007 07:37:33 +0000 (09:37 +0200)]
[all] Path group timeout handling

The config file keyword is pg_timeout.
Takes value in seconds. Default is none.
Can be set in defaults, hardware or multipath configlets.

From Redhat resync.

17 years ago[build] detect presence of dm_task_no_flush symbol in libdevmapper
Christophe Varoqui [Wed, 2 May 2007 13:58:41 +0000 (15:58 +0200)]
[build] detect presence of dm_task_no_flush symbol in libdevmapper

Fix this annoying build problem on system not yet implementing this API in
their libdevmapper package (ubuntu up to Feisty for example).

17 years ago[libmultipath] don't rely on PATH being set anymore for callouts
Christophe Varoqui [Wed, 2 May 2007 09:25:39 +0000 (11:25 +0200)]
[libmultipath] don't rely on PATH being set anymore for callouts

Redhat resync.

17 years ago[libmultipath] move from execvp to execv for callouts
Christophe Varoqui [Wed, 2 May 2007 08:55:10 +0000 (10:55 +0200)]
[libmultipath] move from execvp to execv for callouts

From Redhat resync.

17 years ago[libmultipath] split long log msg about alias lookup on 2 lines
Christophe Varoqui [Wed, 2 May 2007 08:39:51 +0000 (10:39 +0200)]
[libmultipath] split long log msg about alias lookup on 2 lines

From Redhat branch resync.

17 years ago[libmultipath] Increase the wait time for device to appear in /dev
Christophe Varoqui [Wed, 21 Mar 2007 22:10:33 +0000 (23:10 +0100)]
[libmultipath] Increase the wait time for device to appear in /dev

RDAC needs 60 sec timeout.

Chandra Seetharaman, IBM

17 years ago[libmultipath] ghost paths priorities are not set properly
Christophe Varoqui [Wed, 21 Mar 2007 22:08:43 +0000 (23:08 +0100)]
[libmultipath] ghost paths priorities are not set properly

Made some changes to honor the GHOST state while setting priorities.

Chandra Seetharaman, IBM

17 years ago[libcheckers] add new rdac checker
Christophe Varoqui [Wed, 21 Mar 2007 22:02:41 +0000 (23:02 +0100)]
[libcheckers] add new rdac checker

While working on lsi-rdac hardware handler, I found that the checkers "tur"
and "readsector0" are not serving the lsi-rdac properly. Also, the storage
device has a active/passive state which need to be handled properly.

So, I wrote a new path checker for lsi-rdac, to use the C4 inquiry page to
get the current owner of the lun and set the state as UP(active) or
GHOST(passive).

Chandra Seetharaman, IBM

17 years ago[libmultipath] blacklist logging overhaul
Christophe Varoqui [Thu, 15 Feb 2007 23:59:52 +0000 (00:59 +0100)]
[libmultipath] blacklist logging overhaul

Make blacklist functions log as much info as possible.

o exported functions are now called filter_*
o each filter_* challenges exceptions list first, then blacklist if
necessary
o each filter_* is verbose
o each filter_* wraps a silent _filter_*
o filter_path chains _filter_*
o filter_* returns negative if exception list match
o filter_* returns positive if blacklist match
o update all blacklist_*() callers
o fix "show devices" CLI command to show whitelisted devs

17 years ago[libmultipath] remove another '\n' from alias.c logs
Christophe Varoqui [Tue, 13 Feb 2007 22:50:25 +0000 (23:50 +0100)]
[libmultipath] remove another '\n' from alias.c logs

17 years ago[libmultipath] remove '\n' in binding match log
Christophe Varoqui [Tue, 13 Feb 2007 22:49:06 +0000 (23:49 +0100)]
[libmultipath] remove '\n' in binding match log

17 years ago[libmultipath] Changes hwtable.c to Support New Pillar
Christophe Varoqui [Wed, 7 Feb 2007 23:17:57 +0000 (00:17 +0100)]
[libmultipath] Changes hwtable.c to Support New Pillar

And new maintainer from Pillar Data.

Srinivas Ramani, Pillar Data

17 years ago[libmultipath] remove an unused variable in dict.c
Christophe Varoqui [Fri, 26 Jan 2007 22:58:15 +0000 (23:58 +0100)]
[libmultipath] remove an unused variable in dict.c

17 years ago[libmultipath] Blacklist exception follow-ups
Christophe Varoqui [Wed, 10 Jan 2007 22:06:09 +0000 (23:06 +0100)]
[libmultipath] Blacklist exception follow-ups

This patch adds the ability to have blacklist exceptions for vendor:product
devices.  Also, the wwid and devnode exceptions weren't getting freed
properly in free_config, so that is fixed as well.

Benjamin E. Marzinski, RedHat

17 years ago[libmultipath] blacklist exceptions
Christophe Varoqui [Sun, 7 Jan 2007 22:53:06 +0000 (23:53 +0100)]
[libmultipath] blacklist exceptions

On IBM System z we often have the problem that we have attached
several hundred devices. In case we want to use only a few of them
with mp-tools, we have to blacklist all others. For that reason I have
introduced a blacklist_exceptions keyword for the multipath.conf  which
fills an internal exception list.

Additionally this patch adds two commands to the multipathd cli to
display blacklist rules and blacklisted devices.

A multipath.conf like:
------------------- snip --------------------
blacklist {
        devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
        devnode "^hd[a-z][[0-9]*]"
        devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]"
        devnode "^dasd[a-z]+[0-9]*"
}
blacklist_exceptions {
        devnode "^dasd[c-d]+[0-9]*"
}
------------------- snap --------------------

All DASD devices are blacklisted except dasdc and
dasdd and corresponding partitions, which are listed in
the blacklist:exceptions section.
This example would produce the following output in the
"multipathd -k" cli:

------------------- snip --------------------
multipathd> show blacklist
device node rules:
- blacklist:
        (config file rule) ^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*
        (config file rule) ^hd[a-z][[0-9]*]
        (config file rule) ^cciss!c[0-9]d[0-9]*[p[0-9]*]
        (config file rule) ^dasd[a-z]+[0-9]*
        (default rule)     ^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*
        (default rule)     ^hd[a-z]
        (default rule)     ^cciss!c[0-9]d[0-9]*
- exceptions:
        (config file rule) ^dasd[c-d]+[0-9]*
wwid rules:
- blacklist:
        <empty>
- exceptions:
        <empty>
device rules:
- blacklist:
        (default rule)     DGC:LUNZ
multipathd>

multipathd> show devices
available block devices:
    dasda (blacklisted)
    dasdb (blacklisted)
    dasdc
    dasdd
    dm-0 (blacklisted)
    dm-1 (blacklisted)
    dm-2 (blacklisted)
    dm-3 (blacklisted)
    dm-4 (blacklisted)
    dm-5 (blacklisted)
    dm-6 (blacklisted)
    loop0 (blacklisted)
    loop1 (blacklisted)
    loop2 (blacklisted)
    loop3 (blacklisted)
    loop4 (blacklisted)
    loop5 (blacklisted)
    loop6 (blacklisted)
    loop7 (blacklisted)
    ram0 (blacklisted)
    ram10 (blacklisted)
    ram11 (blacklisted)
    ram12 (blacklisted)
    ram13 (blacklisted)
    ram14 (blacklisted)
    ram15 (blacklisted)
    ram1 (blacklisted)
    ram2 (blacklisted)
    ram3 (blacklisted)
    ram4 (blacklisted)
    ram5 (blacklisted)
    ram6 (blacklisted)
    ram7 (blacklisted)
    ram8 (blacklisted)
    ram9 (blacklisted)
    sda
    sdb
    sdc
    sdd
multipathd>
------------------- snap --------------------

Signed-off-by: Volker Sameske <sameske@de.ibm.com>