[dm-devel] [PATCH 1/2] mpathpersist: fix aptpl support

Martin Wilck mwilck at suse.com
Wed Jun 6 20:40:39 UTC 2018


On Tue, 2018-06-05 at 17:40 -0500, Benjamin Marzinski wrote:
> The "Active Persist Through Power Loss" flag must be set whenever a
> key
> is registered. However, there is no way for multipathd to know if
> this
> was set by mpathpersist. The result is that if a path goes down and
> comes back up (or if it wasn't up when mpathpersist was first run)
> multipathd will clear the aptpl flag when it reregisters the key on
> it.
> 
> To fix this, multipath.conf now accepts an optional ":aptpl" appended
> on the reservation_key value. If this is added to the reservation_key
> multipathd will set the aptpl flag when it reregisters the key. If
> reservation_key is set to "file", this will automatically be tracked
> in the /etc/multipath/prkeys file.
> 
> To track this flag in the prkeys file, without changing the format
> I've made "0x<key>" stand for non-aptpl keys, and "0X<key>" stand
> for aptpl keys. Since previously, all keys used a lower-case x, this
> will default to the current behavior for existing keys. Obviously,
> the
> next time mpathpersist is run, this will be changed if --param-aptpl
> is used.  Since there are no more flags that are in sg_persist that
> multipathd needs to care about in mpathpersist, there shouldn't need
> to be any more flags added to the prkeys file.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>

Reviewed-by: Martin Wilck <mwilck at suse.com>

-- 
Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)




More information about the dm-devel mailing list