<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:21:40 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-2018] Questions about using lfsck</title>
                <link>https://jira.whamcloud.com/browse/LU-2018</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;We have an OST on one of our scratch file systems that was deactivated and attempts to reactivate it failed with:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.753933&amp;#93;&lt;/span&gt; Lustre: scratch1-MDT0000: scratch1-OST0001_UUID now active, resetting orphans&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.753939&amp;#93;&lt;/span&gt; Lustre: Skipped 1 previous similar message&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.754155&amp;#93;&lt;/span&gt; LustreError: 10403:0:(osc_create.c:589:osc_create()) scratch1-OST0001-osc: oscc recovery failed: -22&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.754166&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001_UUID: Failed to clear orphan objects on OST: -22&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.754170&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001_UUID: Sync failed deactivating: rc -22&lt;/p&gt;

&lt;p&gt;First: Is lfsck the proper tool to recover from this error?&lt;/p&gt;

&lt;p&gt;Second: Since this is the first time that I have ever used lfsck I am not sure what to expect. In this particular case there are 32 OSTs on this file system. Following the examples in the manual, I started a read-only run against all OSTs Saturday night and the the following morning from what I could judge it had only gotten through 11 of the 32 OSTs (if it run sequentially.) It reported LOTS of zero length orphaned inodes. Unfortunately in this case I didn&apos;t pipe the output to a log file so information regarding the OST (2/32) that couldn&apos;t be reactivated was lost when I ran out out line buffer space. So I stopped the run and restarted it against only that OST. Because it has been running listing user files for many hours I am guessing the answer is no bu is this a valid execution option or is it required that all OSTs must be accounted for?&lt;/p&gt;

&lt;p&gt;Third: The db files were generated when the file system was quiesced and after e2fsck was run against all targets cleanly. Must lfsck be run while in an offline mode or can it be run while the file system is serving clients? Because of my inexperience with using lfsck I don&apos;t know what to expect in terms of duration of the run and since I am using the -n option I will need to run again with corrective options. Also when running the corrective options is -l -c the preferred method?&lt;/p&gt;
</description>
                <environment>Sun hardware running mdadm</environment>
        <key id="16091">LU-2018</key>
            <summary>Questions about using lfsck</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="cliffw">Cliff White</assignee>
                                    <reporter username="jamervi">Joe Mervini</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Sep 2012 04:53:40 +0000</created>
                <updated>Thu, 24 Sep 2015 09:46:19 +0000</updated>
                            <resolved>Thu, 24 Sep 2015 09:46:19 +0000</resolved>
                                    <version>Lustre 1.8.x (1.8.0 - 1.8.5)</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="45419" author="jamervi" created="Mon, 24 Sep 2012 05:00:22 +0000"  >&lt;p&gt;Just adding some output since what is going into my log is not what is being seen on my console:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmmds-scratch2 ~&amp;#93;&lt;/span&gt;# lfsck -n -v --mdsdb /lustre-tmp/mdsdb --ostdb /lustre-tmp/scratch&lt;/p&gt;
{1md1db,1md2db,2md3db,2md4db,3md1db,3md2db,4md3db,4md4db,5md1db,5md2db,6md3db,6md4db,7md1db,7md2db,8md3db,8md4db,9md1db,9md2db,10dm3db,10md4db,11md1db,11md2db,12md3db,12md4db,13md1db,13md2db,14md3db,14md4db,15md1db,15md2db,16md3db,16md4db}
&lt;p&gt; /scratch 2&amp;gt;&amp;amp;1 &amp;gt;&amp;gt; /lustre-tmp/lfsck.output-allosts&lt;br/&gt;
lfsck 1.41.10.sun2-4chaos (23-Jun-2010)&lt;br/&gt;
lfsck: ost_idx 0: pass1: check for duplicate objects&lt;br/&gt;
lfsck: ost_idx 0: pass1 OK (2550897 files total)&lt;br/&gt;
lfsck: ost_idx 0: pass2: check for missing inode objects&lt;br/&gt;
lfsck: ost_idx 0: pass2 OK (2550897 objects)&lt;br/&gt;
lfsck: ost_idx 0: pass3: check for orphan objects&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709696, 4096 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709728, 1724416 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709729, 4096 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709697, 4096 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709730, 49152 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709698, 32768 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709731, 32768 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709699, 32768 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709700, 32768 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709732, 32768 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709701, 32768 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709670, 4096 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709671, 4096 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709735, 28672 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709703, 69632 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709736, 4096 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709704, 69632 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709672, 32768 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709673, 32768 bytes&lt;br/&gt;
lfsck: &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;: pass3 orphan found objid 709737, 4096 bytes&lt;/p&gt;

