Mount a remote nfs share

From wikieduonline
(Redirected from Mount -t nfs)
Jump to navigation Jump to search
Mounting using hostname instead of IP address can solve some of errors reported in this page


mount -t nfs -o proto=tcp,port=2049 REMOTE_IP_SERVER:/REMOTE_SHARE_DIR /YOUR/LOCAL_DIR/

mount -t nfs4 10.10.10.2:/ ./
mount: /mnt: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program
(Install client:  apt-get install nfs-common)
mount.nfs4: requested NFS version or transport protocol is not supported
Solution: Try to mount it using hostname instead of IP
mount.nfs: portmap query retrying: RPC: Program not registered
mount -v -t nfs4 10.10.10.2:/ ./
mount.nfs4: timeout set for Wed Apr 22 09:55:59 2020
mount.nfs4: trying text-based options 'vers=4.2,addr=0.10.10.22:,clientaddr=10.10.10.2:'
mount.nfs4: mount(2): No route to host


mount -v -t nfs -o vers=3,timeo=600,noresvport,nolock  10.10.10.2:/ /local/path

Logs[edit]

Apr 22 09:28:34 your_hostname kernel: Key type id_legacy registered
Apr 22 09:28:34 your_hostname kernel: Key type id_resolver registered
Apr 22 09:28:34 your_hostname kernel: NFS: Registering the id_resolver key type
Apr 22 09:28:34 your_hostname kernel: FS-Cache: Netfs 'nfs' registered for caching
Apr 22 09:28:34 your_hostname kernel: RPC: Registered tcp NFSv4.1 backchannel transport module.
Apr 22 09:28:34 your_hostname kernel: RPC: Registered tcp transport module.
Apr 22 09:28:34 your_hostname kernel: RPC: Registered udp transport module.
Apr 22 09:28:34 your_hostname kernel: RPC: Registered named UNIX socket transport module.
Apr 22 09:28:34 your_hostname kernel: FS-Cache: Loaded

Activities[edit]

Don't use the following mount options:

  • noac, actimeo=0, acregmax=0, acdirmax=0 – These options disable the attribute cache, which has a very large performance impact.
  • lookupcache=pos, lookupcache=none – These options disable the file name lookup cache, which has a very large impact on performance.
  • fsc – This option enables local file caching, but does not change NFS cache coherency, and does not reduce latencies.

Related terms[edit]

See also[edit]

Advertising: