Wednesday, November 16, 2011

Ubuntu, external USB hard drives, and .Trash:

And much frustration ensued.

Okay, it's like this. My computer has been giving me some trouble on bootup lately. Finding annoying disk errors that (maybe) aren't really there, not letting me try to fix them, etc. So I decided to do some work on it.

(in case anyone happened upon this through searching the webs and cares, I'm running Ubuntu 10.04 LTS Lucid Lynx; and the external hard drive pre-dates my generally very happy switch to Ubuntu, so it was initially used on a windows XP machine.)

Before starting said "work" I decided to do the smart thing and back up my important files to an external hard drive. Smart, no?

So first I went through the external USB hard drive (320gb), which had all manner of shit on it from many years of use, much of it redundant backups (like, say, "Acer laptop backup Nov 09", "Acer Laptop Backup June 10" and "important files from Acer laptop Dec 10", which a bunch of repetition) and started trashing things. Then clicked "Empty Trash". Presto!

Except ubuntu does this clever thing where it doesn't actually let you delete the files completely: it saves them in a folder called .Trash-1000. So something like /media/ExternalVolumeName/.Trash.1000.

This will give your dumb ass a second chance if you accidentally deleted something, then emptied the trash, and then changed your mind. Great, right? Sorta not, since it means that you don't recover the disk space.

So I kept trying to delete these nasty files. And somehow, somewhere deep in a dark hole, it created some sort of circular/redundant result, and kept trying to move the files to the trash. See this screen shot?


Remember that this is from a 320GB external hard drive, and it's the only other drive mounted on my desktop computer (which also happens to have a 320 GB hard drive, and no other storage.) So obviously, something is wrong when it's preparing to delete 1.7 terrabytes.

I finally got pissed off this morning and went with the nuclear option: since I'd already backed up the important files from the external drive, I fired up Disk Utility and reformatted the damn thing. And lived happily ever after. I think. Now I'm about to do a fresh new backup of files back to the external drive, so I can go back to the original problem. So we'll see if another followup blog post tells more tales of woe.

No comments: