Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
Setting up a NFS network
Last tested on Debian Wheezy 7.8
Useful links
NFS on the Debian wiki
SettingUpNFSHowTo
Setting up NFS on an Ubuntu Linux Server
HOWTO: NFS Server/Client
Share Files Between Linux Computers Using NFS
linux file sharing
18.7. The /etc/exports Configuration File
Difference Between NFS Soft And Hard Mount With Example
what is the difference betweeen NFS hard mount and softmount
Server side
Install with aptitude
nfs-kernel-server nfs-common portmap
on our system portmap is a virtual package. It is evaluated as rpcbind
If portmap does not install make sure
rpcbind
is installed
Do as root
dpkg-reconfigure rpcbind
This will stop end restart rpcbind
Create directory to test if it works
mkdir /home/user/testNFS
Set the permissions to 777. Do
chmod 777 /home/user/testNFS
Add to
/etc/exports
this line
/home/user/testNFS IPnumberoftheClientPC(sync,no_subtree_check) *(rw,no_root_sqash,async,no_subtree_check)
Example
/home/user/testNFS 192.168.111.111/24(sync,no_subtree_check) *(rw,no_root_squash,async,no_subtree_check)
Edit
/etc/hosts.deny
add
rpcbind mountd nfsd statd lockd rquotad : ALL
Edit
/etc/hosts.allow
add
rpcbind mountd nfsd statd lockd rquotad : list of IP addresses
Do
exportfs -a
Do
/etc/init.d/nfs-common restart
Restart the NFS server
/etc/init.d/nfs-kernel-server restart
Client side
Install with aptitude
nfs-common portmap
on our system portmap is a virtual package. It is evaluated as rpcbind.
If portmap can not be installed make sure
rpcbind
is installed
As root create directory to test to mount the shared directory to
mkdir /mnt/testNFSClient
Change the ownership /mnt/testNFSClient
chown user:user
Do as root
dpkg-reconfigure rpcbind
This will stop end restart rpcbind
Mount the exported map on the server
Replace IP.of.nfs-server with the IP address of the server
mount IP.of.nfs-server:/home/user/testNFS /mnt/testNFSClient mount -t nfs -o rw,hard,intr,proto=tcp,port=2049 IP.of.nfs-server:/home/user/testNFS /mnt/tesfNFSClient
Example
mount -t nfs -o proto=tcp,port=2049 192.168.111.112:/home/user/testNFS /mnt/testNFSClient
Error messages
mount.nfs: Protocol not supported
Check if the path to the server or client directory exists
mount.nfs: Stale file handle
See: NFS Stale File Handle error and solution After this the following error still can occur
ls: cannot access /mnt/ClientDirectory: Stale file handle
To be solved
Obsolete ?
Edit
/etc/hosts.deny
add
rpcbind mountd nfsd statd lockd rquotad : ALL
or
rpcbind:ALL portmap:ALL lockd:ALL mountd:ALL rquotad:ALL statd:ALL
Edit
/etc/hosts.allow
add
rpcbind mountd nfsd statd lockd rquotad : list of IP addresses
or
service: hostIP , anotherhostIP portmap: hostIP , anotherhostIP lockd: hostIP , anotherhostIP mountd: hostIP , anotherhostIP rquotad: hostIP , anotherhostIP statd: hostIP , anotherhostIP
Start the services by rebooting
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.