<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:06:31 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-14061] LU-12514 (lustre_tgt mount type) breaks scripts that used &apos;mount -t lustre&apos; and expected targets</title>
                <link>https://jira.whamcloud.com/browse/LU-14061</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12514&quot; title=&quot;separate out the lustre mount code for server and clients&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12514&quot;&gt;LU-12514&lt;/a&gt; (utils: add &quot;lustre_tgt&quot; filesystem type) breaks scripts that used &apos;mount -t lustre&apos; and expected to see targets.&lt;/p&gt;

&lt;p&gt;In 2.12.*:&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;# mount -t lustre
/dev/mapper/mds1_flakey on /mnt/lustre-mds1 type lustre (ro,svname=lustre-MDT0000,mgs,osd=osd-ldiskfs,user_xattr,errors=remount-ro)
/dev/mapper/ost1_flakey on /mnt/lustre-ost1 type lustre (ro,svname=lustre-OST0000,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
/dev/mapper/ost2_flakey on /mnt/lustre-ost2 type lustre (ro,svname=lustre-OST0001,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
/dev/mapper/ost3_flakey on /mnt/lustre-ost3 type lustre (ro,svname=lustre-OST0002,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
/dev/mapper/ost4_flakey on /mnt/lustre-ost4 type lustre (ro,svname=lustre-OST0003,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
192.168.122.75@tcp:/lustre on /mnt/lustre type lustre (rw,flock,user_xattr,lazystatfs)
# mount -t lustre_tgt
# 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In 2.13 and on:&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;# mount -t lustre
192.168.122.75@tcp:/lustre on /mnt/lustre type lustre (rw,flock,user_xattr,lazystatfs,noencrypt)
# mount -t lustre_tgt
/dev/mapper/ost1_flakey on /mnt/lustre-ost1 type lustre_tgt (ro,svname=lustre-OST0000,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
/dev/mapper/ost2_flakey on /mnt/lustre-ost2 type lustre_tgt (ro,svname=lustre-OST0001,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
/dev/mapper/ost3_flakey on /mnt/lustre-ost3 type lustre_tgt (ro,svname=lustre-OST0002,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
/dev/mapper/ost4_flakey on /mnt/lustre-ost4 type lustre_tgt (ro,svname=lustre-OST0003,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
/dev/mapper/mds1_flakey on /mnt/lustre-mds1 type lustre_tgt (ro,svname=lustre-MDT0000,mgs,osd=osd-ldiskfs,user_xattr,errors=remount-ro)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="61299">LU-14061</key>
            <summary>LU-12514 (lustre_tgt mount type) breaks scripts that used &apos;mount -t lustre&apos; and expected targets</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="adilger">Andreas Dilger</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Oct 2020 17:24:38 +0000</created>
                <updated>Thu, 19 Nov 2020 14:39:58 +0000</updated>
                            <resolved>Thu, 19 Nov 2020 14:39:58 +0000</resolved>
                                    <version>Lustre 2.13.0</version>
                                    <fixVersion>Lustre 2.14.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="283070" author="simmonsja" created="Fri, 23 Oct 2020 01:16:13 +0000"  >&lt;p&gt;The solution is to update to &apos;mount -t lustre,lustre_tgt&apos;. NFS did the same thing for NFSv4 support.&#160; The idea of a &apos;lustre&apos; file system type for both servers and clients works well since the normal setup is separate nodes for clients and servers. If mounting a light weight client will be the norm in the future on server nodes I can see a &apos;lustre&apos; for all leading to problems.&lt;/p&gt;</comment>
                            <comment id="283121" author="jhammond" created="Fri, 23 Oct 2020 11:22:26 +0000"  >&lt;p&gt;This is not a solution for existing scripts.&lt;/p&gt;</comment>
                            <comment id="283697" author="adilger" created="Thu, 29 Oct 2020 20:10:29 +0000"  >&lt;p&gt;John, how were the server filesystems mounted originally?  Did they get mounted with &quot;&lt;tt&gt;mount -t lustre&lt;/tt&gt;&quot; or &quot;&lt;tt&gt;mount -t lustre_tgt&lt;/tt&gt;&quot; initially?  Since 2.13, &quot;&lt;tt&gt;mount -t lustre&lt;/tt&gt;&quot; will internally call &quot;&lt;tt&gt;mount.lustre&lt;/tt&gt;&quot; and &quot;&lt;tt&gt;mount -t lustre_tgt&lt;/tt&gt;&quot; will internally call &quot;&lt;tt&gt;mount.lustre_tgt&lt;/tt&gt;&quot;, but both are the same binary and will try &quot;&lt;tt&gt;lustre_tgt&lt;/tt&gt;&quot; first for server mountpoints (block devices) and then fall back to using &quot;&lt;tt&gt;lustre&lt;/tt&gt;&quot; if that doesn&apos;t work.  I tested a trivial change to &quot;&lt;tt&gt;mount_lustre.c&lt;/tt&gt;&quot; that only uses &quot;&lt;tt&gt;lustre&lt;/tt&gt;&quot;, and &quot;mount -t lustre&quot; now works fine.  It would probably be trivial to distinguish via &quot;&lt;tt&gt;argv&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;&lt;/tt&gt;&quot; which binary is being called and use that preferentially so that the mounted type matches what is requested.&lt;/p&gt;

&lt;p&gt;Since commit &lt;tt&gt;v2_12_58-71-g510aea4a37&lt;/tt&gt;, the use of &lt;tt&gt;lustre_tgt&lt;/tt&gt; is optional so it is still possible to mount a server as type &lt;tt&gt;lustre&lt;/tt&gt; to give some time to migrate system configurations.  We definitely want to keep this compatibility until &lt;em&gt;at least the next LTS&lt;/em&gt;, so that there is at least one commonly-used release where it is possible to use either type so upgrade/downgrade is possible without a flag day for changing the configuration at the same time.  Possibly for 2.14 or 2.15 it seems reasonable to add a message to &lt;tt&gt;mount.lustre&lt;/tt&gt; and/or the kernel to warn if &lt;tt&gt;lustre&lt;/tt&gt; is used for a server mountpoint, but that wouldn&apos;t cause any errors for users. &lt;/p&gt;

&lt;p&gt;John also pointed out that &quot;&lt;tt&gt;stat -f&lt;/tt&gt;&quot; should handle this as well.  This will currently report &quot;&lt;tt&gt;UNKNOWN (0xbd00bd1)&lt;/tt&gt;&quot; as the filesystem magic (&lt;tt&gt;LUSTRE_SUPER_MAGIC&lt;/tt&gt;), regardless of what type it was mounted as.  This is also true on my 2.10.8 server, so it is not a regression introduced by &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12514&quot; title=&quot;separate out the lustre mount code for server and clients&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12514&quot;&gt;LU-12514&lt;/a&gt;.  It makes sense to submit an upstream patch to fix this to return &quot;&lt;tt&gt;lustre_tgt&lt;/tt&gt;&quot; so that it is correct by the time it makes its way into the vendor distros.  If anyone is using bleeding-edge &lt;tt&gt;coreutils&lt;/tt&gt; it is likely that they are also using a newer Lustre release, or this is on the client where it doesn&apos;t matter since it returns magic &quot;&lt;tt&gt;LL_SUPER_MAGIC = 0x0bd00bd0&lt;/tt&gt;&quot; which is mapped to &quot;&lt;tt&gt;lustre&lt;/tt&gt;&quot; in userspace.&lt;/p&gt;</comment>
                            <comment id="283701" author="jhammond" created="Thu, 29 Oct 2020 20:17:46 +0000"  >&lt;p&gt;&amp;gt; how were the server filesystems mounted originally? Did they get mounted with &quot;mount -t lustre&quot; or &quot;mount -t lustre_tgt&quot; initially?&lt;/p&gt;

&lt;p&gt;Using &lt;tt&gt;mount -t lustre&lt;/tt&gt;.&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;k:~# mount -t lustre
192.168.122.75@tcp:/lustre on /mnt/lustre type lustre (rw,flock,user_xattr,lazystatfs,noencrypt)
k:~# mount -t lustre_tgt
...
/dev/mapper/ost1_flakey on /mnt/lustre-ost1 type lustre_tgt (ro,svname=lustre-OST0000,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
k:~# umount /mnt/lustre-ost1/
k:~# mount /dev/mapper/ost1_flakey /mnt/lustre-ost1 -t lustre
k:~# mount -t lustre
192.168.122.75@tcp:/lustre on /mnt/lustre type lustre (rw,flock,user_xattr,lazystatfs,noencrypt)
k:~# mount -t lustre_tgt
...
/dev/mapper/ost1_flakey on /mnt/lustre-ost1 type lustre_tgt (ro,svname=lustre-OST0000,mgsnode=192.168.122.75@tcp,osd=osd-ldiskfs,errors=remount-ro)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="283703" author="adilger" created="Thu, 29 Oct 2020 20:37:19 +0000"  >&lt;p&gt;So this appears to be a bug in &lt;tt&gt;mount_lustre.c&lt;/tt&gt; that it is &lt;b&gt;always&lt;/b&gt; using &quot;&lt;tt&gt;lustre_tgt&lt;/tt&gt;&quot; for server targets instead of what was requested:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!mop.mo_fake) {
                &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *fstype = client ? &lt;span class=&quot;code-quote&quot;&gt;&quot;lustre&quot;&lt;/span&gt; : &lt;span class=&quot;code-quote&quot;&gt;&quot;lustre_tgt&quot;&lt;/span&gt;;

                /*
                 * flags and target get to lustre_get_sb(), but not
                 * lustre_fill_super().  Lustre ignores the flags, but mount
                 * does not.
                 */
                &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (i = 0, rc = -EAGAIN; i &amp;lt;= mop.mo_retry &amp;amp;&amp;amp; rc != 0; i++) {
                        rc = mount(mop.mo_source, mop.mo_target, fstype,
                                   flags, (void *)options);
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc != 0) {
                                /* Older Lustre without &lt;span class=&quot;code-quote&quot;&gt;&apos;lustre_tgt&apos;&lt;/span&gt;.
                                 * Try &lt;span class=&quot;code-quote&quot;&gt;&apos;lustre&apos;&lt;/span&gt; instead
                                 */
                                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc == -ENODEV) {
                                        fstype = &lt;span class=&quot;code-quote&quot;&gt;&quot;lustre&quot;&lt;/span&gt;;
                                        i--;
                                        &lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;;
                                }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This should check &lt;tt&gt;basename(argv&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;)&lt;/tt&gt; to see if it is called as &quot;&lt;tt&gt;mount.lustre&lt;/tt&gt;&quot; and preferably use &quot;&lt;tt&gt;lustre&lt;/tt&gt;&quot; in that case, and &quot;&lt;tt&gt;mount.lustre_tgt&lt;/tt&gt;&quot; should preferably use &quot;&lt;tt&gt;lustre_tgt&lt;/tt&gt;&quot; then.  For server mountpoints it could also try &quot;&lt;tt&gt;lustre_tgt&lt;/tt&gt;&quot; if the first mount fails with &lt;tt&gt;-ENODEV&lt;/tt&gt;.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!mop.mo_fake) {
                &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *fstype = &lt;span class=&quot;code-quote&quot;&gt;&quot;lustre&quot;&lt;/span&gt;;

                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (strstr(argv[0], &lt;span class=&quot;code-quote&quot;&gt;&quot;mount.lustre_tgt&quot;&lt;/span&gt;))
                        fstype = &lt;span class=&quot;code-quote&quot;&gt;&quot;lustre_tgt&quot;&lt;/span&gt;;

                /*
                 * flags and target get to lustre_get_sb(), but not
                 * lustre_fill_super().  Lustre ignores the flags, but mount
                 * does not.
                 */
                &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (i = 0, rc = -EAGAIN; i &amp;lt;= mop.mo_retry &amp;amp;&amp;amp; rc != 0; i++) {
                        rc = mount(mop.mo_source, mop.mo_target, fstype,
                                   flags, (void *)options);
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc != 0) {
                                /* Older Lustre without &lt;span class=&quot;code-quote&quot;&gt;&apos;lustre_tgt&apos;&lt;/span&gt;.
                                 * Try &lt;span class=&quot;code-quote&quot;&gt;&apos;lustre&apos;&lt;/span&gt; instead
                                 */
                                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc == -ENODEV &amp;amp;&amp;amp; strcmp(fstype, &lt;span class=&quot;code-quote&quot;&gt;&quot;lustre_tgt&quot;&lt;/span&gt;)) {
                                        fstype = &lt;span class=&quot;code-quote&quot;&gt;&quot;lustre&quot;&lt;/span&gt;;
                                        i--;
                                        &lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;;
                                }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="283704" author="gerrit" created="Thu, 29 Oct 2020 20:52:40 +0000"  >&lt;p&gt;Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/40474&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/40474&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14061&quot; title=&quot;LU-12514 (lustre_tgt mount type) breaks scripts that used &amp;#39;mount -t lustre&amp;#39; and expected targets&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14061&quot;&gt;&lt;del&gt;LU-14061&lt;/del&gt;&lt;/a&gt; utils: prefer mounting with specified fstype&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: a79f8111eb6ad27d42a4a04cc9f20e74bdbcbc8c&lt;/p&gt;</comment>
                            <comment id="285546" author="gerrit" created="Thu, 19 Nov 2020 10:20:26 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/40474/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/40474/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14061&quot; title=&quot;LU-12514 (lustre_tgt mount type) breaks scripts that used &amp;#39;mount -t lustre&amp;#39; and expected targets&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14061&quot;&gt;&lt;del&gt;LU-14061&lt;/del&gt;&lt;/a&gt; utils: prefer mounting with specified fstype&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: ffeb900743772d86ceb41b4a323006fd478fd674&lt;/p&gt;</comment>
                            <comment id="285576" author="pjones" created="Thu, 19 Nov 2020 14:39:58 +0000"  >&lt;p&gt;Landed for 2.14&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="56282">LU-12514</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|i01cxb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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>