Message ID | 1426509425-15978-27-git-send-email-hare@suse.de (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show |
On Mon, Mar 16, 2015 at 01:36:13PM +0100, Hannes Reinecke wrote: > When all paths are failed we should not try to run any programs > requiring disk access. However, we still need to create the > symlinks so as not to confuse systemd. > So import the blkid values from the database in these cases. Don't we still need to set DM_NOSCAN here? -Ben > > Signed-off-by: Hannes Reinecke <hare@suse.de> > --- > multipath/11-dm-mpath.rules | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/multipath/11-dm-mpath.rules b/multipath/11-dm-mpath.rules > index 69c24b5..2e7076d 100644 > --- a/multipath/11-dm-mpath.rules > +++ b/multipath/11-dm-mpath.rules > @@ -6,7 +6,13 @@ ENV{DM_UUID}!="mpath-?*", GOTO="mpath_end" > # otherwise there would be a hang or IO error on access. > # We'd like to avoid this, especially within udev processing. > ENV{DM_NR_VALID_PATHS}!="?*", IMPORT{db}="DM_NR_VALID_PATHS" > -ENV{DM_NR_VALID_PATHS}=="0", ENV{DM_NOSCAN}="1" > +ENV{DM_NR_VALID_PATHS}!="0", GOTO="mpath_blkid_end" > +IMPORT{db}="ID_FS_TYPE" > +IMPORT{db}="ID_FS_USAGE" > +IMPORT{db}="ID_FS_UUID" > +IMPORT{db}="ID_FS_UUID_ENC" > +IMPORT{db}="ID_FS_VERSION" > +LABEL="mpath_blkid_end" > > # Also skip all foreign rules if no path is available. > # Remember the original value of DM_DISABLE_OTHER_RULES_FLAG > -- > 1.8.4.5 -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
On 03/27/2015 04:42 AM, Benjamin Marzinski wrote: > On Mon, Mar 16, 2015 at 01:36:13PM +0100, Hannes Reinecke wrote: >> When all paths are failed we should not try to run any programs >> requiring disk access. However, we still need to create the >> symlinks so as not to confuse systemd. >> So import the blkid values from the database in these cases. > > Don't we still need to set DM_NOSCAN here? > I have no idea at all. I just found the setting somewhere and thought it'd be a good idea. But don't ask me what's for; device-mapper/LVM udev variables are an arcane subject which I've yet to grasp. Incidentally, a similar fix is needed for 10-dm.rules. But I'll prepare a separate patch for this. Cheers, Hannes
On Fri, Mar 27, 2015 at 05:03:06PM +0100, Hannes Reinecke wrote: > On 03/27/2015 04:42 AM, Benjamin Marzinski wrote: > > On Mon, Mar 16, 2015 at 01:36:13PM +0100, Hannes Reinecke wrote: > >> When all paths are failed we should not try to run any programs > >> requiring disk access. However, we still need to create the > >> symlinks so as not to confuse systemd. > >> So import the blkid values from the database in these cases. > > > > Don't we still need to set DM_NOSCAN here? > > > I have no idea at all. I just found the setting somewhere and > thought it'd be a good idea. > But don't ask me what's for; device-mapper/LVM udev variables > are an arcane subject which I've yet to grasp. But what I mean is that your patch removes DM_NOSCAN -ENV{DM_NR_VALID_PATHS}=="0", ENV{DM_NOSCAN}="1" I assume that this is an oversight, since as you mentioned, we don't want to be running blkid on a device with no valid paths. -Ben > > Incidentally, a similar fix is needed for 10-dm.rules. > But I'll prepare a separate patch for this. > > Cheers, > > Hannes > -- > Dr. Hannes Reinecke zSeries & Storage > hare@suse.de +49 911 74053 688 > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton > HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
diff --git a/multipath/11-dm-mpath.rules b/multipath/11-dm-mpath.rules index 69c24b5..2e7076d 100644 --- a/multipath/11-dm-mpath.rules +++ b/multipath/11-dm-mpath.rules @@ -6,7 +6,13 @@ ENV{DM_UUID}!="mpath-?*", GOTO="mpath_end" # otherwise there would be a hang or IO error on access. # We'd like to avoid this, especially within udev processing. ENV{DM_NR_VALID_PATHS}!="?*", IMPORT{db}="DM_NR_VALID_PATHS" -ENV{DM_NR_VALID_PATHS}=="0", ENV{DM_NOSCAN}="1" +ENV{DM_NR_VALID_PATHS}!="0", GOTO="mpath_blkid_end" +IMPORT{db}="ID_FS_TYPE" +IMPORT{db}="ID_FS_USAGE" +IMPORT{db}="ID_FS_UUID" +IMPORT{db}="ID_FS_UUID_ENC" +IMPORT{db}="ID_FS_VERSION" +LABEL="mpath_blkid_end" # Also skip all foreign rules if no path is available. # Remember the original value of DM_DISABLE_OTHER_RULES_FLAG
When all paths are failed we should not try to run any programs requiring disk access. However, we still need to create the symlinks so as not to confuse systemd. So import the blkid values from the database in these cases. Signed-off-by: Hannes Reinecke <hare@suse.de> --- multipath/11-dm-mpath.rules | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)