This really depends on what you are trying to do. One (relatively drastic) step to do this would be to recompile support for the CDRom but not SATA drives (assuming your drives are SATA, which is most likely). Anything short of rebuilding the kernel or creating a loadable module for it will prevent [practical] access to the drive.
On the other extreme, modify your /etc/fstab file to stop the drive being moounted automatically, for example
/dev/sda1 auto noauto 0 0
This can easily be worked around by manually mounting the drive.
Another possibility might be to modify udev (/etc/udev/rules.d/60-persistent-storage.rules) and add a line like -
KERNEL=="sda*", GOTO="persistent_storage_end"