Hi,
What is the magic juju that I have to put in /etc/sysconfig/autofs to get autofs to default to using NFSv4, rather than NFSv3, for mounting file systems?
I don't want to place these flags into the automount maps themselves because we have a varied network with Sun, CentOS, RedHat and Macintosh systems, and the flags that have to get added to automount maps (which we distribute centrally through LDAP) are different for each OS. So, I'd prefer to specify the local machine options in /etc/sysconfig/autofs rather than in the global automount map.
Thanks!
On 12/22/2012 12:33 AM, Tim Gustafson wrote:
Hi,
What is the magic juju that I have to put in /etc/sysconfig/autofs to get autofs to default to using NFSv4, rather than NFSv3, for mounting file systems?
I don't want to place these flags into the automount maps themselves because we have a varied network with Sun, CentOS, RedHat and Macintosh systems, and the flags that have to get added to automount maps (which we distribute centrally through LDAP) are different for each OS. So, I'd prefer to specify the local machine options in /etc/sysconfig/autofs rather than in the global automount map.
Thanks!
These are my unrefined notes on the topic:
NFS4 on CentOS 5.x Server
• create /nfs4exports with subfolder: extra. • in /etc/fstab put: /extra /nfs4exports/extra bind bind 0 0
• In /etc/exports put: /nfs4exports xxx.yyy.zzz.qqq/255.255.255.248(rw,fsid=0,sync,no_root_squash,no_subtree_check) /nfs4exports/extra xxx.yyy.zzz.qqq/255.255.255.248(rw,no_subtree_check,nohide,sync,no_root_squash)
• In /etc/sysconfig/nfs put: LOCKD_TCPPORT=32803 # UDP port rpc.lockd should listen on. LOCKD_UDPPORT=32769 RPCNFSDARGS="-N 2 -N 3" MOUNTD_PORT=892 STATD_PORT=662 # Outgoing port statd should used. The default is port # is random STATD_OUTGOING_PORT=2020 # Specify callout program
Nikada ne skidati root squashing, spusta roota na nfsnobody nivo. Ima i all_squash opcija.
/etc/idmapd.conf: [General]
Verbosity = 0 Pipefs-Directory = /var/lib/nfs/rpc_pipefs Domain = yourdomain.com
[Mapping]
Nobody-User = usernameiwant Nobody-Group = usernameiwant
[Translation] Method = nsswitch
Restart daemons and check with showmount -e server IP
Client:
/etc/auto.master: /autofsmounts/servername /etc/auto.servername --timeout=10
/etc/auto.servername: extra -fstype=nfs4,rw,proto=tcp server.domain.com:/extra
/etc/idmapd.conf: [General]
Verbosity = 0 Pipefs-Directory = /var/lib/nfs/rpc_pipefs Domain = yourdomain.com
[Mapping]
Nobody-User = usernameiwant Nobody-Group = usernameiwant
[Translation] Method = nsswitch
Create /autofsmounts/servername
Restart autofs daemon
In one terminal do "cd /autofsmounts/servername/extra" so that folder is create/mounted by autofs
Create /servername and in it create softlinks for: /autofsmounts/servername/extra
And that is it.
Some commands:
test : showmount -e <ipaddress>
mkdir /autofsmounts mkdir /autofsmounts/servername
echo 'extra -fstype=nfs4,rw,proto=tcp server.domain.com:/extra' > /etc/auto.servername
A first step would be to see that /etc/idmapd.conf contains a valid setting for the NFSv4 domain name.
Bryan
On Fri, Dec 21, 2012 at 03:33:59PM -0800, Tim Gustafson wrote:
Hi,
What is the magic juju that I have to put in /etc/sysconfig/autofs to get autofs to default to using NFSv4, rather than NFSv3, for mounting file systems?
I don't want to place these flags into the automount maps themselves because we have a varied network with Sun, CentOS, RedHat and Macintosh systems, and the flags that have to get added to automount maps (which we distribute centrally through LDAP) are different for each OS. So, I'd prefer to specify the local machine options in /etc/sysconfig/autofs rather than in the global automount map.
Thanks!
--
Tim Gustafson tjg@soe.ucsc.edu 831-459-5354 Baskin Engineering, Room 313A _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos