Autofs

Hey guys,

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.

Thanks in advance!


ianmbr

ianmbr’s Profile: http://forums.novell.com/member.php?userid=113607
View this thread: http://forums.novell.com/showthread.php?t=446838

ianmbr,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

Has your problem been resolved? If not, you might try one of the following options:

  • Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
  • You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.novell.com/faq.php

If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.

Good luck!

Your Novell Product Support Forums Team
http://forums.novell.com/

Hi

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:

Code:

$ chkconfig nfs on
$ chkconfig rpcbind on


Hope this helps.
Regards,
Tom


amo_vzug

amo_vzug’s Profile: http://forums.novell.com/member.php?userid=25342
View this thread: http://forums.novell.com/showthread.php?t=446838

Using /etc/fstab is sort of the opposite of using autofs though.

This seems like the sort of thing one ought to be able to find in
‘documentation’ (http://www.novell.com/documentation/sles11/), but I
can’t find it on quick flip through.

There’s a Cool Solution ‘here’
(http://www.novell.com/coolsolutions/feature/17581.html), should be much
the same for SLES 11 SP 1.

My SLED 11 SP1 machines automount a volume via NFS and for what it’s
worth this is what the relevant bits look like client side.

Code:

$ cat /etc/auto.master
/mnt/auto /etc/auto.apps nosuid,ro
$ cat /etc/auto.apps
apps server-hostname:/apps
$ ls -ld /apps
lrwxrwxrwx 1 root root 14 2009-08-13 18:11 /apps → /mnt/auto/apps


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.


mikewillis

mikewillis’s Profile: http://forums.novell.com/member.php?userid=7510
View this thread: http://forums.novell.com/showthread.php?t=446838

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.


dpartrid

dpartrid’s Profile: http://forums.novell.com/member.php?userid=18260
View this thread: http://forums.novell.com/showthread.php?t=446838

dpartrid;2149224 Wrote:[color=blue]

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!


mikewillis

mikewillis’s Profile: http://forums.novell.com/member.php?userid=7510
View this thread: http://forums.novell.com/showthread.php?t=446838