&lt;p&gt;Log file:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050029&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6049997&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050030&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6049998&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050031&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6049999&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050032&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050000&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050001&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050033&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050002&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050034&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050003&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050035&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050036&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050004&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050005&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050037&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050006&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050038&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050039&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050007&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050008&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050040&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050009&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050041&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050010&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050042&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050043&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050011&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050044&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050012&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; zero-length orphan objid 6050045&lt;/p&gt;</comment>
                            <comment id="45438" author="johann" created="Mon, 24 Sep 2012 11:42:49 +0000"  >&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.753933&amp;#93;&lt;/span&gt; Lustre: scratch1-MDT0000: scratch1-OST0001_UUID now active, resetting orphans&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.753939&amp;#93;&lt;/span&gt; Lustre: Skipped 1 previous similar message&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.754155&amp;#93;&lt;/span&gt; LustreError: 10403:0:(osc_create.c:589:osc_create()) scratch1-OST0001-osc: oscc recovery failed: -22&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.754166&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001_UUID: Failed to clear orphan objects on OST: -22&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204919.754170&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001_UUID: Sync failed deactivating: rc -22&lt;br/&gt;
First: Is lfsck the proper tool to recover from this error?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;We usually try to fix problems manually first before running lfsck (which can be time consuming).&lt;br/&gt;
Could you please provide us with the logs of OST1, if any?&lt;/p&gt;

&lt;p&gt;That said, it does seems that you have orphan files on the OSTs which would have to be removed. Andreas, any thoughts on the e2fsck output?&lt;/p&gt;</comment>
                            <comment id="45441" author="adilger" created="Mon, 24 Sep 2012 12:23:56 +0000"  >&lt;p&gt;Joe, AFAIK it is not possible to run lfsck against only a single OST.  If you omit the ostdb files from the other OSTs, lfsck (right or wrong) will assume that those OSTs could not generate an ostdb and assume they have been removed.  I would not recommend that you run lfsck until we determine what the problem is.&lt;/p&gt;

&lt;p&gt;I don&apos;t think lfsck will fix the -EINVAL problem you are seeing, but it isn&apos;t possible to know for sure what problem you are hitting without more information.&lt;/p&gt;

&lt;p&gt;If there are useful console error messages from the OST, please post them here.  Alternately (or additionally), running with full debug during the attempted mount of OST0001 would be useful, so we can determine exactly where the -22 error is coming from.&lt;/p&gt;

&lt;p&gt;Typical areas to check include that on the MDS the {{lctl get_param osc.&lt;/p&gt;
{fsname}-OST0001-osc.next_id}} (I think, can&apos;t check a system right now, essentially what is in the &lt;tt&gt;lov_objids&lt;/tt&gt; file for this OST) &lt;em&gt;roughly&lt;/em&gt; matches the LAST_ID on the OST itself (from {{lctl get_param obdfilter.{fsname}
&lt;p&gt;-OST0001.last_id}} on the OSS).  These values do not have to be identical, but cannot be too far apart.  If this isn&apos;t the problem, we&apos;ll have to dig further.&lt;/p&gt;</comment>
                            <comment id="45442" author="adilger" created="Mon, 24 Sep 2012 12:25:25 +0000"  >&lt;p&gt;Just to confirm, the inability for the MDS to start using this OST should not affect the ability of the clients to read existing files from the OST.  This would only prevent new files from being created there.&lt;/p&gt;</comment>
                            <comment id="45445" author="jamervi" created="Mon, 24 Sep 2012 12:56:54 +0000"  >&lt;p&gt;Andreas, here is the output from the lctl get_param on the MDS and the affected OSS:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmmds-scratch1 ~&amp;#93;&lt;/span&gt;# lctl get_param osc.scratch1-OST0001-osc/prealloc_next_id&lt;br/&gt;
