User Tools

Site Tools


docs:guide-user:services:nas:nfs.client

NFS client

Core Packages

Package: nfs-utils Depends: libwrap, libblkid, libuuid, libevent Description: Updated mount.nfs command - allows mounting nfs4 volumes Package: kmod-fs-nfs Depends: kernel (VERSION), kmod-fs-nfs-common Description: Kernel module for NFS support Package: kmod-fs-nfs-common Depends: kernel (VERSION) Description: Common NFS filesystem modules

Filesystem Support

For NFSv4 server → install kmod-fs-nfs-v4 For NFSv3 server → install kmod-fs-nfs-v3

Opkg Setup

opkg update
opkg install nfs-utils kmod-fs-nfs kmod-fs-nfs-v4 kmod-fs-nfs-v3

WARNING: The librpc is missing in some versions. You can safely use -force-depends if it happens to you Note that to use mount -t cifs, NFS mount support in busybox has to be enabled.

Configuration

mkdir /mnt/remote2
mount.nfs //192.168.2.254/router_main /mnt/remote2 [-rvVwfnh ] [-t version] [-o options]
mount -t nfs 192.168.1.101:/share /mnt/point -o nolock
# To connect using NFSv4
mount -t nfs4 192.168.1.101:/share /mnt/point -o nolock
# For Fedora 17+ servers, which are nfs4 out of the box...
mount -t nfs 192.168.255.124:/home/karlp/src src -o nfsvers=3 -o nolock

The nolock will disable NFS file locking. If you really need file locking, you must install the portmap package and start the portmap daemon before trying to mount an exported filesystem without the nolock option.

In some revisions mounting is not possible because default disabled in kernel: BUSYBOX_CONFIG_FEATURE_MOUNT_NFS [=n]

Read manpage of mount.nfs

Put it in /etc/fstab.

Troubleshooting

Append -v to your mount command to see detailed debugging info… i.e.;

mount -t nfs 192.168.1.101:/share /mnt/point -o nolock  -v

Throughput Issues

Since netfilter will track every connection, if you use MASQUERADING for example, you could disable con-tracking for data connections:

$IPT -t raw -A PREROUTING -i $IF_LAN -s $NET_LAN -p tcp --sport 32777:32780 -j CT --notrack #---------- don't track nfs
$IPT -t raw -A PREROUTING -i $IF_LAN -s $NET_LAN -p udp --sport 32777:32780 -j CT --notrack #---------- don't track nfs
$IPT -t raw -A OUTPUT -o $IF_LAN -d $NET_LAN -p tcp --dport 32777:32780 -j CT --notrack #---------- don't track nfs
$IPT -t raw -A OUTPUT -o $IF_LAN -d $NET_LAN -p udp --dport 32777:32780 -j CT --notrack #---------- don't track nfs

Note this is not the same as for the server, the source and destination ports differ. The INPUT is for when you read from the remote filesystem and the OUTPUT for when you write to it.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
docs/guide-user/services/nas/nfs.client.txt · Last modified: 2019/09/27 08:20 by someothertime