autofs can do this for you. You can configure any number of mountpoints with various options, and the corresponding filesystems are mounted whenever the mountpoint is accessed. After a given amount of inactivity the filesystems are unmounted again.
There are no doubt various ways of using
autofs, but here's one way of doing what you're trying to do, based on the way I used to use it.
You start with a directory which will hold a number of
autofs mount-points (well, at least one); say
/misc. You don't need to create it, but you do need to create a configuration file which will describe all the filesystems you want to mount there; for example, I could mount CDs, DVDs and Blu-Rays with the following file, saved as
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
br -fstype=udf,ro,nosuid,nodev :/dev/cdrom
The general syntax is the mountpoint, followed by any options introduced by
-, then the mountpoint introduced by
: on a local system. (I'm simplifying here, see the
autofs(5) manpage for details.)
Then this file is enabled by adding an entry in
sudo service autofs restart
and you should be able to run
and see the contents of any CD in your drive. (Obviously replace the name and mount target by whatever is appropriate in your case.)
Once you have that, you can link to anything in the auto-mounted filesystems from anywhere else, in the same way as if they were standard, non-auto-mounted filesystems. So in my example,
ln -s /misc/br blu-ray
blu-ray link wherever the command is run. You can link further into the filesystem as well,
ln -s /misc/br/BDMV autolinktest
autolinktest link to the movie contents. Accessing the links will mount the target filesystem.