extremely slow "ls" on a cleared fatty ext3 directory on FC4/5

Theodore Tso tytso at mit.edu
Sun Aug 13 23:10:49 UTC 2006


On Sun, Aug 13, 2006 at 09:05:19PM +0200, Jan-Frode Myklebust wrote:
> On 2006-08-13, Theodore Tso <tytso at mit.edu> wrote:
> >
> > Not without rebooting, but probably it will required scheduled
> > downtime where you kick all of the users off, and then recreate the
> > tmp directory --- either using rsync, or just doing a plain old "rm
> > -rf /tmp; mkdir /tmp".  
> 
> Shouldn't require downtime if you do a quick:
> 
> 	mv /tmp /tmp-old ; mkdir --mode=1777 /tmp 
> 
> Plus maybe moving the file from /tmp-old/ to /tmp/... and /tmp-old can be 
> deleted as soon as no processes accessing it. Check with fuser/lsof.

There may be shell scripts that create files in /tmp, and then
references them later in another part of the shell script.  So the
race conditions of just moving files from /tmp to /tmp-old are real,
and non-trivial.  Not to mention processes that cd into /tmp, etc.

So scheduling downtime is the safest way to do things.

						- Ted




More information about the Ext3-users mailing list