I want to automount the /usr/local/whatever directory on a desktop,
which is hosted by a server running SLES.
I’m a bit of a newbie to SUSE and the automount stuff so I’d appreciate
if somebody could explain to me in very simple terms how I can do this.
I’m just not sure what goes in what file, and how to make subdirectories
of the mounts visible etc.
I am running SLES and SLED 11 SP1 with the latest kernel revisions.
You can add a line similar like the following to your /etc/fstab:
Code:
server1:/share /usr/local/whatever nfs rw,soft
This will mount a share (called share) from the server “server1” to
/usr/local/whatever with NFS. If you decide this way, you need to
ensure, that the rpcbind and the nfs-daemon are started in the
runlevel3:
Users access the volume via /apps and when it’s accessed
/mnt/auto/apps gets created by autofs and the volume mounted there.
Server side stuff since it’s a Netware box not SLES so not relevant to
what you’re doing.
To add just a bit further to Mike’s response, I’ll give a quick synopsis
of the purpose of those files:
The auto.master file essentially defines: When something CDs into the
path specified by the first value, automount daemon will be in control
of what gets mounted within it, according to the file listed as the
second value.
Then the contents of that second file essentilaly says: the subdir
‘apps’ will be a mount point for server-hostname:\apps.
That is the basic way autofs works. There are additional, more complex
ways it can be used, but those are the basics.
You can also alternatively activate the “/net” commented line that is
already in auto.master, which will use the auto.net file. The auto.net
file is a script which can dynamically discover servers and mount their
nfs exports. With that approach, any time you CD to /net/server1,
autofs will dynamically find server1, learn what it has nfs exported,
and attempt to mount all those things within /net/server1/. Simarly for
server2, anyname, etc.
The auto.master file essentially defines: When something CDs into the
path specified by the first value, automount daemon will be in control
of what gets mounted within it,[/color]
This makes me realise there was something I was going to explain but
then forgot to. Applications being accessed via /apps is an historical
precedent on our set up that I wanted to maintain. The reason I had
/apps as a symbolic link to /mnt/auto/apps is because if I tried to have
automount mount something at /apps I’d have to put / in to auto.master
and then automount daemon would try to be in control of what gets
mounted within / and of course that’s not going to work!