On Tue, Nov 14, 2006 at 12:35:30PM +0000, Sam Morris wrote: > > As far as I know, neither the resize_inode nore the dir_index ext3 > > option can be securely added after the file system is created. > > According to > <http://groups.google.co.uk/group/linux.debian.devel/msg/4d987ea414438e70>, > it should be perfectly safe to add dir_index to an existing filesystem. > However, to get the benefit of the indexing for already-created > directories, e2fsck -D should be run after dir_index has been added; > therefore it's probably best to just document the procedure in the release > notes.
Correct, that it's perfectly safe to add dir_index to an existing filesystem. You can even do it to a mounted filesystem, and any new directories which are created and grow beyond a single block will use the directory indexing feature. (So yes, "mkdir foo.new; mv foo/* foo.new; rmdir foo; mv foo.new foo" will work module locking/race conditions with applications trying to read/write/create/remove files in the foo directory.) If you want to force all directories to be optimized, you can do an off-line (unmounted) e2fsck -fD command. The resize_inode however can not be cleanly to an existing filesystem. There is an ext2prepare command which can be used to do an offline add of resize_inode to an unmounted filesystem; it can be found in ext2resize package. The reason why that functionality hasn't been integrated into e2fsprogs is because I took one look at the source, and decided it had to be rewritten from scratch before I would trust it with my data and before I would be willing to be responsible for maintaining it; it's on my TODO list. That being said, I'm not aware of anyone who has lost data using ext2prepare. Each user will have to decide on their own whether or not you are comfortable using it. Regards, - Ted -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]