very slow deletions on ext3 USB drive

Karl Auer kauer at biplane.com.au
Fri Sep 18 11:37:47 UTC 2009


Hullo all.

I have a hard disk, 250Gb or so, in an external USB 2.0 HDD enclosure.
The disk is now full. Specifically, it is full of old backups. Each
backup is in its own directory, and there are about 45 directories at
the top level. Each directory contains about 300,000 files and
directories, mostly very small. The files are pretty evenly distributed
through the directories and subdirectories. The disk is an ext3
filesystem.

I now want to recycle the drive and start filling it up with new
backups. So I have started deleting the old backups. I don't want to
delete ALL the backups - just the oldest ones - so I can't just reformat
the disk.

Problem is, it is taking literally hours to remove each backup
directory. Why is this so? Is there any faster way than "rm -fr" to
remove a directory? Should I use a different filesystem type next time?

The only wrinkle here is that the backup directories were created using
rsynch, hard linking to identical files rather than copying them anew.
But that is a simple link count - I can't see it adding *this* much pain
to a simple deletion!

Clues?

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)                   +61-2-64957160 (h)
http://www.biplane.com.au/~kauer/                  +61-428-957160 (mob)

GPG fingerprint: 07F3 1DF9 9D45 8BCD 7DD5 00CE 4A44 6A03 F43A 7DEF

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090918/3710ec30/attachment.sig>


More information about the ubuntu-users mailing list