<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:24:22 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-2337] Init scripts incorrectly detect &apos;/dev/mapper&apos; when importing pool</title>
                <link>https://jira.whamcloud.com/browse/LU-2337</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;If the &lt;tt&gt;/dev/mapper&lt;/tt&gt; directory is present, but not used by ZFS, the init scripts will fail to import a zpool.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$ sudo /etc/init.d/lustre start
$ mount | grep lustre
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The following patch fixes the issue for my unique case:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;diff --git i/lustre/scripts/lustre w/lustre/scripts/lustre
index 55c6601..8c594ac 100644
--- i/lustre/scripts/lustre
+++ w/lustre/scripts/lustre
@@ -104,8 +104,6 @@ import_zpool ()
                args=&quot;$args -d $ZPOOL_IMPORT_DIR&quot;
        elif [ -d &quot;/dev/disk/by-vdev&quot; ] ; then
                args=&quot;$args -d /dev/disk/by-vdev&quot;
-       elif [ -d &quot;/dev/mapper&quot; ] ; then
-               args=&quot;$args -d /dev/mapper&quot;
        fi
 
        if zpool status $pool &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 ; then
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$ sudo /etc/init.d/lustre start
Mounting lustre-oss/ost0 on /mnt/lustre/local/lustre-OST0000
$ mount | grep lustre
lustre-oss/ost0 on /mnt/lustre/local/lustre-OST0000 type lustre (rw)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But this is definitely not a correct fix, as it will break sites using multipath for ZFS pools.&lt;/p&gt;

&lt;p&gt;My zpool uses the &lt;tt&gt;/dev/vdb&lt;/tt&gt; device directly:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;
sudo zpool status
  pool: lustre-oss
 state: ONLINE
 scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        lustre-oss  ONLINE       0     0     0
          vdb1      ONLINE       0     0     0

errors: No known data errors
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And &lt;tt&gt;/dev/mapper&lt;/tt&gt; contains entries for my root filesystem:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$ ls -l /dev/mapper
total 0
crw-rw---- 1 root root 10, 58 Nov 15 10:39 control
lrwxrwxrwx 1 root root      7 Nov 15 10:39 vg_toss-lv_root -&amp;gt; ../dm-0
lrwxrwxrwx 1 root root      7 Nov 15 10:39 vg_toss-lv_swap -&amp;gt; ../dm-1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="16694">LU-2337</key>
            <summary>Init scripts incorrectly detect &apos;/dev/mapper&apos; when importing pool</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="prakash">Prakash Surya</assignee>
                                    <reporter username="prakash">Prakash Surya</reporter>
                        <labels>
                    </labels>
                <created>Thu, 15 Nov 2012 14:10:38 +0000</created>
                <updated>Fri, 19 Apr 2013 22:22:08 +0000</updated>
                            <resolved>Fri, 19 Apr 2013 22:22:08 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                    <fixVersion>Lustre 2.4.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="47877" author="nedbass" created="Thu, 15 Nov 2012 15:05:58 +0000"  >&lt;p&gt;Our thinking was that sites that can&apos;t use the default import paths should override ZPOOL_IMPORT_DIR in /etc/sysconfig/lustre.  Better error reporting is probably in order.&lt;/p&gt;</comment>
                            <comment id="47878" author="prakash" created="Thu, 15 Nov 2012 15:24:50 +0000"  >&lt;p&gt;What do you mean by &quot;default import paths&quot;? I think &lt;tt&gt;/dev&lt;/tt&gt; is as good of a &quot;default&quot; as any. We should strive to make it &quot;just work&quot; for the simplest use case, IMO. Even when using the &lt;tt&gt;/etc/zfs/zdev.conf&lt;/tt&gt; file it fails because links are created in &lt;tt&gt;/dev/disk/zpool&lt;/tt&gt;, which is never checked by the init script.&lt;/p&gt;</comment>
                            <comment id="47881" author="nedbass" created="Thu, 15 Nov 2012 15:36:37 +0000"  >&lt;blockquote&gt;&lt;p&gt;What do you mean by &quot;default import paths&quot;?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I mean the default behavior of the script.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;I think /dev is as good of a &quot;default&quot; as any. &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Use of /dev is discouraged since the names generally are not persistent. However, I&apos;m not convinced using /dev/mapper by default is a great idea either.  Honestly, I think we put that in to make it &quot;just work&quot; for grove.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Even when using the /etc/zfs/zdev.conf file it fails because links are created in /dev/disk/zpool, which is never checked by the init script.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The plan is to deprecate /dev/disk/zpool and /etc/zfs/zdev.conf, as they are superceded by /dev/disk/by-vdev and /etc/zfs/vdev_id.conf.  See &lt;a href=&quot;https://github.com/zfsonlinux/zfs/issues/981&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/zfsonlinux/zfs/issues/981&lt;/a&gt;.  I guess I should revive that effort.&lt;/p&gt;</comment>
                            <comment id="47893" author="prakash" created="Thu, 15 Nov 2012 21:01:17 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Use of /dev is discouraged since the names generally are not persistent.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Sure, but it&apos;s ultimately up to the user to make that decision. Using &lt;tt&gt;/dev&lt;/tt&gt; should &quot;just work&quot;, IMO.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;However, I&apos;m not convinced using /dev/mapper by default is a great idea either. Honestly, I think we put that in to make it &quot;just work&quot; for grove.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Agreed. Personally, I think it should omit the &lt;tt&gt;-d&lt;/tt&gt; option entirely by default, and use when it detects &lt;tt&gt;-d&lt;/tt&gt; is necessary and correct. Which appears to be the current intended behavior, the detection is just flawed for this use case.&lt;/p&gt;

&lt;p&gt;I&apos;d hate to add a complicated detection mechanism for &lt;tt&gt;/dev/mapper&lt;/tt&gt;, but it should definitely work out of the box for a simple VM set up like I have.&lt;/p&gt;</comment>
                            <comment id="47903" author="nedbass" created="Thu, 15 Nov 2012 23:51:44 +0000"  >&lt;p&gt;Right, now that the import search behaviour &lt;a href=&quot;https://github.com/zfsonlinux/zfs/commit/44867b6d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;has been improved&lt;/a&gt; we no longer need -d, unless ZPOOL_IMPORT_DIR is set.&lt;/p&gt;</comment>
                            <comment id="48427" author="nedbass" created="Tue, 27 Nov 2012 14:25:16 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/4686&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/4686&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="50150" author="prakash" created="Tue, 8 Jan 2013 13:07:48 +0000"  >&lt;p&gt;The patch landed on master.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzvcbz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5583</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>