very slow deletions on ext3 USB drive

Karl F. Larsen klarsen1 at gmail.com
Fri Sep 18 11:49:22 UTC 2009


Karl Auer wrote:
> 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.
> 
> 
	I would rsynch the files you want to any other hard drive and then just 
format the one you want to reuse.




-- 

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.
         Key ID = 3951B48D





More information about the ubuntu-users mailing list