<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(171, 171, 171) solid;font-family:'Segoe UI WPC','Segoe UI',Tahoma,'Microsoft Sans Serif',Verdana,sans-serif;font-size:10pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(223, 237, 250);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 2px 4px 0px 4px;vertical-align:sub;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(223, 237, 250) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}--></style>
</head>
<body>
<div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>We have 2 ocfs2 filesystems on our 6 node cluster running OEL5.10 that were created before indexed-dirs were active by default.</p>
<p><br>
</p>
<p>We were having lag in accessing sub directories that contained 10s of thousands of files, so thought adding the indexes would help, and it did for D/Q, we ran into this in our PROD environment.<br>
</p>
<p><br>
</p>
<p>[root@sahp9465 ~]#cat /etc/redhat-release <br>
Red Hat Enterprise Linux Server release 5.10 (Tikanga)<br>
[root@sahp9465 ~]#uname -r<br>
2.6.32-400.33.3.el5uek<br>
[root@sahp9465 ~]#rpm -qa |grep ocfs2<br>
</p>
<p>ocfs2-tools-1.8.0-11.el5<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>adding the indexes to the first filesystem went fine, but adding to the 2nd resulted in errors
</p>
<p><br>
</p>
<p><font face="Calibri,Arial,Helvetica,sans-serif" color="black" size="3"><span style="font-size: 12pt; background-color: white;">tunefs.ocfs2: Install directory trailer failed while enable indexed-dirs<br>
tunefs.ocfs2: Install directory trailer failed while building indexed trees</span></font></p>
<p><br>
</p>
<p>The FS was fsck.ocfs2 prior to the attempt to add indexed-dirs and came back clean.</p>
<p><br>
</p>
<p>I then fsck'd again and removed the feature as it said it was enabled, and I didn't want corruption similar to as seen in :
<a href="https://oss.oracle.com/pipermail/ocfs2-users/2012-May/005749.html">https://oss.oracle.com/pipermail/ocfs2-users/2012-May/005749.html</a></p>
<p><br>
</p>
<p><br>
<br>
<br>
[root@HOST ~]#fsck.ocfs2 -y /dev/mapper/oapr1p1<br>
fsck.ocfs2 1.8.0 &nbsp;<br>
Checking OCFS2 filesystem in /dev/mapper/oapr1p1:<br>
Label:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oapr1p1<br>
UUID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C257DA6F9C2E487D9AFD2602064AC2B3<br>
Number of blocks:&nbsp;&nbsp; 131070310<br>
Block size:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096<br>
Number of clusters: 131070310<br>
Cluster size:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096<br>
Number of slots:&nbsp;&nbsp;&nbsp; 16<br>
<br>
/dev/mapper/oapr1p1 is clean.&nbsp; It will be checked after 20 additional mounts.<br>
[root@HOST ~]#tunefs.ocfs2 -Q &quot;Features enabled&nbsp; = %H\n&quot; /dev/mapper/oapr1p1<br>
Features enabled&nbsp; = sparse inline-data xattr<br>
[root@HOST ~]#time tunefs.ocfs2 -vv&nbsp; --fs-features=indexed-dirs /dev/mapper/oapr1p1<br>
Enabling feature &quot;indexed_dirs&quot;<br>
Opening device &quot;/dev/mapper/oapr1p1&quot;<br>
Asking for 4096 blocks of I/O cache<br>
Got 4096 blocks&nbsp; &nbsp;<br>
Asking for 2048 blocks of I/O cache<br>
Got 2048 blocks&nbsp; &nbsp;<br>
Checking for dirty journals<br>
Verifying the global allocator<br>
Device &quot;/dev/mapper/oapr1p1&quot; opened<br>
Opening device &quot;/dev/mapper/oapr1p1&quot;<br>
Verifying the global allocator<br>
Device &quot;/dev/mapper/oapr1p1&quot; opened<br>
Opening device &quot;/dev/mapper/oapr1p1&quot;<br>
Verifying the global allocator<br>
Device &quot;/dev/mapper/oapr1p1&quot; opened<br>
tunefs.ocfs2: Install directory trailer failed while enable indexed-dirs<br>
tunefs.ocfs2: Install directory trailer failed while building indexed trees<br>
Closing device &quot;/dev/mapper/oapr1p1&quot;<br>
Device closed<br>
Closing device &quot;/dev/mapper/oapr1p1&quot;<br>
Device closed<br>
Closing device &quot;/dev/mapper/oapr1p1&quot;<br>
Verifying the global allocator<br>
Device closed<br>
<br>
[root@HOST ~]#time tunefs.ocfs2 -vv&nbsp; --fs-features=indexed-dirs /dev/mapper/oapr1p1<br>
Enabling feature &quot;indexed_dirs&quot;<br>
Opening device &quot;/dev/mapper/oapr1p1&quot;<br>
Asking for 4096 blocks of I/O cache<br>
Got 4096 blocks&nbsp; &nbsp;<br>
Asking for 2048 blocks of I/O cache<br>
Got 2048 blocks&nbsp; &nbsp;<br>
Checking for dirty journals<br>
Verifying the global allocator<br>
Device &quot;/dev/mapper/oapr1p1&quot; opened<br>
Opening device &quot;/dev/mapper/oapr1p1&quot;<br>
Verifying the global allocator<br>
Device &quot;/dev/mapper/oapr1p1&quot; opened<br>
Opening device &quot;/dev/mapper/oapr1p1&quot;<br>
Verifying the global allocator<br>
Device &quot;/dev/mapper/oapr1p1&quot; opened<br>
Directory indexing feature is already enabled; nothing to enable<br>
Closing device &quot;/dev/mapper/oapr1p1&quot;<br>
Device closed<br>
Closing device &quot;/dev/mapper/oapr1p1&quot;<br>
Device closed<br>
Closing device &quot;/dev/mapper/oapr1p1&quot;<br>
Verifying the global allocator<br>
Device closed<br>
<br>
<br>
(reverse-i-search)`fsc': fsck.ocfs2 -y /dev/mapper/oapr1p1<br>
[root@HOST ~]#fsck.ocfs2 -y /dev/mapper/oapr1p1<br>
fsck.ocfs2 1.8.0 &nbsp;<br>
Checking OCFS2 filesystem in /dev/mapper/oapr1p1:<br>
Label:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oapr1p1<br>
UUID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C257DA6F9C2E487D9AFD2602064AC2B3<br>
Number of blocks:&nbsp;&nbsp; 131070310<br>
Block size:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096<br>
Number of clusters: 131070310<br>
Cluster size:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096<br>
Number of slots:&nbsp;&nbsp;&nbsp; 16<br>
<br>
/dev/mapper/oapr1p1 is clean.&nbsp; It will be checked after 20 additional mounts.<br>
[root@HOST ~]#<br>
Display all 3129 possibilities? (y or n)<br>
[root@HOST ~]#tunefs.ocfs2 -Q &quot;Features enabled&nbsp; = %H\n&quot; /dev/mapper/oapr1p1<br>
Features enabled&nbsp; = sparse inline-data xattr indexed-dirs</p>
<p><br>
</p>
<p>[root@HOST ~]#time tunefs.ocfs2 -vv&nbsp; --fs-features=noindexed-dirs /dev/mapper/oapr1p1<br>
Disabling feature &quot;indexed_dirs&quot;<br>
Opening device &quot;/dev/mapper/oapr1p1&quot;<br>
Asking for 4096 blocks of I/O cache<br>
Got 4096 blocks<br>
Asking for 2048 blocks of I/O cache<br>
Got 2048 blocks<br>
Checking for dirty journals<br>
Verifying the global allocator<br>
Device &quot;/dev/mapper/oapr1p1&quot; opened<br>
Opening device &quot;/dev/mapper/oapr1p1&quot;<br>
Verifying the global allocator<br>
Device &quot;/dev/mapper/oapr1p1&quot; opened<br>
Opening device &quot;/dev/mapper/oapr1p1&quot;<br>
Verifying the global allocator<br>
Device &quot;/dev/mapper/oapr1p1&quot; opened<br>
We have 5 indexed directories to truncate.<br>
&quot;5&quot; from &quot;5&quot; indexed directories are truncated.Closing device &quot;/dev/mapper/oapr1p1&quot;<br>
Device closed<br>
Closing device &quot;/dev/mapper/oapr1p1&quot;<br>
Device closed<br>
Closing device &quot;/dev/mapper/oapr1p1&quot;<br>
Verifying the global allocator<br>
Device closed<br>
<br>
real&nbsp;&nbsp;&nbsp; 21m43.166s<br>
user&nbsp;&nbsp;&nbsp; 0m11.923s<br>
sys&nbsp;&nbsp;&nbsp;&nbsp; 0m19.696s<br>
[root@HOST ~]#tunefs.ocfs2 -Q &quot;Features enabled&nbsp; = %H\n&quot; /dev/mapper/oapr1p1<br>
Features enabled&nbsp; = sparse inline-data xattr<br>
<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Any suggestions would be greatly appreciated.</p>
<p><br>
</p>
<p>Thanks,</p>
<p><br>
</p>
<p>JD<br>
</p>
<p><br>
</p>
</div>
</body>
</html>