<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:46:03 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-4810] Mount command unexpectedly sets block device parameter &quot;max_sectors_kb&quot;</title>
                <link>https://jira.whamcloud.com/browse/LU-4810</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;We&apos;ve killed our MDT more than once because we were caught off guard by this behavior of the mount command. The array with the MDT devices doesn&apos;t support larger than 2kB transfers. The mpt2sas driver sets max_hw_sectors_kb to 16383, and then this code sets max_sectors_kb to 16383 as well. We run into problems when we scan the inodes (reading directly from block device) as part of our purge process. &lt;/p&gt;

&lt;p&gt;We would prefer that the command just emit a warning instead of making the change.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://git.whamcloud.com/?p=fs/lustre-release.git;a=blob;f=lustre/utils/mount_utils_ldiskfs.c;h=dfb9e6cba750a2a5a20e2d28d7814612522ab3a4;hb=HEAD#l1039&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://git.whamcloud.com/?p=fs/lustre-release.git;a=blob;f=lustre/utils/mount_utils_ldiskfs.c;h=dfb9e6cba750a2a5a20e2d28d7814612522ab3a4;hb=HEAD#l1039&lt;/a&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;        snprintf(real_path, sizeof(real_path), &lt;span class=&quot;code-quote&quot;&gt;&quot;%s/%s&quot;&lt;/span&gt;, path,
                 MAX_HW_SECTORS_KB_PATH);
        rc = read_file(real_path, buf, sizeof(buf));
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc) {
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (verbose)
                        fprintf(stderr, &lt;span class=&quot;code-quote&quot;&gt;&quot;warning: opening %s: %s\n&quot;&lt;/span&gt;,
                                real_path, strerror(errno));
                /* No MAX_HW_SECTORS_KB_PATH isn&apos;t necessary an
                 * error &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; some device. */
                rc = 0;
        }

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (strlen(buf) - 1 &amp;gt; 0) {
                snprintf(real_path, sizeof(real_path), &lt;span class=&quot;code-quote&quot;&gt;&quot;%s/%s&quot;&lt;/span&gt;, path,
                         MAX_SECTORS_KB_PATH);
                rc = write_file(real_path, buf);
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc) {
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (verbose)
                                fprintf(stderr, &lt;span class=&quot;code-quote&quot;&gt;&quot;warning: writing to %s: %s\n&quot;&lt;/span&gt;,
                                        real_path, strerror(errno));
                        /* No MAX_SECTORS_KB_PATH isn&apos;t necessary an
                         * error &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; some device. */
                        rc = 0;
                }
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>RHEL 6.4/ distro IB &lt;br/&gt;
Kernel 2.6.32-358.23.2.el6.atlas.x86_64 &lt;br/&gt;
lustre-2.5.0 head</environment>
        <key id="23854">LU-4810</key>
            <summary>Mount command unexpectedly sets block device parameter &quot;max_sectors_kb&quot;</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="niu">Niu Yawei</assignee>
                                    <reporter username="blakecaldwell">Blake Caldwell</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Mar 2014 19:39:38 +0000</created>
                <updated>Thu, 4 Dec 2014 22:27:48 +0000</updated>
                            <resolved>Thu, 6 Nov 2014 17:18:00 +0000</resolved>
                                    <version>Lustre 2.5.0</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                    <fixVersion>Lustre 2.5.4</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="80111" author="pjones" created="Mon, 24 Mar 2014 23:48:40 +0000"  >&lt;p&gt;Niu&lt;/p&gt;

&lt;p&gt;Could you please look into this issue?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="80199" author="niu" created="Tue, 25 Mar 2014 06:47:14 +0000"  >&lt;p&gt;Hi, do you know why mpt2sas sets the max_hw_sector_kb to 16383? Is this a mpt2sas defect? Thanks.&lt;/p&gt;</comment>
                            <comment id="80211" author="ezell" created="Tue, 25 Mar 2014 13:21:14 +0000"  >&lt;p&gt;I don&apos;t think the driver does anything to probe the actual device about its maximum available size, it just uses some default.  That should be changeable with a module parameter:&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;# modinfo mpt2sas | grep max_sectors
