Code: |
File systems ---> |
Code: |
Network File Systems ---> |
Code: |
<*> NFS file system support
[*] Provide NFSv3 client support [ ] Provide client support for the NFSv3 ACL protocol extension [*] Provide NFSv4 client support (EXPERIMENTAL) [*] Allow direct I/O on NFS files (EXPERIMENTAL) <*> NFS server support [*] Provide NFSv3 server support [ ] Provide server support for the NFSv3 ACL protocol extension [*] Provide NFSv4 server support (EXPERIMENTAL) --- Secure RPC: Kerberos V mechanism (EXPERIMENTAL) |
Code: |
<*> NFS file system support
[*] Provide NFSv3 client support [ ] Provide client support for the NFSv3 ACL protocol extension [*] Provide NFSv4 client support (EXPERIMENTAL) [*] Allow direct I/O on NFS files (EXPERIMENTAL) --- Secure RPC: Kerberos V mechanism (EXPERIMENTAL) |
Quote: |
/home
/usr/portage/distfiles /usr/local/portage (en möjlig $PORTDIR_OVERLAY) |
Code: |
## BIND mounting for the NFS4 filesystem
/home /nfs/home none bind 0 0 /usr/portage/distfiles /nfs/distfiles none bind 0 0 /usr/local/portage /nfs/portage none bind 0 0 |
Code: |
/nfs *(rw,insecure,sync,wdelay,no_subtree_check,no_root_squash,fsid=0)
/nfs/distfiles *(rw,insecure,sync,wdelay,no_subtree_check,nohide,no_root_squash) /nfs/portage *(rw,insecure,sync,wdelay,no_subtree_check,nohide,no_root_squash) |
Code: |
/nfs 192.168.0.0/24(...) |
Code: |
/nfs 192.168.0.1(...) 192.168.0.2(...) |
Code: |
#
# hosts.deny This file describes the names of the hosts which are # *not* allowed to use the local INET services, as decided # by the '/usr/sbin/tcpd' server. # # The portmap line is redundant, but it is left to remind you that # the new secure portmap uses hosts.deny and hosts.allow. In particular # you should know that NFS uses portmap! portmap:ALL lockd:ALL mountd:ALL rquoted:ALL statd:ALL |
Code: |
#
# hosts.allow This file describes the names of the hosts which are # allowed to use the local INET services, as decided # by the '/usr/sbin/tcpd' server. # portmap: 192.168.0.1, 192.168.0.2 lockd: 192.168.0.1, 192.168.0.2 mountd: 192.168.0.1, 192.168.0.2 rquotad: 192.168.0.1, 192.168.0.2 statd: 192.168.0.1, 192.168.0.2 |
Code: |
[General]
Verbosity = 0 Pipefs-Directory = /var/lib/nfs/rpc_pipefs Domain = example.com [Mapping] Nobody-User = nfsnobody Nobody-Group = nfsnobody |
Code: |
[Translation]
Method = nsswitch |
Code: |
Export list for nfsserver:
/nfs * /nfs/home * /nfs/portage * /nfs/distfiles * |
Code: |
nfsserver:/home /home nfs4 auto,rw,nodev,sync,_netdev,retry=10,rsize=32768,wsize=32768,hard,intr 0 0
nfsserver:/portage /usr/local/portage nfs4 auto,rw,nodev,sync,_netdev,retry=10,rsize=32768,wsize=32768,hard,intr 0 0 nfsserver:/distfiles /usr/portage/distfiles nfs4 auto,rw,nodev,sync,_netdev,retry=10,rsize=32768,wsize=32768,hard,intr 0 0 |
Code: |
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-ppc/net-fs/nfs-utils/files/nfsmount,v 1.6.1 2005/11/11 08:21:24 eradicator Exp $ depend() { need net portmap use ypbind } start_statd() { # Don't start rpc.statd if already started by init.d/nfs killall -0 rpc.statd &>/dev/null && return 0 ebegin "Starting NFS statd" start-stop-daemon --start --quiet --exec /sbin/rpc.statd 1>&2 eend $? "Error starting NFS statd" } start_idmapd() { ebegin "Start NFS idmap" start-stop-daemon --start --quiet --exec /usr/sbin/rpc.idmapd 1>&2 eend $? "Error starting NFS idmap" } stop_statd() { # Don't stop rpc.statd if it's in use by init.d/nfs killall -0 nfsd &>/dev/null && return 0 # Make sure it's actually running killall -0 rpc.statd &>/dev/null || return 0 # Okay, all tests passed, stop rpc.statd ebegin "Stopping NFS statd" start-stop-daemon --stop --quiet --exec /sbin/rpc.statd 1>&2 eend $? "Error stopping NFS statd" } stop_idmapd() { # Make sure it's actually running killall -0 rpc.idmapd &>/dev/null || return 0 # Okay, all tests passed, stop rpc.statd ebegin "Stopping NFS idmap" start-stop-daemon --stop --quiet --exec /usr/sbin/rpc.idmapd 1>&2 eend $? "Error stopping NFS idmap" } start() { start_statd ebegin "Mounting NFS filesystems" mount -a -t nfs eend $? "Error mounting NFS filesystems" start_idmapd } stop() { stop_idmapd ebegin "Unmounting NFS filesystems" umount -a -t nfs eend $? "Error unmounting NFS filesystems" stop_statd } restart() { svc_stop svc_start } |