LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Info on htree hash directory indexing in ext4 (https://www.linuxquestions.org/questions/linux-newbie-8/info-on-htree-hash-directory-indexing-in-ext4-4175574362/)

hydrurga 03-08-2016 07:05 PM

Info on htree hash directory indexing in ext4
 
I'm busy having a look at the ext4 filesystem, but am having problems understanding exactly how the htree hashing system works for indexed directories.

I've had a look around but can't find anything that explains it in sufficiently layman's language for me to get a proper grasp of it.

Does anyone know of any online or offline sources that might help me out with this aspect of the filesystem?

hydrurga 03-12-2016 01:24 PM

Finally found some decent info.

https://www.kernel.org/doc/ols/2002/...es-425-438.pdf

"A Directory Index of Ext2" by Daniel Phillips (the guy who first developed ext's htree directory indexing, and who's now working on the Tux3 filesystem).

A fascinating read for those who are interested.

norobro 03-12-2016 06:25 PM

It is an interesting read. Thanks for posting the link.

hydrurga 03-12-2016 08:13 PM

Quote:

Originally Posted by norobro (Post 5514490)
It is an interesting read. Thanks for posting the link.

No problem, norobro. Glad you enjoyed it!

ddbtek 06-13-2018 12:16 PM

How to see if a directory is indexed
 
You can see if a directory is indexed on an ext4 filesystem with the "lsattr" command:


Code:

WORKSTATION spool # lsattr -d *
-------------e-- anacron
-------------e-- cron
----------I--e-- cups
-------------e-- libreoffice
-------------e-- lintian
-------------e-- lpd
lsattr: Operation not supported While reading flags on mail
----------I--e-- mqueue
-------------e-- mqueue-client
-------------e-- plymouth
-------------e-- rsyslog
-------------e-- samba

The 'I' you see on the /var/spool/mqueue directory shows it is INDEXED. You cannot change this with chattr.

I am still trying to figure out how to create a new indexed directory because I cannot rename mqueue to mqueue1 and create an empty mqueue to purge the mail spool because sendmail won't wrote to the new mqueue directory for some of what it is doing and exits without the "Index" option set.

Thanks,
David

chrism01 06-14-2018 12:58 AM

If you really need to empty the dir, how about stopping the sendmail service, then emptying the existing mqueue dir, then restarting sendmail?


All times are GMT -5. The time now is 09:50 PM.