I tried to unmount the drive:
- umount /dev/hdd (or umount /media/cdrom0)
- umount -l /media/cdrom0
Apparently, the -l unlinks /media/cdrom0 from fstab, at which point any apps
with a lock on this directory cannot access it anymore and therefore it can be successfully unmounted.
I did not think of this at the time but next time it happens, I'll try using lsof to locate the process:
- lsof |grep /media/cdrom0