how can I tell if a directory is using dir_index?

Christian evilninja at gmx.net
Thu Aug 17 17:43:02 UTC 2006


On Thu, August 3, 2006 14:09, Norbert Kiesel wrote:
> - Is there a way to tell is a given directory is indexed or not?

I think the "htree_dump" command in debugfs(8) should display dir_index
information, although I could not find really much documentation, it's
only mentioned in the manpage.

> - Is there a better way to index the root fs than to boot off a live
> CD?

read-only mounting in single-user mode comes to mind, but then again I
don't know if "e2fsck -D" is a safe thing to do with an ro-mounted volume.
you could try it beforehand with a dummy-volume:

# dd if=/dev/zero of=test.img bs=1M count=500
# losetup /dev/loop0 test.img
# mkfs.ext3 /dev/loop0
# mount /dev/loop0 /mnt
# copy-some-data-to-/mnt
# mount -o remount,ro /mnt
# e2fsck -D /dev/loop0
# mount -o remount,rw /mnt

....and verify that all data is correct (diff(1)!)
(untested, keep you backups handy ;))

-- 
BOFH excuse #442:

Trojan horse ran out of hay




More information about the Ext3-users mailing list