parm:           max_sectors:max sectors, range 64 to 32767  default=32767 (ushort)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/torvalds/linux/blob/master/drivers/scsi/mpt2sas/mpt2sas_scsih.c#L102&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/torvalds/linux/blob/master/drivers/scsi/mpt2sas/mpt2sas_scsih.c#L102&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, this setting is driver-wide.  So if you have multiple SAS-connected devices, you have to use the &quot;largest&quot; value for the module parameter.  But then Lustre just overwrites any settings you pick for max_sectors_kb.  Right now our MDSs only have a single type of SAS device.&lt;/p&gt;</comment>
                            <comment id="80223" author="blakecaldwell" created="Tue, 25 Mar 2014 15:23:32 +0000"  >&lt;p&gt;Setting the mpt2sas module parameter solves our problem. Thanks Matt!&lt;/p&gt;

&lt;p&gt;However, I would propose that this be logged to dmesg when the mount command changes the block device tunables.&lt;/p&gt;</comment>
                            <comment id="80802" author="niu" created="Wed, 2 Apr 2014 02:30:47 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/9865&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9865&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="98532" author="jamesanunez" created="Thu, 6 Nov 2014 17:17:32 +0000"  >&lt;p&gt;Patch for b2_5 is at &lt;a href=&quot;http://review.whamcloud.com/#/c/12553/2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/12553/2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="98533" author="jamesanunez" created="Thu, 6 Nov 2014 17:18:00 +0000"  >&lt;p&gt;Landed to master (pre-2.7)&lt;/p&gt;</comment>
                            <comment id="99215" author="adilger" created="Fri, 14 Nov 2014 20:05:47 +0000"  >&lt;p&gt;I needed to fix up the 9865 patch because it was printing messages about setting &lt;tt&gt;max_sectors_kb&lt;/tt&gt; for every mount, along with an annoying linefeed, even if this tunable was not being changed.  Note &lt;tt&gt;sda&lt;/tt&gt; is being set repeatedly even though it couldn&apos;t possibly need it.  In fact, all of these devices have &lt;tt&gt;max_sectors_kb=128&lt;/tt&gt; already and don&apos;t need any tuning:&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;Setup mgs, mdt, osts
Starting mgs:   /dev/vg_sookie/lvmgs /mnt/mgs
mount.lustre: set /sys/block/dm-18/queue/max_sectors_kb to 128

mount.lustre: set /sys/block/sda/queue/max_sectors_kb to 128

Started MGS
Starting mds1:   /dev/vg_sookie/lvmdt1 /mnt/mds1
mount.lustre: set /sys/block/dm-12/queue/max_sectors_kb to 128

mount.lustre: set /sys/block/sda/queue/max_sectors_kb to 128

Started testfs-MDT0000
Starting mds2:   /dev/vg_sookie/lvmdt2 /mnt/mds2
mount.lustre: set /sys/block/dm-13/queue/max_sectors_kb to 128

mount.lustre: set /sys/block/sda/queue/max_sectors_kb to 128
Started testfs-MDT0001
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My patch in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5888&quot; title=&quot;mount.lustre: set max_sectors_kb to 2147483647&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5888&quot;&gt;&lt;del&gt;LU-5888&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;http://review.whamcloud.com/12723&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12723&lt;/a&gt; fixes this to only print the message for devices that are actually being changed (devices manually set to have max_sectors_kb=64 for testing purposes):&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;Setup mgs, mdt, osts
Starting mgs:   /dev/vg_sookie/lvmgs /mnt/mgs
mount.lustre: increased /sys/block/dm-18/queue/max_sectors_kb from 64 to 128
mount.lustre: increased /sys/block/sda/queue/max_sectors_kb from 64 to 128
Started MGS
Starting mds1:   /dev/vg_sookie/lvmdt1 /mnt/mds1
mount.lustre: increased /sys/block/dm-12/queue/max_sectors_kb from 64 to 128
Started testfs-MDT0000
Starting mds2:   /dev/vg_sookie/lvmdt2 /mnt/mds2
Started testfs-MDT0001
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If the 12553 patch is landed to b2_5, the 12723 patch should also be backported to b2_5 or these messages will be equally annoying there.&lt;/p&gt;</comment>
                            <comment id="100734" author="gerrit" created="Thu, 4 Dec 2014 20:21:00 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/12553/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12553/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4810&quot; title=&quot;Mount command unexpectedly sets block device parameter &amp;quot;max_sectors_kb&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4810&quot;&gt;&lt;del&gt;LU-4810&lt;/del&gt;&lt;/a&gt; utils: print messages when set tunables&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_5&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: ef5c7bb4a638d50628e91af0c19eb10aab6ec1f5&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="27517">LU-5888</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|hzwi8v:</customfieldvalue>

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