HOWTO : NFS June 04, 2016 05:53AM |
Registered: 10 years ago Posts: 1,037 |
apt-get update ; apt-get upgrade ; apt-get install autofs nfs-kernel-server nfs-common --install-recomends -f -y ; sync ; reboot ;
cp -a /etc/exports /etc/exports.backupThen open the /etc/exports file using the following command:
nano /etc/exportsEdit and comment out all existing lines by adding a “#” in front the line. Setup NFS share for each mounted drive/folder you want to make available to the client devices
# the following will allow both v3 and v4 clients to access the same files # Export media to allow access for v4 clients ONLY /media/Disk1 *(rw,async,insecure,no_root_squash,no_subtree_check,fsid=0,nohide) # Export media to allow access for v3 clients /media/Disk1/Data *(rw,sync,insecure,no_root_squash,no_subtree_check,nohide)rw – allows read/write if you want to be able to delete or rename file
exportfs -raAny time you make changes to /etc/exports restart your NFS server as root
service nfs-kernel-server restart
mount -t nfs -o vers=4 192.168.xxx.xxx:/ /home/”your user name”/nfs4The mount point directory /home/”your user name”/nfs4 must already exist and there should be no files or subdirectories in the /home/”your user name”/nfs4 directory.
192.168.xxx.xxx:/ /home/”your user name”/nfs4 nfs auto 0 0
mount -t nfs -o vers=3 192.168.xxx.xxx:/media/Disk1/Data /home/”your user name”/nfs3The mount point directory /home/”your user name”/nfs3 must already exist and there should be no files or subdirectories in the /home/”your user name”/nfs3 directory.
bootcmd_nfs=setenv nfs_server "192.168.0.224"; setenv nfs_path "/srv/nfs/hosts/tldDebian2"; setenv nfs_bootcmd "run nfs_set_bootargs; run nfs_boot"; setenv nfs_ipconfig "192.168.0.229:192.168.0.224:192.168.0.1:255.255.0.0:tldDebian2::off"; setenv nfs_set_bootargs "setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=$nfs_server:$nfs_path,v3 rootfstype=nfs rootwait ip=$nfs_ipconfig $mtdparts"; setenv nfs_load_uimage "nfs 0x800000 $nfs_server:$nfs_path/boot/uImage"; setenv nfs_load_uinitrd "nfs 0x1100000 $nfs_server:$nfs_path/boot/uInitrd"; setenv nfs_load_dtb "nfs 0x1c00000 $nfs_server:$nfs_path/boot/dts/kirkwood-pogo_e02.dtb"; setenv nfs_bootm "bootm 0x800000 0x1100000 0x1c00000"; setenv nfs_boot "run nfs_load_uimage; run nfs_load_uinitrd; run nfs_load_dtb; run nfs_bootm"; echo "Booting NFS root…"; run nfs_bootcmd
Re: HOWTO : NFS June 04, 2016 05:53AM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 04, 2016 06:12AM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 04, 2016 04:29PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: HOWTO : NFS June 04, 2016 05:08PM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 04, 2016 05:14PM |
Admin Registered: 13 years ago Posts: 18,997 |
/media/Disk1 xxx.xxx.0.0/24(rw,async,insecure,no_subtree_check)
/media/Disk1 xxx.xxx.0.0/24(rw,async,insecure, fsid=0,no_subtree_check)
bootcmd_nfs=setenv nfs_server "192.168.0.224"; setenv nfs_path "/srv/nfs/hosts/tldDebian2"; setenv nfs_bootcmd "run nfs_set_bootargs; run nfs_boot"; setenv nfs_ipconfig "192.168.0.229:192.168.0.224:192.168.0.1:255.255.0.0:tldDebian2::off"; setenv nfs_set_bootargs "setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=$nfs_server:$nfs_path,v3 rootfstype=nfs rootwait ip=$nfs_ipconfig $mtdparts"; setenv nfs_load_uimage "nfs 0x800000 $nfs_server:$nfs_path/boot/uImage"; setenv nfs_load_uinitrd "nfs 0x1100000 $nfs_server:$nfs_path/boot/uInitrd"; setenv nfs_load_dtb "nfs 0x1c00000 $nfs_server:$nfs_path/boot/dts/kirkwood-pogo_e02.dtb"; setenv nfs_bootm "bootm 0x800000 0x1100000 0x1c00000"; setenv nfs_boot "run nfs_load_uimage; run nfs_load_uinitrd; run nfs_load_dtb; run nfs_bootm"; echo "Booting NFS root…"; run nfs_bootcmd
Re: HOWTO : NFS June 04, 2016 05:51PM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 04, 2016 09:06PM |
Registered: 9 years ago Posts: 429 |
Re: HOWTO : NFS June 05, 2016 12:31AM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: HOWTO : NFS June 05, 2016 04:50PM |
Registered: 9 years ago Posts: 429 |
Re: HOWTO : NFS June 05, 2016 05:33PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: HOWTO : NFS June 06, 2016 02:55AM |
Registered: 9 years ago Posts: 73 |
> apt-get update ; apt-get upgrade ; apt-get install > autofs nfs-kernel-server nfs-common > --install-recomends -f -y ; sync ; reboot ; >>
> ---snip---> > gravelrash@4320 ~ $ nfsstat -c > Client rpc stats: > calls retrans authrefrsh > 167 0 167 > > Client nfs v4: > --snip---> > additional output ommitted as not relavent >
root@debian:/etc# nfsstat Server rpc stats: calls badcalls badclnt badauth xdrcall 0 0 0 0 0 Client rpc stats: calls retrans authrefrsh 0 0 0 root@debian:/etc#
nfsstat --version root@debian:/etc# nfsstat --version nfsstat: 1.2.8 root@debian:/etc#
Re: HOWTO : NFS June 06, 2016 03:54AM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 06, 2016 04:50AM |
Admin Registered: 13 years ago Posts: 18,997 |
/media/Disk1 xxx.xxx.0.0/24(rw,async,insecure,no_subtree_check)is mounted as V4 by default, if the client does not specify a V3 mount.
Re: HOWTO : NFS June 06, 2016 06:14AM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 06, 2016 01:15PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: HOWTO : NFS June 06, 2016 04:23PM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 07, 2016 06:02AM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 07, 2016 01:29PM |
Registered: 10 years ago Posts: 169 |
Re: HOWTO : NFS June 07, 2016 04:02PM |
Admin Registered: 13 years ago Posts: 18,997 |
no_root_squash,no_subtree_check
Re: HOWTO : NFS June 07, 2016 04:06PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: HOWTO : NFS June 07, 2016 04:44PM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 08, 2016 12:48PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: HOWTO : NFS June 08, 2016 06:30PM |
Registered: 9 years ago Posts: 73 |
Re: HOWTO : NFS June 09, 2016 04:29AM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 09, 2016 04:40AM |
Registered: 10 years ago Posts: 169 |
Re: HOWTO : NFS June 09, 2016 06:15AM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 09, 2016 01:17PM |
Registered: 9 years ago Posts: 73 |
Re: HOWTO : NFS June 09, 2016 04:02PM |
Registered: 10 years ago Posts: 1,037 |
Re: HOWTO : NFS June 22, 2016 01:58PM |
Registered: 9 years ago Posts: 73 |