A while back, I gave my sister a 1 TB 2.5" USB HDD for backing up her Mac using Time Machine. But somehow she couldn't perform backups anymore lately. The drive contained two volumes: a regular one and an encrypted one. The regular one wouldn't mount and Disk Utility wouldn't repair it.
No big deal, just wipe the drive and start from scratch, I thought—assuming it's not a hardware problem. That was easier said than done. I ended up spending half the day yesterday just trying to repartition that stupid USB drive.
At first, it seemed like this didn't work because I had Core Storage enabled on it for the encrypted partition. I managed to revert the CS partition back to a regular partition. But then repartitioning wouldn't work: I was unable to modify the first (broken, unencrypted) partition. Or make modifications to the second partition stick.
This isn't my first Disk Utility rodeo, so I booted into: the recovery partition, Snow Leopard and Leopard and tried the same thing using those versions of the Disk Utility. No joy.
I tried various ways to nuke the drive and its partitions using the command line diskutil and hdiutil commands. Which of course fail silently if you don't use them with sudo. And failed a bit less silently with sudo. The various utilities all failed at unmounting the existing partition(s).
The Finder, Disk Utility, diskutil, hdiutil, nothing would unmount the drive.
Did I mention I used the "force" flag? Didn't make one iota of difference.
I even made an fstab to keep the drive from automounting, but that didn't work.
All the while, every search for help only led me to forum posts where people kept telling the original poster that you can't unmount your boot drive.
So then I thought I'd try to have Linux wipe out the drive. But I couldn't let a VM connect to the drive because MacOS immediately took it after connecting the USB cable and then held on for dear life.
So maybe my Time Capsule wifi base station is a bit simpler in its disk handling, so I decided to hook up the drive to it and then have the TC initialize it. Good plan, except for the part where the Time Capsule wouldn't recognize its password with the drive connected.
This is where I gave up with the drive clicking away connected to the Time Capsule. The next morning, I disconnected the drive from the TC, hooked it up to my laptop, saw icons for both partitions, unmounted them and used Disk Utility to repartition as if yesterday's hair pulling session was all a bad dream.
I spent the rest of the day zeroing out the drive to make sure the hardware was ok, with no further problems.
Why does this stuff have to be so difficult?