FreeBSD unresponsive after large rm -r * command

  • The other day I found that our Sarg Reports folder had grown to takeover all available space on our box.  I uninstalled the package as we never used it and ran an 'rm' command from the console.  It finished in about an hour.  During that time I just left the box alone, and my shell cursor was at a blank line.  When the process finished, I got the regular prompt again.  Everything was good.

    Today I am working with a much larger data set on a Nas4Free box and had to delete a larger amount of files and folders (deduplicated data store from PHDVirtual Backup).  It's been running for a few hours now and the box is still unresponsive.  Is there a better way to delete millions of files en masse?  Should I expect that other services will freeze during this operation as they have now or is this normal in a BSD/*nix envinronment?

  • Rebel Alliance Developer Netgate

    rm is really the only way to do it, or using something else to pass data to rm (like find /somewhere -name "foo" -type f | xargs rm).

    If the system is blocking on I/O there may not be much you can do. If you can open multiple terminals, running 2+ rm's can sometimes be faster then one alone, but it's still bound by I/O limits on the drive.

Log in to reply