2 ms·
After more research I have determined that this is specified behavior. The directory inode doesn't support online shrinking [1] but you can do it offline in one
by jevinskie 16y ago
After more research I have determined that this is specified behavior. The directory inode doesn't support online shrinking [1] but you can do it offline in one of two ways:
1. e2fsck -D /your/partition
The -D option directs fsck to optimize the directories. Basically, it rebuilds the directory inode.
2. mkdir tmp && mv big_folder/* tmp/ && rmdir big_folder && mv tmp big_folder
This actually moves the files to a new, small directory, and deletes the old, big one before renaming back to the original name.
[1] This thread discusses the problem and some potential online solutions http://lkml.org/lkml/2009/5/14/362 http://lkml.org/lkml/2009/5/14/362