All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ken Raeburn <raeburn@permabit.com>
To: dm-devel@redhat.com
Subject: multipathd, mpathpersist and APTPL
Date: Thu, 08 Jan 2015 19:27:52 -0500	[thread overview]
Message-ID: <6e1tn4g5mf.fsf@just-testing.permabit.com> (raw)


If multipathd re-registers a system's reservation key along a formerly
faulty path that has started working, it will clear the APTPL (Activate
Persistence Through Power Loss) flag for all registrations on the LUN,
possibly overriding an application setting ("mpathpersist -Z") and
causing loss of all registrations upon a following power-loss event.

If some user-mode software registers the reservation key that is listed
in multipath.conf, setting the APTPL flag, and any path to the device
later transitions from faulty to ready, then multipathd will see the key
registration, and issue a MPATH_PROUT_REG_IGN_SA command with APTPL
clear. Per the SCSI spec (section 6.16.3 in draft revision 37 of SPC-4)
the APTPL setting from the last valid command processed for the LUN
dictates the device server's behavior until the next change. So APTPL=0
will override a previous APTPL=1 setting.

I've confirmed it by experimentation with a RHEL 6.6 initiator and an
SCST target (both by monitoring the existence and content of the
saved-PR file and by instrumenting the SCST driver code via SystemTap),
and by code inspection in the git.opensvc.com repository
(multipathd/main.c:mpath_pr_event_handler_fn never sets param->sa_flags
after the memset).

I think multipathd needs to be able to set the flag. I would expect some
use cases would always want the flag set if possible, but as some
devices may not support APTPL, I suspect it needs to be specified in the
config file. So I'm contemplating how to do that.

Two obvious approaches come to mind. First, a new configuration option
that can be specified along with reservation_key:

  defaults {
    reservation_key 123456abcdef
    reservation_aptpl yes
    ...
  }

Alternatively, I could imagine keeping all the reservation information
together in one config option:

  defaults {
    reservation_key "123456abcdef aptpl=1"
    ...
  }

I'm leaning slightly towards the first, and will probably try to
implement it at some point in the near future, in case anyone wants to
propose a different approach...

Ken

                 reply	other threads:[~2015-01-09  0:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e1tn4g5mf.fsf@just-testing.permabit.com \
    --to=raeburn@permabit.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.