From: Christophe Varoqui <christophe.varoqui@free.fr>
To: device-mapper development <dm-devel@redhat.com>,
linux-scsi@vger.kernel.org
Cc: Christophe Varoqui <christophe.varoqui@free.fr>
Subject: Read-Only devices, multipath and more
Date: Fri, 16 May 2008 21:35:44 +0200 [thread overview]
Message-ID: <1210966544.12901.51.camel@plop> (raw)
Hi,
I'll try to summarize the facts about how linux kernel (scsi and
device-mapper) and userspace (multipath-tools) handles devices
RO->RW->RO changes.
The sample setup is 2 x EMC Symmetrix systems, with a pair of logical
unit configured for synchronous inter-system replication (SRDF). In a
normal situation, the LU receiving the data updates (the R2) is RO,
while the LU emitting the data updates (the R1) is RW. Let's take this
state as a starting point.
Server S1 sees R1. Server S2 sees R2
---
t0)
storage state: R1 (RW) <- sync -> R2 (RO)
action: Linux system on S2 freshly rebooted.
fact: scsi paths to R2 are reported read-only by "hdparm -r"
fact: device-mapper refuse to load a RW multipath table on these paths
(ie without libdevmapper:set_task_set_ro())
question: should change this behaviour to allow to load a RW multipath
table on these paths and let the IO be failed by the storage hardware ?
t1)
storage state: R1 (RW) <- split -> R2 (RW)
action: none
fact: scsi paths to R2 are still reported read-only by "hdparm -r"
fact: device-mapper still refuse to load a RW multipath table on these
paths
fact: if a RO multipath table was loaded at t0, it is still RO at t1
question: shouldn't the write protection change be detected by the scsi
kernel subsystem, or should we implement a userspace device polling ?
question: how do we detect from userspace the device write protection
change ? (trying to load a multipath devmap is not a good test).
sg-utils maybe ? in multipathd or in a separe daemon, as the issue
extends beyond multipathing ?
action: echo 1>/sys/block/sd{a,b}/device/rescan
fact: the write protection flags are updated to the correct RW state and
multipath then works as expected
question: is there a softer way to update the write proctection flags ?
t2)
storage state: R1 (RW) <- resync -> R2 (RO)
action: none
fact: the RW multipath devmap is still loaded
question: so why not permit to load it in the first place ?
---
This scenario shows there is an annoying lack of consistency and
symmetry in the Linux behaviour. I'm willing to implement whatever is
expected from the multipath-tools. But can we define what is expected ?
Alasdair proposed to add more explicit table loading ioctl return code
when the failure is due to this ready-only paths issue (E_ROFS for
example). Which comes short of solving the RO->RW devmap promotion
Please advise.
Christophe Varoqui (keep me on cc:)
next reply other threads:[~2008-05-16 19:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-16 19:35 Christophe Varoqui [this message]
2008-05-16 19:57 ` multipathd: error calling out mpath_prio_hds_modular Craig Simpson
2008-05-16 21:01 ` malahal
2008-05-16 23:19 ` Craig Simpson
2008-05-16 23:34 ` Craig Simpson
2008-05-17 0:17 ` malahal
2008-05-19 22:02 ` "[undef] [ready] [orphan]" ? Craig Simpson
2008-05-19 22:31 ` Craig Simpson
2008-05-20 14:48 ` [dm-devel] Read-Only devices, multipath and more Alasdair G Kergon
2008-05-20 21:09 ` Christophe Varoqui
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=1210966544.12901.51.camel@plop \
--to=christophe.varoqui@free.fr \
--cc=dm-devel@redhat.com \
--cc=linux-scsi@vger.kernel.org \
/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.