The root directory of my ecryptfs filesystem has grown massively since I accidentally created many thousands of files in it. Now that I've deleted the files, I'd like to shrink the directory, as I believe it's causing some performance problems.
My home directory before the ecryptfs mount:
dr-x------ 2 ian ian 4096 May 4 2012 /home/ian
and after:
drwx------ 104 ian ian 42721280 Jun 18 13:46 /home/ian
https://serverfault.com/questions/264124/shrink-reset-directory-size discusses a similar problem with an ext3 filesystem, and suggests doing an e2fsck -D
. However, ecryptfs doesn't seem to have its own fsck.
How can I shrink my directory without creating a new filesystem and copying everything over?
/home/ian/
(in ecryptfs) correlates to/home/ian/.ecryptfs/...
(somewhere in the underlying filesystem). – frostschutz Jun 18 '13 at 14:31