osc.scratch1-OST0001-osc.prealloc_next_id=14540259&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmoss-scratch1 scratch1-OST0001&amp;#93;&lt;/span&gt;# lctl get_param obdfilter.scratch1-OST0001.last_id&lt;br/&gt;
obdfilter.scratch1-OST0001.last_id=14563595&lt;/p&gt;

&lt;p&gt;I&apos;d say these two numbers are pretty far off. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Here is the dmesg info when the OST was mounted:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;102794.862025&amp;#93;&lt;/span&gt; LDISKFS FS on md2, external journal on md12&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102794.862095&amp;#93;&lt;/span&gt; LDISKFS-fs: mounted filesystem with ordered data mode.&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102797.452170&amp;#93;&lt;/span&gt; LustreError: 137-5: scratch1-OST0001: Not available for connect from 10.1.35.2@o2ib (no target)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102797.452177&amp;#93;&lt;/span&gt; LustreError: Skipped 4 previous similar messages&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102806.069608&amp;#93;&lt;/span&gt; kjournald starting.  Commit interval 5 seconds&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102806.142879&amp;#93;&lt;/span&gt; LDISKFS FS on md2, external journal on md12&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102806.142955&amp;#93;&lt;/span&gt; LDISKFS-fs: mounted filesystem with ordered data mode.&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102806.142958&amp;#93;&lt;/span&gt; LDISKFS-fs: file extents enabled&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102806.151589&amp;#93;&lt;/span&gt; LDISKFS-fs: mballoc enabled&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102806.416842&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001: Now serving scratch1-OST0001 on /dev/md2 with recovery enabled&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102806.416850&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001: Will be in recovery for at least 5:00, or until 1852 clients reconnect&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102806.463397&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001.ost: Set parameter quota_type=ug2&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102807.547883&amp;#93;&lt;/span&gt; LustreError: 137-5: scratch1-OST0002: Not available for connect from 10.1.33.4@o2ib (no target)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;102828.489696&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001: Starting recovery timer for 5:00&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;103089.133873&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0000: Recovery period over after 5:00, of 1852 clients 8 recovered and 1844 were evicted&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;103089.133881&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0000: Sending delayed replies to 8 recovered clients&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;103127.713576&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001: Recovery period over after 5:00, of 1852 clients 8 recovered and 1844 were evicted&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;103127.713586&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001: Sending delayed replies to 8 recovered clients&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;103397.269470&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0000: received MDS connection from 10.1.35.2@o2ib&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;103397.270150&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0000: Deleting orphan objects from 15685910 to 15685927, orphan objids won&apos;t be reused any more.&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;103397.271317&amp;#93;&lt;/span&gt; LustreError: 17563:0:(filter.c:3173:filter_handle_precreate()) scratch1-OST0001: ignoring bogus orphan destroy request: obd&lt;br/&gt;
id 14540258 last_id 14563595&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204924.148299&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001: Client scratch1-mdtlov_UUID (at 10.1.35.2@o2ib) reconnecting&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204924.148993&amp;#93;&lt;/span&gt; Lustre: scratch1-OST0001: received MDS connection from 10.1.35.2@o2ib&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204924.149018&amp;#93;&lt;/span&gt; Lustre: Skipped 1 previous similar message&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;204924.149414&amp;#93;&lt;/span&gt; LustreError: 17598:0:(filter.c:3173:filter_handle_precreate()) scratch1-OST0001: ignoring bogus orphan destroy request: obd&lt;br/&gt;
id 14540258 last_id 14563595&lt;/p&gt;
</comment>
                            <comment id="45460" author="jamervi" created="Mon, 24 Sep 2012 15:14:48 +0000"  >&lt;p&gt;Is there any other information that I can provide to assist you in helping me resolve my activation problem?&lt;/p&gt;

