# Autofs

**URL:** <https://forums.suse.com/t/autofs/21837>\
**Category:** SLES Configure-Administer\
**Created:** [October 14, 2011, 2:26pm UTC](https://forums.suse.com/t/autofs/21837 "2011-10-14T14:26:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [October 14, 2011, 2:26pm UTC](https://forums.suse.com/t/autofs/21837/1 "2011-10-14T14:26:02Z")

</div>

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](http://forums.novell.com/member.php?userid=113607)  
View this thread: [http://forums.novell.com/showthread.php?t=446838](http://forums.novell.com/showthread.php?t=446838)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 18, 2011, 7:34pm UTC](https://forums.suse.com/t/autofs/21837/2 "2011-10-18T19:34:17Z")

</div>

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](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](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](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/](http://forums.novell.com/)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 26, 2011, 3:36pm UTC](https://forums.suse.com/t/autofs/21837/3 "2011-10-26T15:36:02Z")

</div>

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](http://forums.novell.com/member.php?userid=25342)  
View this thread: [http://forums.novell.com/showthread.php?t=446838](http://forums.novell.com/showthread.php?t=446838)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 26, 2011, 4:36pm UTC](https://forums.suse.com/t/autofs/21837/4 "2011-10-26T16:36:02Z")

</div>

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/](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](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](http://forums.novell.com/member.php?userid=7510)  
View this thread: [http://forums.novell.com/showthread.php?t=446838](http://forums.novell.com/showthread.php?t=446838)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 26, 2011, 10:36pm UTC](https://forums.suse.com/t/autofs/21837/5 "2011-10-26T22:36:01Z")

</div>

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](http://auto.net) file. The [auto.net](http://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](http://forums.novell.com/member.php?userid=18260)  
View this thread: [http://forums.novell.com/showthread.php?t=446838](http://forums.novell.com/showthread.php?t=446838)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 27, 2011, 12:26am UTC](https://forums.suse.com/t/autofs/21837/6 "2011-10-27T00:26:02Z")

</div>

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](http://forums.novell.com/member.php?userid=7510)  
View this thread: [http://forums.novell.com/showthread.php?t=446838](http://forums.novell.com/showthread.php?t=446838)
