Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lsattr I flag, how to remove or fix?

1,676 views
Skip to first unread message

Nathan Keel

unread,
Apr 3, 2009, 3:10:13 PM4/3/09
to
When I list my home directory on my CentOS system with lsattr, I see:

----------I-- /home/nat

I've read up on what this means, but I don't understand how it became
this way in the first place and how to remove or fix it (though I
believe it is not something that needs "fixing", I don't quite fully
understand this). I do understand the other flags and how to set or
remove them, but not this one. Please help!

Vilmos Soti

unread,
Apr 3, 2009, 3:49:23 PM4/3/09
to
Nathan Keel <na...@gm.ml> writes:

chattr(1):

The 'I' attribute is used by the htree code to indicate that a directory
is behind indexed using hashed trees. It may not be set or reset using
chattr(1), although it can be displayed by lsattr(1).

Vilmos

Nathan Keel

unread,
Apr 3, 2009, 4:22:32 PM4/3/09
to
Vilmos Soti wrote:

Yeah, I read that, so this is why I was wondering how to fix it (if it
needs fixing) or remove that attribute. It's only on my home
directory, out of maybe four accounts in total. I don't understand
what it means to have a directory behind indexes, using hashes trees.
So, my questions are; How did this happen, what does it mean and how do
I fix or change this? I'm trying to understand this, even though it
doesn't appear to have any impact on use or permissions or
chattr/lsattr attributes. Thanks.

David W. Hodgins

unread,
Apr 3, 2009, 4:37:21 PM4/3/09
to
On Fri, 03 Apr 2009 15:10:13 -0400, Nathan Keel <na...@gm.ml> wrote:

> I've read up on what this means, but I don't understand how it became
> this way in the first place and how to remove or fix it (though I

It can be turned on when the filesystem is formatted (mke2fs -O dir_index),
or using the same option with tune2fs. The option can also be set in
/etc/mke2fs.conf.

Having it turned on speeds up finding a file in a directory with lots of files.

I can't think of any reason not to use it, unless you're using some very
old programs that access the filesystem directly, and don't know how
to use the index tree.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)

Nathan Keel

unread,
Apr 4, 2009, 1:29:58 AM4/4/09
to
David W. Hodgins wrote:

> On Fri, 03 Apr 2009 15:10:13 -0400, Nathan Keel <na...@gm.ml> wrote:
>
>> I've read up on what this means, but I don't understand how it became
>> this way in the first place and how to remove or fix it (though I
>
> It can be turned on when the filesystem is formatted (mke2fs -O
> dir_index),
> or using the same option with tune2fs. The option can also be set in
> /etc/mke2fs.conf.
>
> Having it turned on speeds up finding a file in a directory with lots
> of files.
>
> I can't think of any reason not to use it, unless you're using some
> very old programs that access the filesystem directly, and don't know
> how to use the index tree.
>
> Regards, Dave Hodgins
>

Thanks for the information, I wasn't really clear on exactly what it
meant or why I was seeing it. It gave me the impression there might
have been a problem, as I saw this when I had a problem last month
(unrelated though, just that it's when I saw the attribute). Since
this is expected, normal and not something that needs to be fixed
(especially if it's a good thing), then I'm happy and I've learned
something. Cheers!

0 new messages