Why does my hard disk (in MBP optical caddy) keep unmounting when writing?
I found out that this particular model (late 2011 Macbook Pro) has an issue with the optical drive SATA: It can only operate reliably in 3Gb/s mode, but reports that it supports 6Gb.

The drive I was using supported both speeds, and is supposed to automatically switch to 3Gb when necessary. But because the bus reports that it's compatible with 6Gb, it stays in 6Gb mode. This works fine most of the time as the actual transfer speed doesn't exceed 3Gb. But when it does, the bus misbehaves and all sorts of problems occur.

After much frustration (and several different drives) I settled on putting a 3Gb (not 6/3) drive in that bay instead. Works great now. Incidentally, the other SATA drive bay supports 6Gb just fine.