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.
Christophe Varoqui [Tue, 22 Nov 2005 11:13:34 +0000 (12:13 +0100)]
[libmultipath] DCG hardware defaults do not apply to "LUN_Z"
Christophe Varoqui [Tue, 22 Nov 2005 10:56:04 +0000 (11:56 +0100)]
[libmultipath] don't switchgroup on map create in multipathd
Keep the old behaviour for multipath(8)
Christophe Varoqui [Mon, 21 Nov 2005 23:00:53 +0000 (00:00 +0100)]
[libmultipath] remove redondant and wrong adopt_paths in setup_multipath
This caused already loaded maps to disappear at daemon startup.
Christophe Varoqui [Mon, 21 Nov 2005 21:46:33 +0000 (22:46 +0100)]
[build] legacy files update
- ChangeLog purged, now points to the web
- README was too outdated to live
- FAQ points to the web
Christophe Varoqui [Mon, 21 Nov 2005 17:02:05 +0000 (18:02 +0100)]
[build] remove the udev rules file handling
Christophe Varoqui [Mon, 21 Nov 2005 17:00:03 +0000 (18:00 +0100)]
[multipathd] DM configuration final cut
This one adds the multipath maintenance through uevents {add,remove} path
handlers.
Edward Goggin, EMC.
Christophe Varoqui [Mon, 21 Nov 2005 16:25:25 +0000 (17:25 +0100)]
[multipathd] DM configuration ground work #2
This patch enables DM configuration at multipathd startup.
To achieve that simple goal, the following steps were necessary :
- new libmultipath/structs_vec.[ch] exporting high level method working
on [vectored] {path,multipath} structs :
- set_no_path_retry
- adopt_paths
- orphan_paths
- orphan_path
- verify_paths
- update_mpp_paths
- setup_multipath
- update_multipath_strings
- remove_map
- stop_waiter_thread_func *stop_waiter, int purge_vec);
- remove_maps
- add_map_without_path
- add_map_with_path
- teach coalesce_path() to use add_map_with_path() and verify_paths()
- add a configure() function to the daemon
- teach multipathd to coalesce its map vector after configuration
- multipathd/main.c:reconfigure() restarts the configuration process
Fixed 2 bugs in the implementation from Edward Goggin :
- set mpp wwid before the binded alias lookup so that friendly names
work
- allocate a mpp->paths in adopt_paths() when mpp->pg is NULL and we
must store a path there
And fixed one long standing careless bug in all structs.c:find_*().
Being passed a NULL vector shortcuts the lookups now.
Christophe Varoqui [Mon, 21 Nov 2005 11:25:49 +0000 (12:25 +0100)]
[multipathd] DM configuration ground work
- introduce update_mpp_paths() to refresh mpp->paths out of mpp->pg
- fix 2 segfault in uev_{add,del}_path logging in error paths
- split add_map_without_path() out of uev_add_map()
- adopt_paths() to take a pathvec as 1st param instead of a full "vecs"
- select round robin weights in setup_multipath()
- uev_add_map to return if map is already registered instead of the purge
plus re-register cycle
Christophe Varoqui [Mon, 21 Nov 2005 10:05:48 +0000 (11:05 +0100)]
[multipathd] add logs in waiteventloop() error paths
Also renames unblock_sighup to unblock_signals, as it now unblocks
sighup *and* sigusr1
Christophe Varoqui [Mon, 21 Nov 2005 09:40:48 +0000 (10:40 +0100)]
[multipathd] use SIGUSR1 to reap waiters and reconfigure upon SIGHUP
Edward Goggin, EMC
Christophe Varoqui [Mon, 21 Nov 2005 09:25:54 +0000 (10:25 +0100)]
[multipathd] more flexible remove_map()
Add two params to remove_map() :
- a function pointer to a waiter thread stop method
NULL if you don't want to stop it (or know it is already down)
- an int purge_vec, to control the multipath vector maintenance
Also remove a superfluous block in stop_waiter_thread()
Mostly from the Edward Goggin, EMC, patch-chest.
Christophe Varoqui [Thu, 17 Nov 2005 21:21:04 +0000 (22:21 +0100)]
[libmultipath] coalesce_path() skips 0-sized paths
These paths can appears in pathvec now that disassemble_map() stores
the paths in pathvec in addition to mpp->pg.
Christophe Varoqui [Thu, 17 Nov 2005 16:49:13 +0000 (17:49 +0100)]
[libmultipath] fix pathcount wildcard
Christophe Varoqui [Thu, 17 Nov 2005 16:41:11 +0000 (17:41 +0100)]
[libmultipath] uevent asynchronous processing
I think block add/remove uevents are getting lost because (1) there is but
a single multipathd thread responsible for servicing these uevents and (2)
the service time for a single uevent can be quite long. While not
foolproof, as long the netlink uevent socket uses unreliable datagrams, I
implemented a "more complete" solution for this problem by using a queue
for received, but not yet processed uevents in the multipathd and allocated
another thread for servicing this queue.
This approach will allow the uevent_listen thread to simply queue a request
before returning to retrieve more uevents. While this queue could get
quite large, at least it will not be limited to the constraints imposed by
the Linux kernel's maximum socket receive buffer size.
Edward Goggin, EMC
Christophe Varoqui [Thu, 17 Nov 2005 16:38:31 +0000 (17:38 +0100)]
[libmultipath] pathcount(mpp, PATH_WILD) counts paths in any state
Christophe Varoqui [Thu, 17 Nov 2005 15:50:43 +0000 (16:50 +0100)]
[libmultipath] move coalesce_path() to libmultipath/configure.c
and consequences ...
- coalesce_paths() and all functions used only in this code path are
folded into configure.c
- move print_*() to libmultipath/print.c, although they are only needed
for multipath(8) (in their current form)
- declare {map,path}_layout as globals in print.c so we can now remove
them from the parameter list in all print.c-exported functions
Now we can use coalesce_path() from multipathd.
Christophe Varoqui [Thu, 17 Nov 2005 13:43:04 +0000 (14:43 +0100)]
[multipathd] rename init_paths() to init_vecs()
Resync with the function real action.
From Edward Goggin patch-chest.
Christophe Varoqui [Thu, 17 Nov 2005 13:39:13 +0000 (14:39 +0100)]
[multipathd] release libdevmapper ressources on exit path
Christophe Varoqui [Thu, 17 Nov 2005 13:31:38 +0000 (14:31 +0100)]
[build] add the netapp prioritizer in the spec file
Christophe Varoqui [Thu, 17 Nov 2005 13:29:06 +0000 (14:29 +0100)]
[libmultipath] split free_multipath_attributes() out of free_multipath()
Code factorization in update_multipath_strings()
From Edward Goggin, EMC, patch-chest
Christophe Varoqui [Thu, 17 Nov 2005 11:06:03 +0000 (12:06 +0100)]
[libmultipath] move pathcount() to libmultipath/structs.c
Edward Goggin proposed to move it.
Agreed, though I prefer to put it here.
Christophe Varoqui [Thu, 17 Nov 2005 10:51:15 +0000 (11:51 +0100)]
[libmultipath] store the pgpolicy function pointer in struct multipath
- setup the pointer in libmultipath/propsel.c:select_pgpolicy
- use in multipath/main.c:setup_map()
Edward Goggin, EMC, patch-chest
Christophe Varoqui [Thu, 17 Nov 2005 09:48:26 +0000 (10:48 +0100)]
[libmultipath] failback mode definition fix in hwtable
FAILBACK_* are negative.
Edward Goggin, EMC
Christophe Varoqui [Thu, 17 Nov 2005 09:43:30 +0000 (10:43 +0100)]
[libmultipath] disassemble_map to store undiscovered path in pathvec too
Edward Goggin, EMC
Christophe Varoqui [Thu, 17 Nov 2005 09:34:23 +0000 (10:34 +0100)]
[libmultipath] move assemble_map() in libmultipath/dmparser.c
Now it rests near its sister-function disassemble_map().
Edward Goggin, EMC
Christophe Varoqui [Wed, 16 Nov 2005 16:24:48 +0000 (17:24 +0100)]
[libmultipath] extend the scope of the "rr_min_io" keyword to hwe and mpe
Can now specify per device instance or device type rr repeat counts in
the config file.
Edward Goggin, EMC, and me.
Christophe Varoqui [Wed, 16 Nov 2005 15:26:10 +0000 (16:26 +0100)]
[libmultipath] don't re-select the getprio fn when not needed
The pp->getprio was used
1) to store the prioritizer function pointer
2) to determine if the prioritizer was already selected
But NULL is a valid value for already selected getprio.
Which causes uneeded re-selection.
So introduce a pp->getprio_selected flag to straight this out.
Edward Goggin, EMC
Christophe Varoqui [Wed, 16 Nov 2005 14:19:48 +0000 (15:19 +0100)]
[multipath] sysfs_get_bus() should return an int
Christophe Varoqui [Wed, 16 Nov 2005 09:49:20 +0000 (10:49 +0100)]
[multipathd] print "immediate" as failback val in "show maps" cli command
Edward Goggin, EMC
Christophe Varoqui [Wed, 16 Nov 2005 09:27:21 +0000 (10:27 +0100)]
[multipathd] find_mp_by_minor() fix
Do not refer to variable mpp before it is set.
Edward Goggin, EMC
Christophe Varoqui [Wed, 16 Nov 2005 09:23:28 +0000 (10:23 +0100)]
[multipathd] path group priority calculation fix
Used local variable to tally path group priority in select_path_group
since the current code uses an accumulative algorithm thereby increasing
the path groups priority every time this function is called.
Edward Goggin, EMC
Christophe Varoqui [Wed, 16 Nov 2005 09:14:58 +0000 (10:14 +0100)]
[multipathd] show maps/paths to grow its output buffer
Thus adapt to large setups needs : Up to or greater than a 8,500 byte
buffer to handle 140 paths spread over 35 maps.
Edward Goggin, EMC
Christophe Varoqui [Wed, 16 Nov 2005 08:57:04 +0000 (09:57 +0100)]
[multipathd] set the netlink uevent socket's rcv buf to 262,142
Doing so will help avoid dropping uevents during the time that the
listen pthread does not have a receive buffer posted.
Edward Goggin, EMC
Christophe Varoqui [Wed, 16 Nov 2005 08:43:38 +0000 (09:43 +0100)]
[multipathd] superfluous unlock() in uevent discard code path
Removed.
Found and fixed by Edward Goggin, EMC
Christophe Varoqui [Wed, 16 Nov 2005 08:29:44 +0000 (09:29 +0100)]
[multipathd] fix a segv in enable_group()
pp->mpp->pg should not be NULL when entering enable_group().
Failing update_multipath_strings() can lead to such a situation.
So check its return value and abord early.
Christophe Varoqui [Tue, 15 Nov 2005 14:38:48 +0000 (15:38 +0100)]
[multipath] fill in the wwid field for path discovered by the map parser
There is a false assumption in the involved code path :
- the devmap parser adds paths to the vector and fills only the dev_t field
- update_paths() fills the rest but assumes that the wwid is already set
by the parser. It could have, as the map uuid is available, but it did
not because we can't trust the map.
So teach update_paths() to refresh the wwid too.
Christophe Varoqui [Tue, 15 Nov 2005 09:52:55 +0000 (10:52 +0100)]
[priority] new NetApp prioritizer small fixes
- tame build warnings about uncasted string in strncmp and strlen
- add the FAILBACK_UNDEF default field in hwtable
Christophe Varoqui [Tue, 15 Nov 2005 09:43:40 +0000 (10:43 +0100)]
[priority] new NetApp prioritizer
Dave Wysochanski, NetApp
Christophe Varoqui [Tue, 15 Nov 2005 09:16:52 +0000 (10:16 +0100)]
[legal] seed the copyright headers
I tried to get it right from the first shot.
But experience showed it never works that way.
So please send corrections for inaccuracies and forgotten credits.
Regards,
cvaroqui
Christophe Varoqui [Sat, 12 Nov 2005 07:52:19 +0000 (08:52 +0100)]
[libmultipath] new hardware defaults
Pillardata hardware info submitted by Brian Wong.
Christophe Varoqui [Sat, 12 Nov 2005 00:09:18 +0000 (01:09 +0100)]
[multipathd] fix offline devices reported as active
multipathd(8) continues calling reinstate_path() in checkerloop(),
if multipathd(8) is started on the system which has multipath maps
including offline devices.
The reason is pp->checkfn() returns -1 for offline devices and
pp->state of these paths are 1.
(I'm using "echo offline > /sys/block/sd?/device/state" for the testing.)
As a result, multipathd(8) makes offline devices active state.
And this behavior also affects the no_path_retry feature, since
struct multipath.nr_active is incremented in reinstate_path().
The following patch fixes this problem.
If the return value from pp->checkfn is -1, the path isn't available.
So I think that we can ignore it.
Kiyoshi Ueda, NEC
Christophe Varoqui [Fri, 11 Nov 2005 23:14:30 +0000 (00:14 +0100)]
[build] fix the "rpm" make target
John Steinman reported "make rpm" was broken.
This is due to files disappearing and others spawning.
This patch bringd the spec file in sync with reality.
Christophe Varoqui [Fri, 11 Nov 2005 15:46:20 +0000 (16:46 +0100)]
[multipath] set version and date strings
Getting ready to release.
Christophe Varoqui [Fri, 11 Nov 2005 12:50:18 +0000 (13:50 +0100)]
[multipathd] remove daemonize() unused variable
Christophe Varoqui [Fri, 11 Nov 2005 12:48:42 +0000 (13:48 +0100)]
[multipathd] don't care interpreting "\n" as a cli command
CR epileptics like me are happier now.
multipathd>
multipathd>
multipathd>
multipathd>
multipathd>
multipathd>
multipathd>
Christophe Varoqui [Fri, 11 Nov 2005 09:39:05 +0000 (10:39 +0100)]
[multipathd] small fixes
There was a spot where multipathd's reply length forgot to count the NULL,
and I noticed that the way domap go rewritten, the dry-run option doesn't
print out the maps.
This patch fixes both.
Benjamin Marzinski, Redhat
Christophe Varoqui [Wed, 9 Nov 2005 22:45:30 +0000 (23:45 +0100)]
[multipathd] improved daemon setup
If you log into a machine and start the multipathd daemon, you will hang on
logout, because multipathd doesn't fully detach itself from the calling
processes. Also, occasionally the device mapper library functions will
print
error messages to stdout. These appear in the terminal that was used to
start multipathd, if it was started by hand (not by init scripts). To fix
these
I added some code to fully daemonize multipathd, and redirect stdout and
stderr to /dev/console.
Benjamin Marzinski, Redhat
Christophe Varoqui [Fri, 4 Nov 2005 09:37:03 +0000 (10:37 +0100)]
[multipathd] stop switch to best PG when no PG is active
To do that I added struct multipath:bestpg to store
switchgroup:select_path_group() result.
struct multipath:nextpg now only store current DM setting.
So the test is now (bestpg != nextpg) to trigger a switchgroup.
Christophe Varoqui [Fri, 4 Nov 2005 09:06:06 +0000 (10:06 +0100)]
[libmultipath] move the async logger in libmultipath, part2
Remove old files
Christophe Varoqui [Fri, 4 Nov 2005 08:17:33 +0000 (09:17 +0100)]
[libmultipath] move the async logger in libmultipath
Brian Wong, Pillardata, suggested and implemented this to avoid
cross dependencies.
Christophe Varoqui [Thu, 3 Nov 2005 21:41:46 +0000 (22:41 +0100)]
[multipathd] fix failback
Refresh mpp->hwe before select_failback() in setup_multipath().
Proposed by Lan Tran, IBM, and Edward Goggin, EMC.
Christophe Varoqui [Tue, 1 Nov 2005 07:56:02 +0000 (08:56 +0100)]
[multipathd] link to ncurses instead of curses
Brian Wong, Pillardata, reports SLES does not package libcurses.
He suggested linking to ncurses instead. Done and verified on
Debian Sarge and RHEL4u0.
Christophe Varoqui [Mon, 31 Oct 2005 11:12:05 +0000 (12:12 +0100)]
[multipathd] "add map" cli command to accept map names as param
Christophe Varoqui [Mon, 31 Oct 2005 11:06:39 +0000 (12:06 +0100)]
[multipathd] "del map" cli command to acces map names as param
Christophe Varoqui [Mon, 31 Oct 2005 10:44:03 +0000 (11:44 +0100)]
[libmultipath] embed a struct dm_info pointer in struct multipath
- replace dm_get_state() by a generic dm_get_info()
- move mpp->minor users to mpp->dmi->minor
- move mpp->dmstate users to mpp->dmi->suspended
- cli handlers for resume/suspend map now trigger dm_get_info()
instead of playing directly with mpp->dmstate : more reliable
Christophe Varoqui [Mon, 31 Oct 2005 08:54:31 +0000 (09:54 +0100)]
[libmultipath] rename dm_reinstate() to dm_reinstate_path()
More explicit, and in line with dm_fail_path()
Christophe Varoqui [Mon, 31 Oct 2005 08:51:01 +0000 (09:51 +0100)]
[libmultipath] devmapper.c messaging functions consolidation
Add dm_message(), and use it at a backend for adhoc messaging fns.
Christophe Varoqui [Mon, 31 Oct 2005 08:31:35 +0000 (09:31 +0100)]
[libmultipath] rename find_mp() to find_mp_by_alias()
More coherent with find_mp_by_wwid() and find_mp_by_minor()
Christophe Varoqui [Mon, 31 Oct 2005 08:16:06 +0000 (09:16 +0100)]
[multipathd] add "reinstate/fail path $path" CLI commands
Christophe Varoqui [Sat, 29 Oct 2005 14:26:51 +0000 (16:26 +0200)]
[libmultipath] add vector_del_slot() checks
Verify that the slot number we where asked to delete is not "< 0" nor
"> VECTOR_SIZE()".
Christophe Varoqui [Fri, 28 Oct 2005 22:28:43 +0000 (00:28 +0200)]
[multipathd] handle map dmstate reporting through "show maps" CLI cmd
- fetch dmstate a startup
- keep map state in sync in suspend/resume cli handlers
- add the print.[ch] bits
Christophe Varoqui [Fri, 28 Oct 2005 21:46:30 +0000 (23:46 +0200)]
[multipathd] add "suspend/resume map" cli commands
Suggested by Narasimha Doraswamy, HP and others
Christophe Varoqui [Fri, 28 Oct 2005 13:48:57 +0000 (15:48 +0200)]
[multipath] fix early exit for blacklisted scope-limiting-device
we tried to compare conf->dev to the blacklist entries, but entries are
usually of the {sda,sdb,...} form and conf->dev of the /dev/sda form.
No chance of succes !
This was noticed following a related behaviour reported by Maxim Kozover
xa-s05:~/scm/multipath-tools-0.4.6# multipath/multipath /dev/ram0 -v3
ram0 blacklisted
... now that early enough.
Christophe Varoqui [Fri, 28 Oct 2005 13:11:33 +0000 (15:11 +0200)]
[multipath] empty path uid is not a valid response from get_refwwid()
Maxim Kozover noted that 'multipath /dev/fd0' does not limit the scope
as expected. One of the reason is that get_refwwid happily returns blank
refwwid. Make it clear that it's not a valid scope.
Christophe Varoqui [Fri, 28 Oct 2005 12:57:21 +0000 (14:57 +0200)]
[multipath] path list printing tweaks
Don't print headers when the list is empty
Christophe Varoqui [Fri, 28 Oct 2005 08:44:03 +0000 (10:44 +0200)]
[multipathd] don't print headers when there is nothing to list
Christophe Varoqui [Fri, 28 Oct 2005 08:18:59 +0000 (10:18 +0200)]
Christophe Varoqui [Fri, 28 Oct 2005 08:12:58 +0000 (10:12 +0200)]
[multipathd] more useful error message in setup_multipath() error path
Christophe Varoqui [Fri, 28 Oct 2005 08:05:26 +0000 (10:05 +0200)]
[multipathd] fix stop_waiter_thread() segv
This happened when asked to shut a waiter for a map with NULL mpp->waiter.
A code path from dm_get_maps -> setup_multipath (fails) can trigger that.
Christophe Varoqui [Fri, 28 Oct 2005 07:21:08 +0000 (09:21 +0200)]
[multipathd] remove pthread_cancel logic to stop waiter a thread
Rely only on the ioctl interruption through a signal, proposed by
Ben. Note we never actually used this code before, my bad.
Christophe Varoqui [Thu, 27 Oct 2005 10:35:27 +0000 (12:35 +0200)]
[multipathd] dmt leak in waitevent() error path
... and nullify some pointers after free.
Christophe Varoqui [Thu, 27 Oct 2005 09:57:08 +0000 (11:57 +0200)]
[libmultipath] fix regfree fix in config.c:find_hwe()
Christophe Varoqui [Thu, 27 Oct 2005 09:31:29 +0000 (11:31 +0200)]
[libmultipath] fix leak in regexp usage
Valgrind learned me the existence of regfree() :/
Christophe Varoqui [Thu, 27 Oct 2005 09:08:31 +0000 (11:08 +0200)]
[libmultipath] plug leaks with libsysfs usage in discovery.c
- forgot to sysfs_close_device() in "bus" fetching
- leaked a sysfs_dir on error path
Christophe Varoqui [Thu, 27 Oct 2005 08:42:46 +0000 (10:42 +0200)]
[libmultipath] remove exit() 1 : discovery.c
Christophe Varoqui [Thu, 27 Oct 2005 08:14:03 +0000 (10:14 +0200)]
[libmultipath] remove exit() 1 : pgpolicies.c
Christophe Varoqui [Thu, 27 Oct 2005 07:56:58 +0000 (09:56 +0200)]
[libmultipath] remove exit() 1 : uevent.c
Christophe Varoqui [Thu, 27 Oct 2005 07:48:41 +0000 (09:48 +0200)]
[libmultipath] User friendly names enhancements
- add a '-b' flag to multipath(8) to let user specify the bindings file
location
- move from "non blocking lock plus retrys" to "blocking lock plus timeout"
Benjamin Marzinski, Redhat
Christophe Varoqui [Wed, 26 Oct 2005 20:50:36 +0000 (22:50 +0200)]
[libmultipath] maps printing tweaking++
Add two new wildcards :
* %Q : queueing policy changer countdown (no_path_retry)
* %n : number of active paths
Output is like that :
xa-s05:~/scm/multipath-tools-0.4.6# multipathd -k"show maps"
name sysfs failback queueing paths
mpath0 dm-0 XXXXXXXX.. 17/20 5 chk 2
mpath1 dm-1 XXXXXXX... 7/10 5 chk 2
Christophe Varoqui [Wed, 26 Oct 2005 20:47:55 +0000 (22:47 +0200)]
[multipathd] fix no_path_retry keyword handling in multipathd
The no_path_retry keyword can be set in a "device configlet", but
libmultipath/propsel.c:select_no_path_retry(mpp) uses mpp->hwe to get at
it. But we didn't care setting mpp->hwe. Do that now.
Christophe Varoqui [Wed, 26 Oct 2005 10:12:35 +0000 (12:12 +0200)]
[multipath] scope limiting fixes
- move get_refwwid after load_cache
- fix broken wwid matching in filter_pathvec
Christophe Varoqui [Wed, 26 Oct 2005 09:32:25 +0000 (11:32 +0200)]
[multipath] devt2devname() mis-ordered parameters
This error caused scope limiting to major:minor not to work as expected.
Christophe Varoqui [Wed, 26 Oct 2005 09:07:54 +0000 (11:07 +0200)]
[multipath] get_refwwid() tweaking
- don't recode strdup() everywhere
- get_user_friendly_wwid() does allocate, not need to strdup() again.
This was a leak proper
Christophe Varoqui [Wed, 26 Oct 2005 08:56:24 +0000 (10:56 +0200)]
[multipath] allow scope limiting to a "user_friendly name"
Uses the new lookup in libmultipath/alias.[ch]
Also move the get_refwwid upper in the code.
Christophe Varoqui [Wed, 26 Oct 2005 08:54:09 +0000 (10:54 +0200)]
[libmultipath] add a alias to wwid lookup to the binding subsystem
Useful for multipath(8) scope limiting to an alias.
Christophe Varoqui [Tue, 25 Oct 2005 14:39:37 +0000 (16:39 +0200)]
[multipath] don't reload map if features differs and no_path_retry is set
Indeed, setting no_path_retry delegate the "features" handling to the
daemon. multipath(8) loses the privilege to play with this field after
the map is initially loaded.
Christophe Varoqui [Tue, 25 Oct 2005 14:23:33 +0000 (16:23 +0200)]
[libmultipath] add mpath[0..n] feature forgoten files
/libmultipath/alias.[ch] were forgoten when the patch was commited.
Christophe Varoqui [Tue, 25 Oct 2005 14:12:56 +0000 (16:12 +0200)]
[multipathd] add 'show maps' header
Christophe Varoqui [Tue, 25 Oct 2005 13:44:49 +0000 (15:44 +0200)]
[libmultipath] print tweaks++
Introduce a PRINT_PROGRESS macro.
Factorize use in snprint_{path,map}
Christophe Varoqui [Tue, 25 Oct 2005 13:29:09 +0000 (15:29 +0200)]
[libmultipath] printing tweaking
- unchecked prio reported as '#'
- unchecked dm path state reported as '[undef]'
- priority heading is know called 'pri' instead of 'prio'
(coherent with tools like ps, top, etc ...)
Christophe Varoqui [Tue, 25 Oct 2005 13:22:12 +0000 (15:22 +0200)]
[all] User friendly names patch
This is a patch to add the option of more user friendly names for the
multipath maps, in the form of mpath<n>. It adds a configuration option
"user_friendly_names". If set, it will cause multipath to check a bindings
file for the names. The bindings file (/var/lib/multipath/bindings) has
alias to wwid mappings. If multipath finds its wwid in the file, it uses
the associated alias. If not, it creates a new alias, and adds the binding
to the bindings file. If the config option is not set, multipath defaults
to it's regular behavior. Specific aliases in /etc/multipath.conf override
this behavior.
Benjamin Marzinski, Redhat
Christophe Varoqui [Mon, 24 Oct 2005 13:35:54 +0000 (15:35 +0200)]
[libmultipath] printing enhancements and fixes
- [enh] align path uuid
- [fix] PAD() macro could overflow
- [enh] add line header for paths (print.c:snprint_path_header)
- [enh] align pathvec dumps in 'multipath -v3' and print header
- [enh] remove heading and trailing white line in multipathd cli output
- [enh] print header in cli's 'show paths' mode
Christophe Varoqui [Mon, 24 Oct 2005 08:09:03 +0000 (10:09 +0200)]
[libmultipath] handle no_path_retry keyword in hardware entries
Now this keyword can be set in the default, multipath and device
config blocks.
Christophe Varoqui [Sun, 23 Oct 2005 20:51:40 +0000 (22:51 +0200)]
[multipath] claimed path handling overall
Detecting path claims during the discovery, and all paths, exposes
us to open(..., O_EXCL) collisions. Paths could appear as claimed when
they are not actually.
Visible effect is, during a udev add storm (driver loading), rarely,
a map would not appear when it should have. This was reported by
Maxim Kozover.
This patch remove all pp->claimed usage and allows DM_DEVICE_CREATE to
fail when loading a map with claimed paths (with libdevmapper logging
shut). But cleanup the mess on error.
Christophe Varoqui [Sun, 23 Oct 2005 18:51:47 +0000 (20:51 +0200)]
[libmultipath] message when a map can't be flush because in use
Christophe Varoqui [Fri, 21 Oct 2005 09:49:19 +0000 (11:49 +0200)]
[multipath] Fix -F appearing twice in the multipath -h output
multipath -h shows 2 options using "-F", where only one of them should be using
-F and another -f. Redhat Bugzilla #171366.
B. Nocera, Redhat
Christophe Varoqui [Thu, 20 Oct 2005 21:27:12 +0000 (23:27 +0200)]
[libmultipath] some more snprint_path() beautifying
- align priority values (too bad log10 needs -lm build flag)
- remove a redundant trailing whitespace after #:#:#:#
- pad states
- scale completion bar to 10 chars