Difference between revisions of "Mount a remote nfs share"

From wikieduonline
Jump to navigation Jump to search
Line 4: Line 4:
 
  [[mount -t nfs]] -o proto=tcp,port=2049 REMOTE_IP_SERVER:/REMOTE_SHARE_DIR /YOUR/LOCAL_DIR/
 
  [[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 -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
 
  mount: /mnt: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program
 
  (Install client: <code> apt-get install [[nfs-common]]</code>)
 
  (Install client: <code> apt-get install [[nfs-common]]</code>)

Revision as of 06:39, 25 May 2023

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

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

Related terms

See also

Advertising: