How to efficiently remove large directory tree Hi,
A oracle process has tried to dump a core but created recursively a very
deeply nested directory structure like this instead:
core_8286/core_8286/core_8286/core_8286/....etc etc. until the inodes
ran out.
The amount of subdirectories is estimated to be almost 100,000 looking
at the increase of used inodes on the filesystem (vxfs on HPUX 11.0).
The process of creating these dirs has stopped now. After enlarging the
fs, there is free space and enough free inodes available. I'm trying to
get rid of all the subdirs.
I've tried to do a # rm -r from the first core_8286 level, but after
several hours it was still running and a trace on system calls showed it
was very busy with chdir calls and seemed to be looping, so I killed it.
A find core_8286 -depth |xargs rm -r also ran for hours without result.
Problem is that most unix utilities fail on these huge path lenghts;
du gives "path too long", bdf fails as well.
A script I made that just did a loop with a "cd core_8286" 100 times
showed that the deeper I get the longer it takes to execute a block of
100 cd commands. This is probably due to system calls taking longer
while traversing longer path names (exponential growth?)
Does anyone have a efficient method of cleaning this up while keeping
the filesystem online (50 databases running on it, so I want to avoid
downtime because of restoring the filesystem)?
Txs beforehand
Gert. |