1

I have a NFS server on which I export the following:

/exports/netapps *.*.*.*/16(ro,async,root_squash,no_subtree_check)

This folder has a bunch of sub folders which should all be visible on the clients.

I want to use autofs to mount this on the clients on the following path:

/opt/netapps/

This I can do, but when I do so the folder /opt becomes unusable, because automounter is doing something to it. I can't create new subfolder for /opt or do anything actually... I get 'Permission denied' on everything... as root!

My files:

cat /etc/auto.master.d/opt.autofs 
/opt file:/etc/auto.opt --timeout 10

cat /etc/auto.opt 
netapps     -fstype=nfs4    lwp16.service.rug.nl:/netapps

What have I done wrong? How do I solve this? Does anyone have an idea please?

2 Answers 2

0

Your current opt.autofs file basically tells autofs to take control of the /opt directory, so that it can build arbitrary mountpoints there for automounting. I would recommend that you instead create and use a directory where you can allow autofs to be in full control -- something like /opt/auto (so you would end up using /opt/auto/netapps), or perhaps /remote (so you would end up using /remote/netapps).

For the former choice, you could simply change your /opt.autofs file:

/opt/auto file:/etc/auto.opt --timeout 10
0

The problem is with your map file (auto.opt) having incorrect export location (/exports/netapps)

nfs server:

cat /etc/exports
/exports/netapps *.*.*.*/16(ro,async,root_squash,no_subtree_check)

nfs client

cat /etc/auto.master
....omitted lines.....
/misc  /etc/auto.misc
/opt   /etc/auto.opt --timeout 10
....omitted lines.....

cat /etc/auto.opt 
netapps     -ro,nfsvers=3    lwp16.service.rug.nl:/exports/netapps

service nfs restart
service autofs stop
service autofs start

Also you may experience name resolution issues due to dns may cause this issue. In that case try ip address in your map file (ip-addr-nfs-server:/exports/netapps).

By default, nfs is mounted with version4 if none specified as mount options.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .