NFS
Network File System (NFS) (1984) is a distributed file system protocol that allow to share files and folders using a TCP network.
- Ports: Port 111 (TCP and UDP) and 2049 (TCP and UDP) for the NFS server.
Contents
Installation
apt install nfs-common
apt install nfs-kernel-server
systemctl status nfs-server.service
Linux commands
exportfs
(apt install nfs-kernel-server: nfsdcltrack, rpc.nfsd, rpc.mountd
)
Example output NFS share to everyone:
HOST#exportfs
/nfs <world>
Windows commands
Get-WindowsFeature -Name NFS*
Install-WindowsFeature -Name NFS-Client
mount 192.168.0.1:/FOLDER_NAME n:
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\192.168.0.251\FOLDER_NAME"
[1]Remove-PSDrive Z
New-PSDrive -Name K -PSProvider FileSystem -Root "\\ServerName\ShareName" -Persist -Scope Global
[2]New-PSDrive -Name K -PSProvider FileSystem -Root "\\ServerName\ShareName" -Persist -Credential $cre -Scope Global
See also: https://davidring.ie/2018/07/06/windows-2016-mount-an-nfs-share/
Configuration file: /etc/exports
Example:
/export 192.168.1.0/24(rw,fsid=0,insecure,no_subtree_check,async) /export/users 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async)
fsid=0
signals the NFS server that this export is the root.
Warning: /etc/exports
is affected by adding additional space characters, be mindful about format
NFSv4
NFSv4 no longer utilizes the MOUNT protocol.
Related terms
Activities
- Setup a NFS server in Ubuntu following: https://help.ubuntu.com/community/SettingUpNFSHowTo
- Install server:
apt-get install nfs-kernel-server
- Install client (optional):
apt-get install nfs-common
- Install server:
See also
- NFS:
nfs-common
,nfstat
,nfsiostat
,sar -n NFS
, Mount a remote nfs share,mount
,showmount
,exportfs
,rpcinfo
, List mounted NFS resources, RPC, AWS EFS - sanlock shared storage lock manager
- Storage protocols: CIFS, NFS, iSCSI, FCP, FCoE, SMB, NetBIOS, SCSI
- Amazon Elastic File System (EFS) and EBS
Advertising: