I keep a multitude of backups - you should do the same, it’s super important. That meant that when my Time Machine external HDD stopped recognising my encryption password for it, I wasn’t too worried - I knew I still had three other backups.
I did want it back though, as the history it gives is really useful. Once I’d verified that I couldn’t get access to the drive (I guess there was some corruption somewhere important), I tried to format it, but I got error messages saying that the drive could not be mounted. Having now looked at my console logs, I also got many thousands of logs like the following:
19/06/2014 20:45:36.197 mds[71]: (Error) FMW: WE ARE DROPPING FMW EVENTS!
This (from a cursory web search) seemed to be bad news for my Time Machine drive, so I just wanted to wipe it, but Disk Utility was incapable of solving the problem. Here’s what I did:
In terminal, run
diskutil list
You’ll get a list of all your connected drives. You should be able to figure out which is the offending drive - compare results with it unplugged, if neccesary. For me it was disk3. Next, run:
ps aux | grep fsck
Which will give you a list of processes like the following - in my case, there was only the fsck command I had just started, but if you have any others, kill them. Killing the fsck doesn’t cause any problems either:
root 28936 29.7 2.7 3490808 229716 ?? R 5:12pm 0:08.16 /System/Library/Filesystems/hfs.fs/Contents/Resources/./fsck_hfs -y /dev/disk3
To kill processes, run this, replacing 28936 with the process number from the above.
sudo kill -9 28936
You may get a GUI error box at this point - that’s a good sign! You can then use Disk Utility to erase the drive as normal - strangely diskutil from the commandline wouldn’t work for me.
Let me know in the comments or on twitter if this was helpful for you.