All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Varoqui <christophe.varoqui@free.fr>
To: Hannes Reinecke <hare@suse.de>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH] [RFC] switch DM tables to readonly	automatically
Date: Wed, 30 Apr 2008 11:34:13 +0200	[thread overview]
Message-ID: <1209548053.26745.25.camel@plop> (raw)
In-Reply-To: <4818348E.6050609@suse.de>

Le mercredi 30 avril 2008 à 10:57 +0200, Hannes Reinecke a écrit :
> Hi Christophe,
> 
> Christophe Varoqui wrote:
> >> Hi all,
> >>
> >> this patch switches the device-mapper table to read-only status automatically if one underlying device returns -EROFS.
> >>
> >> Rationale:
> >> Whenever a SCSI device is switched to read-only a table reload from multipath-tools fails, without any indication about the reason. And it's actually quite tricky to detect the read-only status from userland. And quite pointless, too, as the kernel already knows about it.
> >>
> >> And we now can create tables for CD-ROMs, too, without having to use the '-r' flag to dmsetup ...
> >>
> >> Christophe, this might also fix your problem.
> >>
> > It seems it will solve the map creation error on read-only LU, but what about these LU becoming writable ? ...
> > as is the case with the Symmetrix R2 upon spliting the synchronisation link.
> > Will the devmap become writable too automagically or is the multipathd daemon expected to take action the promote the map RW ?
> > 
> Tricky business. We'll first have to be notified that the LU is becoming writeable. The current SCSI stack is not
> very good at providing that sort of information.
> 
> I would think the best way here would be to modify the 'tur' checker to check for the READ-ONLY state, too.
> That would mean we'll have to implement a new path state 'READONLY', but that should be okay methinks.
> But this would have to be done at the SCSI level as the current 'sd' driver is not capable of switching
> between read-only and read-write on the fly, either.
> 
> Maybe I'll give it a go if I find some time.
> 
For your information, I checked the rhel4 behaviour.

That stuff worked out-of-the-box with rhel4 kernel : paths to R2 were
not flagged RO, so maps over R2 LU paths were RW; the Symmetrix failed
ios when paths were actually not writable and, upon spliting, multipaths
were usable without any userspace action.

Is all this precaution about not submitting ios to the R2 LU really
worth the pain ? Can't we just let the device mapper moun RW maps over
RO paths ?

Regards,
cvaroqui

  reply	other threads:[~2008-04-30  9:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  8:19 [PATCH] [RFC] switch DM tables to readonly automatically Christophe Varoqui
2008-04-30  8:57 ` Hannes Reinecke
2008-04-30  9:34   ` Christophe Varoqui [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-04-25 14:32 Hannes Reinecke
2008-04-30  5:43 ` Balasubramanian, Vijayakumar (STSD)
2008-05-01 11:24 ` Alasdair G Kergon
2008-05-02  6:24   ` Hannes Reinecke

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=1209548053.26745.25.camel@plop \
    --to=christophe.varoqui@free.fr \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    /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.