&lt;p&gt;Beyond that will it be wise/beneficial to run lfsck -i -c against the file system to clear the dangling and zero length inode?&lt;/p&gt;</comment>
                            <comment id="45474" author="adilger" created="Mon, 24 Sep 2012 19:27:14 +0000"  >&lt;p&gt;Joe, you are correct - the MDT and the OST have very different expectations on what object should be allocated next on this OST.  The maximum object preallocation window is 10000, so these two numbers should not exceed this amount.  If they do, then the OST refuses to destroy the large number of &quot;orphan&quot; objects to avoid potentially erasing the whole OST due to a software bug or corruption.&lt;/p&gt;

&lt;p&gt;In this case, the difference is over 23000, though it doesn&apos;t appear that the two values are corrupted.  Is it possible that the MDS was restored from backup at some point since this OST was taken offline?  Alternately (this shouldn&apos;t happen) was the OST accidentally attached to some other Lustre filesystem?&lt;/p&gt;

&lt;p&gt;The fix for this is to either binary edit the MDT &quot;lov_objids&quot; file to have the same value as the OST (which will potentially leave some orphan objects on the OST, or (slightly more risky, but less effort) to delete the lov_objids file entirely and have the MDT recreate it from the values on each of the OSTs.&lt;/p&gt;</comment>
                            <comment id="45477" author="jamervi" created="Mon, 24 Sep 2012 20:40:42 +0000"  >&lt;p&gt;I think that I would opt for the less risky approach. If I do the binary edit, and later run lfsck would that clear the orphaned objects? I am not particularly concerned it they wind up in lost+found if I use the -l option just as long as the file system is in a better state than it currently is or was prior to this recent deactivation problem. &lt;/p&gt;

&lt;p&gt;But on the other hand, what is the risk with deleting the lov_objids? I&apos;m a little bit nervous about doing the binary edit and making a mistake. Just to be clear, if I do edit lov_objids file I am only concern with scratch1-OST0001 right? And in doing the edit I want to modify the value to be 14563595, correct?&lt;/p&gt;

&lt;p&gt;Also, as I mentioned in my previous comment, is there a benefit to running lfsck on the file system once I am able to activate the OST? Currently the file system is offline with only the backup MDS acting as a client for running lfsck. If there is something to be gained by running lfsck we are will to keep the file system unavailable until it completes if necessary. &lt;/p&gt;

&lt;p&gt;If you can respond this evening it would be greatly appreciated so I can get these processes rolling over night.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                            <comment id="45478" author="jamervi" created="Mon, 24 Sep 2012 20:52:52 +0000"  >&lt;p&gt;Also WRT binary edit, the manual discuss modifying the data on an OST. Do I just apply the same principles to the MDT?&lt;/p&gt;</comment>
                            <comment id="45479" author="jamervi" created="Mon, 24 Sep 2012 21:17:04 +0000"  >&lt;p&gt;I have taken down the file system and mounted both the MDT and affected OST ldiskfs. Running the od on the MDT this is the output:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmmds-scratch1 CONFIGS&amp;#93;&lt;/span&gt;# od -Ax -td8 /lustre/md1/lov_objid &lt;br/&gt;
000000             15685909             14540258&lt;br/&gt;
000010             15932110             14947247&lt;br/&gt;
000020             14515004             14128711&lt;br/&gt;
000030             15000526             15162675&lt;br/&gt;
000040             13640425             14099966&lt;br/&gt;
000050             14681958             14342756&lt;br/&gt;
000060             15165350             14397848&lt;br/&gt;
000070             14549423             14439112&lt;br/&gt;
000080             14908468             14520235&lt;br/&gt;
000090             14317909             15447697&lt;br/&gt;
0000a0             14506040             14566356&lt;br/&gt;
0000b0             14878948             14560476&lt;br/&gt;
0000c0             14593685             14742015&lt;br/&gt;
0000d0             14934824             13734107&lt;br/&gt;
0000e0             14365307             14647258&lt;br/&gt;
0000f0             14255774             14431566&lt;br/&gt;
000100&lt;/p&gt;

&lt;p&gt;Granted I don&apos;t really understand what I&apos;m looking at but 000010 (if that is scratch1-OST0001) doesn&apos;t line up with any of the numbers above.&lt;/p&gt;

&lt;p&gt;With that in mind, I really don&apos;t know how to proceed. Guidance would definitely be appreciated.&lt;/p&gt;</comment>
                            <comment id="45482" author="pjones" created="Mon, 24 Sep 2012 23:14:57 +0000"  >&lt;p&gt;Niu&lt;/p&gt;

&lt;p&gt;Could you please advise on this one?&lt;/p&gt;

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

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="45494" author="adilger" created="Tue, 25 Sep 2012 02:19:01 +0000"  >&lt;p&gt;Joe,&lt;br/&gt;
Apologies for not replying sooner - I&apos;m currently travelling. &lt;/p&gt;

&lt;p&gt;OST0001 is the second number displayed (14540258) at offset 08.  Editing this value should not affect the ability to run lfsck later on. &lt;/p&gt;

&lt;p&gt;As for running lfsck afterward, this could also be done on the running system, so I&apos;m reluctant to have you keep the system down longer than needed. I didn&apos;t know that the system was down thus while time - the inability of the MDS to complete recovery with the OST should not have affected the ability of clients to use the rest of the filesystem. &lt;/p&gt;</comment>
                            <comment id="45526" author="jamervi" created="Tue, 25 Sep 2012 15:34:11 +0000"  >&lt;p&gt;So following Andreas&apos; latest comment I was able to understand what I was seeing and successfully edited the lov_objid file on the MDS to get the OST active again. The problem has be fixed and the file system is operational again.&lt;/p&gt;

&lt;p&gt;For the benefit of anyone reading this that may have had the same problems understanding the documentation in the manual regarding binary edits (Appendix B: How to fix bad LAST_ID on an OST) I am detailing it here with the specifics of my case as example. (Note that this is for editing the MDT and not the OST so some of the information provided in the manual doesn&apos;t necessarily apply.)&lt;/p&gt;

&lt;p&gt;The ids that were identified as being out of sync for the OST were based on error information in dmesg on the deactivated OST:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;204924.149414&amp;#93;&lt;/span&gt; LustreError: 17598:0:(filter.c:3173:filter_handle_precreate()) scratch1-OST0001: ignoring bogus orphan destroy request: obdid 14540258 last_id 14563595&lt;/p&gt;

&lt;p&gt;In the above the obdid 14540258 represents what the MDS had recorded as the last_id, and the last_id 14563595 is what the OST reported. As Andreas mentioned above the difference between those two numbers is greater than 23000 (only by 337 - but enough to cause the problem!)&lt;/p&gt;

&lt;p&gt;The first step I took was to mount the MDT as type ldiskfs:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmoss-scratch1 /root&amp;#93;&lt;/span&gt;# mount -t ldiskfs /dev/md1 /lustre/md1&lt;/p&gt;

&lt;p&gt;I then ran the od command in Step 1 to get the objids on the MDT:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmmds-scratch1 CONFIGS&amp;#93;&lt;/span&gt;# od -Ax -td8 /lustre/md1/lov_objid &lt;br/&gt;
000000 15685909 14540258&lt;br/&gt;
000010 15932110 14947247&lt;br/&gt;
000020 14515004 14128711&lt;br/&gt;
000030 15000526 15162675&lt;br/&gt;
000040 13640425 14099966&lt;br/&gt;
000050 14681958 14342756&lt;br/&gt;
000060 15165350 14397848&lt;br/&gt;
000070 14549423 14439112&lt;br/&gt;
000080 14908468 14520235&lt;br/&gt;
000090 14317909 15447697&lt;br/&gt;
0000a0 14506040 14566356&lt;br/&gt;
0000b0 14878948 14560476&lt;br/&gt;
0000c0 14593685 14742015&lt;br/&gt;
0000d0 14934824 13734107&lt;br/&gt;
0000e0 14365307 14647258&lt;br/&gt;
0000f0 14255774 14431566&lt;br/&gt;
000100&lt;/p&gt;

&lt;p&gt;The thing that confused me initially was that although I could see the number 14540258 on the first line, I didn&apos;t understand the offset (and I guess I still have a question about it: Does each line represent an OSS?)&lt;/p&gt;

&lt;p&gt;Then I mounted the affected OST ldiskfs:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmoss-scratch1 scratch1-OST0001&amp;#93;&lt;/span&gt;# mount -t ldiskfs /dev/md2 /lustre/md2&lt;/p&gt;

&lt;p&gt;I then ran Step 2. I don&apos;t really understand the purpose of the command and it is not clear whether it is supposed to be run on the MDS or the OSS since the documentation instructs you to mount the OST in Step 4. In any event the output was meaningless to me. (It would be nice if someone could explain it with an example.)&lt;/p&gt;


&lt;p&gt;Then following the instructions in the manual I ran the debugfs command (Step 3) which gave me the last_id of the OST that was consistent with the dmesg entry:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmoss-scratch1 scratch1-OST0001&amp;#93;&lt;/span&gt;# debugfs.ldiskfs -c -R &apos;dump O/0/LAST_ID /tmp/LAST_ID&apos; /dev/md2;od -Ax -td8 /tmp/LAST_ID&lt;br/&gt;
debugfs.ldiskfs 1.41.10.sun2-4chaos (23-Jun-2010)&lt;br/&gt;
/dev/md2: catastrophic mode - not reading inode or group bitmaps&lt;br/&gt;
000000             14563595&lt;br/&gt;
000008&lt;/p&gt;

&lt;p&gt;I then ran Step 4:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmoss-scratch1 scratch1-OST0001&amp;#93;&lt;/span&gt;# mount -t ldiskfs /dev/md2 /lustre/md2&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmoss-scratch1 scratch1-OST0001&amp;#93;&lt;/span&gt;# ls -1s /lustre/md2/&lt;br/&gt;
CONFIGS/      health_check  last_rcvd     lost+found/   lquota.group  lquota.user   O/&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmoss-scratch1 scratch1-OST0001&amp;#93;&lt;/span&gt;# ls -1s /lustre/md2/O/0/d*|grep -v &lt;span class=&quot;error&quot;&gt;&amp;#91;a-z&amp;#93;&lt;/span&gt;|sort -k2 -n &amp;gt; /tmp/obj.md2&lt;br/&gt;
(The above command takes some time to run.)&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmoss-scratch1 ~&amp;#93;&lt;/span&gt;# tail -30 /tmp/obj.md2 &lt;br/&gt;
       0 14563566&lt;br/&gt;
       0 14563567&lt;br/&gt;
       0 14563568&lt;br/&gt;
       0 14563569&lt;br/&gt;
       0 14563570&lt;br/&gt;
      0 14563571&lt;br/&gt;
      0 14563572&lt;br/&gt;
       0 14563573&lt;br/&gt;
       0 14563574&lt;br/&gt;
       0 14563575&lt;br/&gt;
      0 14563576&lt;br/&gt;
      0 14563577&lt;br/&gt;
       0 14563578&lt;br/&gt;
      0 14563579&lt;br/&gt;
      0 14563580&lt;br/&gt;
       0 14563581&lt;br/&gt;
       0 14563582&lt;br/&gt;
      0 14563583&lt;br/&gt;
       0 14563584&lt;br/&gt;
      0 14563585&lt;br/&gt;
       0 14563586&lt;br/&gt;
       0 14563587&lt;br/&gt;
       0 14563588&lt;br/&gt;
       0 14563589&lt;br/&gt;
      0 14563590&lt;br/&gt;
      0 14563591&lt;br/&gt;
      0 14563592&lt;br/&gt;
       0 14563593&lt;br/&gt;
       0 14563594&lt;br/&gt;
       0 14563595&lt;/p&gt;

&lt;p&gt;As pointed out in the manual, the value of the last_id matched the existing objects confirming that the problem was on the MDS, and that the problem could be resolved by removing the lov_objid file. However, Andreas&apos; comment about removing the lov_objid file on the MDS being a little more risky, I opted to edit the file on the MDT.&lt;/p&gt;

&lt;p&gt;One thing that is very poorly documented in the manual was the purpose for the HEX to decimal translation and in my option should be placed in the section where the editing is actually discussed. &lt;/p&gt;

&lt;p&gt;The last_id is represented as a decimal number when that value is obtained via the &quot;od -Ax -td8&quot; command. However the when you convert the file from binary to ascii the contents are in HEX. (This is not explained at all.)&lt;/p&gt;

&lt;p&gt;I copy the lov_objid file from the MDT to /tmp as describe in the manual. Below is the output without redirection to an output file.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmmds-scratch1 tmp&amp;#93;&lt;/span&gt;# xxd lov_objid&lt;br/&gt;
0000000: 1559 ef00 0000 0000 e2dd dd00 0000 0000  .Y..............&lt;br/&gt;
0000010: ce1a f300 0000 0000 af13 e400 0000 0000  ................&lt;br/&gt;
0000020: 3c7b dd00 0000 0000 4796 d700 0000 0000  &amp;lt;{......G.......&lt;br/&gt;
0000030: cee3 e400 0000 0000 335d e700 0000 0000  ........3]......&lt;br/&gt;
0000040: e922 d000 0000 0000 fe25 d700 0000 0000  .&quot;.......%......&lt;br/&gt;
0000050: 6607 e000 0000 0000 64da da00 0000 0000  f.......d.......&lt;br/&gt;
0000060: a667 e700 0000 0000 98b1 db00 0000 0000  .g..............&lt;br/&gt;
0000070: af01 de00 0000 0000 c852 dc00 0000 0000  .........R......&lt;br/&gt;
0000080: 347c e300 0000 0000 ab8f dd00 0000 0000  4|..............&lt;br/&gt;
0000090: 5579 da00 0000 0000 91b6 eb00 0000 0000  Uy..............&lt;br/&gt;
00000a0: 3858 dd00 0000 0000 d443 de00 0000 0000  8X.......C......&lt;br/&gt;
00000b0: e408 e300 0000 0000 dc2c de00 0000 0000  .........,......&lt;br/&gt;
00000c0: 95ae de00 0000 0000 fff1 e000 0000 0000  ................&lt;br/&gt;
00000d0: 28e3 e300 0000 0000 db90 d100 0000 0000  (...............&lt;br/&gt;
00000e0: 7b32 db00 0000 0000 da7f df00 0000 0000  {2..............&lt;br/&gt;
00000f0: 9e86 d900 0000 0000 4e35 dc00 0000 0000  ........N5......&lt;/p&gt;

&lt;p&gt;Given that the last_id the MDS thought was correct for the deactivated OST (14540258) I first wanted to make sure I knew what I was looking for. So I took 14540248 and converted it to HEX.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmmds-scratch1 tmp&amp;#93;&lt;/span&gt;# echo &quot;obase=16; 14540258&quot;|bc&lt;br/&gt;
DDDDE2&lt;/p&gt;

&lt;p&gt;This is the line that represents the first and second OSTs in the system: &lt;br/&gt;
0000000: 1559 ef00 0000 0000 e2dd dd00 0000 0000  .Y..............&lt;/p&gt;

&lt;p&gt;But if you notice, there is a byte swap that is not mentioned in the manual so the DDDDE2 number that is generated by the bc command must be convert to E2DD DD00 0000 0000 to be properly inserted into the file.&lt;/p&gt;

&lt;p&gt;I then converted the correct last_id number to HEX:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmmds-scratch1 tmp&amp;#93;&lt;/span&gt;# echo &quot;obase=16; 14563595&quot;|bc&lt;br/&gt;
DE390B&lt;/p&gt;

&lt;p&gt;Then created the ascii file by running the command &quot;xxd lov_objid lov_objid.asc&quot; and edited as described in the manual taking extra care to do the byte swap to &quot;0b39 de00 0000 0000&quot;, followed by recreating the HEX file with &quot;xxd -r lov_objid.asc lov_objid.new&quot;.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmmds-scratch1 tmp&amp;#93;&lt;/span&gt;# vi /tmp/lov_objid.asc &lt;br/&gt;
&amp;lt;snip&amp;gt;&lt;br/&gt;
0000000: 1559 ef00 0000 0000 0b39 de00 0000 0000  .Y..............&lt;br/&gt;
0000010: ce1a f300 0000 0000 af13 e400 0000 0000  ................&lt;br/&gt;
&amp;lt;/snip&amp;gt;&lt;/p&gt;

&lt;p&gt;I confirmed that the file was what I expected:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rmmds-scratch1 tmp&amp;#93;&lt;/span&gt;# od -Ax -td8 /tmp/lov_objid.new &lt;br/&gt;
000000             15685909             14563595&lt;br/&gt;
000010             15932110             14947247&lt;br/&gt;
000020             14515004             14128711&lt;br/&gt;
000030             15000526             15162675&lt;br/&gt;
000040             13640425             14099966&lt;br/&gt;
000050             14681958             14342756&lt;br/&gt;
000060             15165350             14397848&lt;br/&gt;
000070             14549423             14439112&lt;br/&gt;
000080             14908468             14520235&lt;br/&gt;
000090             14317909             15447697&lt;br/&gt;
0000a0             14506040             14566356&lt;br/&gt;
0000b0             14878948             14560476&lt;br/&gt;
0000c0             14593685             14742015&lt;br/&gt;
0000d0             14934824             13734107&lt;br/&gt;
0000e0             14365307             14647258&lt;br/&gt;
0000f0             14255774             14431566&lt;br/&gt;
000100&lt;/p&gt;

&lt;p&gt;I then moved the new file into place, unmount both targets on both the MDS and OSS, then mounted only those 2 devices as type lustre and confirmed that the OST came online and was activated. Once that was done I remounted the rest of the OSTs and am presently running lfsck.&lt;/p&gt;</comment>
                            <comment id="45538" author="adilger" created="Tue, 25 Sep 2012 18:17:49 +0000"  >&lt;p&gt;Joe, your commentary here is right on the mark.  You are correct that these steps are not adequately described for someone &quot;not skilled in the art&quot;.  I take these kind of things for granted, but not many people are as closely familiar with the code and on-disk formats as I am.&lt;/p&gt;

&lt;p&gt;It definitely makes sense to update the user manual in this case with a better description of the required steps, as you have documented here.&lt;/p&gt;

&lt;p&gt;Also, it would be good to have Lustre handle this case more transparently than it does today.  This is partially addressed with the patch in &lt;a href=&quot;https://bugzilla.lustre.org/show_bug.cgi?id=24128&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugzilla.lustre.org/show_bug.cgi?id=24128&lt;/a&gt;, but this needs to be refreshed for the latest Lustre code, and landed to a release branch.&lt;/p&gt;</comment>
                            <comment id="45554" author="pjones" created="Wed, 26 Sep 2012 02:44:29 +0000"  >&lt;p&gt;Reassigning to Cliff to see what improvements can be made to the manual&lt;/p&gt;</comment>
                            <comment id="128342" author="adilger" created="Thu, 24 Sep 2015 09:46:13 +0000"  >&lt;p&gt;The LAST_ID reconstruction described here is now handled automatically by the OSS and LFSCK.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="10110">LU-14</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|hzv3ov:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4120</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>