if your referring to drives in a Jukebox/Silo etc, set the "Idle Device Timeout" from its default of 0, to maybe 5.....then the device will unmount and eject the media....
everyone has supplied nsrjb commands, so that would be that everyone assumes you are using a jukebox/silo.....
dont use the nsrjb -H for unloading your drives......you Dont Reset your computer everytime you want to close a folder...... thats too extreme...
from the Storage node controlling the jukebox...
# nsrjb -s <nsr svr> -uv
(leaving out a device, will have it unload all available devices in the jukebox)
if its just standalone devices...not part of an automated jukebox etc....
just run
# nsrmm -uvv