<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:27:04 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-16443] &quot;mount -t lustre ...&quot; Does not work. (Backend fs=ZFS)</title>
                <link>https://jira.whamcloud.com/browse/LU-16443</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;This is a single node(client+server) vm and backend FS is zfs. &apos;mkfs&apos; works. However, mounting fails when called via &apos;mount -t lustre...&quot;. It works perfectly when called through &quot;mount.lustre&quot;. I am not sure if this is general case. But this seem to be affecting me.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What works&lt;/b&gt;&lt;br/&gt;
mkfs (works ...) + followed by mount.lustre&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;$ mkfs -t lustre --reformat --index 0 --backfstype=zfs --fsname=lustre --mgsnode=192.168.50.117@tcp --mgs --mdt gpool/metadata /dev/loop0

$ mount.lustre -o localrecov gpool/metadata /mnt/zfsmdt
&#160;
$ mount | grep mds1
gpool/metadata on /mnt/zfsmdt type lustre (rw,seclabel,svname=lustre-MDT0000,mgs,osd=osd-zfs)
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;However, with the same mkfs as above if mount is done via &apos;mount -t lustre&apos; instead of &apos;mount.lustre&apos; it fails.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What does not work; With same mkfs. (below does not work)&lt;/b&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;$ mount -t lustre -o localrecov gpool/metadata /mnt/zfsmdt
mount.lustre: gpool/metadata has not been formatted with mkfs.lustre or the backend filesystem type is not supported by this tool
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;b&gt;Where exactly it is failing&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;It is failing under lustre/utils/mount_utils.c:load_backfs_module()&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;handle = dlopen(filename, RTLD_LAZY); /* where filename is /usr/lib/lustre/mount_osd_zfs.so */
libzfs.so.4: cannot open shared object file: No such file or directory (dlerror() output)
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It cannot load the library. Therefore the callbacks for &lt;b&gt;backfs_ops&lt;/b&gt; is all NULL. Making it fail.&lt;/p&gt;

&lt;p&gt;For the mount.lustre case. The dlopen() call is a success. The callback for backend (zfs_init(), is_lustre(), etc) is properly registered.&lt;/p&gt;

&lt;p&gt;&#160;&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;filename = /usr/lib/lustre/mount_osd_zfs.so
libzfs.so.4: cannot open shared object file: No such file or directory
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;b&gt;Other information:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&#160;&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;$ uname -r
3.10.0-1160.15.2.el7.x86_64
$ cat /etc/redhat-release&#160;
CentOS Linux release 7.9.2009 (Core)
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;ZFS libs are installed in non-standard path.&lt;/p&gt;

&lt;p&gt;&#160;&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;# pkg-config --cflags libzfs
-I/root/zfs/zfs_git_lustre_build/zfsbins/include/libzfs -I/root/zfs/zfs_git_lustre_build/zfsbins/include/libspl -I/usr/include/blkid -I/usr/include/uuid &#160;
# pkg-config --libs libzfs
-L/root/zfs/zfs_git_lustre_build/zfsbins/lib -lzfs -lzfs_core -lnvpair&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="73809">LU-16443</key>
            <summary>&quot;mount -t lustre ...&quot; Does not work. (Backend fs=ZFS)</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="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="6">Not a Bug</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="arshad512">Arshad Hussain</reporter>
                        <labels>
                    </labels>
                <created>Wed, 4 Jan 2023 04:08:23 +0000</created>
                <updated>Wed, 4 Jan 2023 04:50:35 +0000</updated>
                            <resolved>Wed, 4 Jan 2023 04:50:35 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="357850" author="adilger" created="Wed, 4 Jan 2023 04:20:34 +0000"  >&lt;p&gt;It sounds like the library path loading is the source of the problem.  Having the ZFS libraries in a non-standard path is probably preventing the dlopen() from succeeding. You could try adding &quot;&lt;tt&gt;LD_LIBRARY_PATH=/root/....&lt;/tt&gt;&quot; before the command to see if it helps, and/or change /etc/ldconfig to point to that directory. &lt;/p&gt;</comment>
                            <comment id="357857" author="arshad512" created="Wed, 4 Jan 2023 04:48:52 +0000"  >&lt;p&gt;Was failing due to improper library path. Setting LD_LIBRARY_PATH (as Andreas pointed out) makes it work.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&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;export LD_LIBRARY_PATH=/root/zfs/zfs_git_lustre_build/zfsbins/lib/
$ mount -t lustre -o localrecov &#160;gpool/metadata /mnt/zfsmdt
$ mount | grep lustre
gpool/metadata on /mnt/zfsmdt type lustre (rw,seclabel,svname=lustre-MDT0000,mgs,osd=osd-zfs)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="357858" author="arshad512" created="Wed, 4 Jan 2023 04:50:35 +0000"  >&lt;p&gt;Not a bug. Library path was incorrectly /not set.&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|i0390f:</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>