From: Hannes Reinecke <hare@suse.de>
To: Peter Rajnoha <prajnoha@redhat.com>,
Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
Christoph Hellwig <hch@infradead.org>,
dm-devel@redhat.com
Subject: Re: [PATCH] Disable partitions scan for multipathed devices
Date: Wed, 12 Mar 2014 16:31:25 +0100 [thread overview]
Message-ID: <53207DCD.2030303@suse.de> (raw)
In-Reply-To: <53207296.4060309@redhat.com>
On 03/12/2014 03:43 PM, Peter Rajnoha wrote:
> On 03/12/2014 02:14 PM, Hannes Reinecke wrote:
>> _However_: The 'no_partition' feature has the advantage that you
>> don't need to modify the multipath code; it'll just take whatever is
>> in 'features' and pass it 1:1 into the device-mapper table.
>>
>
> But you still need some config file in userspace that will store
> the fact that some of the mpath devs need to be marked with this
> feature flag.
>
Yes. Multipath already has the 'multipath.conf' file, which is
used to specify and/or modify multipath devices.
Including the ability to set the 'features' string,
which is passed 1:1 into the device-mapper core.
>> When using cookies for that we'd need either a separate
>> mechanism/flag for multipathing or filter out the features list.
>> _And_ we need to modify libdevmapper _and_ multipath at the same
>> time to make that work.
>> But if you insist ...
>
> If this is a subsystem specific (in this case mpath) flag, we
> don't need to change libdevmapper, only mpath userspace code.
>
Ah. Ok, that simplifies matters.
>>
>> So can you make a patch for libdevmapper to add this cookie flag?
>> I'll be checking the multipath-tools code ...
>
> I'll try to think about this a bit more since it would be beneficial
> to have such a thing for all block devices actually - any of them
> can be be used in a VM and we need to prevent scanning all such
> devices, not just mpath ones. A simple solution would be for users
> to define a udev rule (providing them a template) where they can
> match against some properties (e.g. DM name, uuid or WWID or whatever
> else is present for the block dev to match against in the rule).
>
> This actually brings us to a general problem with making the device
> "private" in some way on the host system. AFAIK we still don't have
> a general rule for this! Everybody is patching this on his own.
> With all the support for various autoactivations and automounts,
> this can become quite dangerous then if not configured properly
> by each subsystem's mechanism to make the device private.
>
Hehe. I've got a patch which implements a 'no_partition_scan' kernel
parameter, disabling the in-kernel partition scanning code altogether.
Especially useful if you're running on a root-on-multipath system,
as then basically _all_ devices are handled by multipathing, so
the in-kernel partition scan is pointless at best.
At worst it'll trigger tons of I/O errors on the passive path,
slowing down the machine to an eventual halt as the serial console
overflows.
And, btw, a udev rule won't work as the in-kernel scanning code
would be called nevertheless. You'd need to inhibit that, only then can
you intercept the scanning.
I can post it here if you're interested ...
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
prev parent reply other threads:[~2014-03-12 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 11:48 [PATCH] Disable partitions scan for multipathed devices Hannes Reinecke
2014-03-12 12:23 ` Alasdair G Kergon
2014-03-12 12:27 ` Hannes Reinecke
2014-03-12 12:46 ` Peter Rajnoha
2014-03-12 12:55 ` Hannes Reinecke
2014-03-12 13:02 ` Peter Rajnoha
2014-03-12 13:06 ` Peter Rajnoha
2014-03-12 13:14 ` Hannes Reinecke
2014-03-12 14:43 ` Peter Rajnoha
2014-03-12 15:31 ` Hannes Reinecke [this message]
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=53207DCD.2030303@suse.de \
--to=hare@suse.de \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=prajnoha@redhat.com \
--cc=snitzer@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.