From: Hannes Reinecke <hare@suse.de>
To: dm-devel@redhat.com
Subject: Re: [PATCH 08/18] Fix issues with user_friendly_names initramfs bindings
Date: Thu, 15 Oct 2015 10:52:31 +0200 [thread overview]
Message-ID: <561F694F.3010309@suse.de> (raw)
In-Reply-To: <1444333491-16265-9-git-send-email-bmarzins@redhat.com>
On 10/08/2015 09:44 PM, Benjamin Marzinski wrote:
> Multipath has an issue with user_friendly_names set in the initramfs.
> If the bindings are in the initramfs bindings file, it will create them,
> and it may use bindings that are different than the ones in the regular
> file system. Once multipathd starts up in the regular file system, it
> will try to register the existing bindings, but that may (and in many
> cases, is likely to) fail. If it can't reanme it, will pick a new
> binding. Since when multipathd starts discovering the existing devices,
> it obviously doesn't know all of the existing devices yet, it may very
> well pick a binding that's already in use by a device that it hasn't
> discovered yet. In this case multipath will be unable to rename the
> device to the new binding. Unfortunately, if it fails the rename, it
> never resets the alias of the device stored in the mpvec to current
> alias of the actual dm device. So multipath will have devices in the
> mpvec where the alias and the wwid don't match the actual dm devices
> that exist. This can cause all sorts of problems.
>
> This patch does two things to deal with this. First, it makes sure that
> if the rename fails, the device will reset its alias to the one that it
> currently has.
>
> Second, it adds a new option to help avoid the problem in the first
> place. There actually already is a solution to this issue. If
> multipathd is started with -B, it makes the bindings file read-only. If
> multipathd is started this way in the initramfs, it will never make new
> bindings for a device. If the device doesn't already have a binding, it
> will simply be named with its wwid. The problem with this method is that
> AFAICT it causes a maintenance problem with dracut. At least on RedHat,
> dracut is simply copying the regular multipathd.service file into the
> initramfs. I don't see a way in multipathd.service to only start
> multipathd with the -B option in the initramfs (If there is a way, I'd
> be happy to use that). So, the only alternative that lets us use -B is
> to have a separate multipathd.service file that dracut uses for the
> initramfs. This seems like more work than it's worth.
>
> Instead, this patch pulls some code from systemd to detect if multipathd
> is running in the initramfs. If it is, and if new_bindings_in_boot is
> not set, multipathd will set the bindings file to read-only, just like
> the -B option does.
>
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Please split off this patch. The first issue is a real fix, it should
really be a separate patch.
For the second one it actually quite simple to inject a different
service file for dracut (I did that actually in our dracut package).
So I'd rather see this happening instead of second-guessing by looking
at magic files. Which will fail for anyone _not_ using dracut.
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)
next prev parent reply other threads:[~2015-10-15 8:52 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 19:44 [PATCH 00/18] multipath patch sync Benjamin Marzinski
2015-10-08 19:44 ` [PATCH 01/18] libmultipath: Add prioritizer context data Benjamin Marzinski
2015-10-12 6:35 ` Hannes Reinecke
2015-10-21 22:16 ` Benjamin Marzinski
2015-10-22 5:47 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 02/18] fix memory leaks on realloc failures Benjamin Marzinski
2015-10-12 6:35 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 03/18] multipathd: use /run instead of /var/run Benjamin Marzinski
2015-10-12 6:37 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 04/18] retrigger uevents to try and get the uid through udev Benjamin Marzinski
2015-10-12 6:40 ` Hannes Reinecke
2015-10-21 22:20 ` Benjamin Marzinski
2015-10-08 19:44 ` [PATCH 05/18] update multipath rules to deal with partition devices Benjamin Marzinski
2015-10-12 6:42 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 06/18] change order of multipath.rules Benjamin Marzinski
2015-10-12 6:43 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 07/18] make kpartx -d remove all partitions Benjamin Marzinski
2015-10-12 6:46 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 08/18] Fix issues with user_friendly_names initramfs bindings Benjamin Marzinski
2015-10-15 8:52 ` Hannes Reinecke [this message]
2015-10-21 22:43 ` Benjamin Marzinski
2015-10-08 19:44 ` [PATCH 09/18] Make multipath deactivate devices before iscsi shutdown Benjamin Marzinski
2015-10-12 7:05 ` Hannes Reinecke
2015-10-21 22:29 ` Benjamin Marzinski
2015-10-08 19:44 ` [PATCH 10/18] resize reply buffer for mutipathd help message Benjamin Marzinski
2015-10-12 7:05 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 11/18] Add libmpathcmd library and use it internally Benjamin Marzinski
2015-10-12 7:06 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 12/18] add raw format multipathd commands Benjamin Marzinski
2015-10-12 7:06 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 13/18] libmultipath: add ignore_new_boot_devs option Benjamin Marzinski
2015-10-12 7:08 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 14/18] Make use of /run depend on systemd Benjamin Marzinski
2015-10-12 7:09 ` Hannes Reinecke
2015-10-12 7:34 ` Zdenek Kabelac
2015-10-12 8:35 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 15/18] libmpathpersist: uninstall man page correctly Benjamin Marzinski
2015-10-12 7:09 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 16/18] Increase host buffer size Benjamin Marzinski
2015-10-12 7:10 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 17/18] Fix sun partition numbering Benjamin Marzinski
2015-10-12 7:11 ` Hannes Reinecke
2015-10-08 19:44 ` [PATCH 18/18] Make multipath ignore devices without mpath prefix Benjamin Marzinski
2015-10-12 7:12 ` 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=561F694F.3010309@suse.de \
--to=hare@suse.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox