The simple solution is the command “lsof” which means “list of files”, invoked with

lsof /dev/hdc

if /dev/hdc is the cdrom would give the list of files and programs which prohibit unmounting.