with: /home/boris is the folder to be shared rw for read and write access of the client sync ?? all_squash ?? 192.168.1.0/24 is a range of client computer IP address of your local network 1001 is the user and group ID. To find it $ id boris
manage hosts, 1st allow nobody in /etc/hosts.deny add
portmap:ALL
nfsd:ALL
mountd:ALL
Then allow your client computer in /etc/hosts.allow add
boris -fstype=nfs,rw,intr,uid=1001,guid=1001 192.168.1.1:/home/boris
with: 192.168.1.1 is the address of server computer /home/boris is the folder shared on server computer. 1001 is the user and group ID. To find it $ id boris rw for read and write access
set the firewall UFW
$ sudo ufw enable
$ sudo ufw default deny incoming
$ sudo ufw default deny outgoing
$ sudo ufw allow to 192.168.1.1
$ sudo ufw allow out to 192.168.1.1
with 192.168.1.1 is the address of the server computer
Here's what I did as a work around in case anyone else runs into this problem and comes looking for the solution here:
Created a script (mountall.sh) in /etc/init.d/:
#!/bin/bash
mount -r NFSSERVER-priv:/vol/vol1_isp/eshowcase/sites /var/www
mount NFSSERVER-priv:/vol/vol1_isp/vusers /var/users
Make the system aware of the new script:
update-rc.d mountall.sh defaults
The option “defaults” puts a link to start mountall.sh in run levels 2, 3, 4 and 5. (and puts a link to stop mountall.sh into 0, 1 and 6.)
Chmod the file to be executable
chmod +x mountall.sh
Now when you init 6 you should have your mount points. Also a good idea to make a "comment" in your fstab so people know where everything is actually being mounted from as that will be the first place they'll look.
It turns out the problem root cause is the firmware bug of Ethernet Switch I am using (NetGEAR GS116Ev2). After updating the firmware to 2.0.1.17 from 2.0.0.23, the problem is gone.
Best Answer
Lets say that «boris» is my logon such as
/home/boris
is my home folder.1. set the «server» computer:
install nfs-kernel-server and nfs-common
in
/etc/exports
, define the folder to be shared by adding this:with:
/home/boris
is the folder to be sharedrw
for read and write access of the clientsync
??all_squash
??192.168.1.0/24
is a range of client computer IP address of your local network1001
is the user and group ID. To find it$ id boris
manage hosts, 1st allow nobody in
/etc/hosts.deny
addThen allow your client computer in
/etc/hosts.allow
addwith
192.168.1.0/24
is a range of client computer IP address of your local networkset the firewall UFW
with
192.168.1.0/24
is a range of client computer IP address of your local networkstart the server
or after a modification of /etc/exports
2. set the «client» computer:
install nfs-common and autofs
create the folder used to mount the connection with the server
set autofs to automatically mount this folder,
in
/etc/auto.master
add this line:in
/etc/auto.nfs
add this linewith:
192.168.1.1
is the address of server computer/home/boris
is the folder shared on server computer.1001
is the user and group ID. To find it$ id boris
rw
for read and write accessset the firewall UFW
with
192.168.1.1
is the address of the server computerand reboot your client computer.