Difference between revisions of "NFS"
Jump to navigation
Jump to search
↑ https://www.server-world.info/en/note?os=Windows_Server_2019&p=nfs&f=4
↑ https://community.spiceworks.com/topic/2219152-powershell-mapping-network-drive
↑ https://linux.die.net/man/5/exports
Tags: Mobile web edit, Mobile edit |
|||
(44 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[wikipedia:Network_File_System|Network File System]] (NFS) is a distributed file system protocol that allow to share files and folders using a TCP network. | + | [[wikipedia:Network_File_System|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. | ||
+ | |||
== Installation == | == Installation == | ||
− | + | * <code>[[apt install]] [[nfs-common]]</code> | |
− | + | * <code>apt install nfs-kernel-server</code> | |
+ | |||
+ | * <code>[[systemctl status nfs-server.service]]</code> | ||
− | == | + | == Linux commands == |
− | * <code>[[exportfs]]</code> (<code>apt install nfs-kernel-server</code>) | + | * <code>[[exportfs]]</code> (<code>apt install [[nfs-kernel-server]]: [[nfsdcltrack]], [[rpc.nfsd]], [[rpc.mountd]]</code>) |
Example output NFS share to everyone: | Example output NFS share to everyone: | ||
<code> | <code> | ||
Line 12: | Line 18: | ||
/nfs <world> | /nfs <world> | ||
</code> | </code> | ||
+ | * <code>[[showmount]]</code> | ||
+ | * <code>[[mount -t nfs]]</code> | ||
− | + | == Windows commands == | |
− | + | * <code>[[Get-WindowsFeature]] -Name NFS*</code> | |
+ | * <code>[[Install-WindowsFeature]] -Name NFS-Client</code> | ||
+ | * <code>[[mount]] 192.168.0.1:/FOLDER_NAME n: </code> | ||
+ | * <code>[[New-PSDrive]] -Name Z -PSProvider FileSystem -Root "\\192.168.0.251\FOLDER_NAME"</code><ref>https://www.server-world.info/en/note?os=Windows_Server_2019&p=nfs&f=4</ref> | ||
+ | ** <code>Remove-PSDrive Z </code> | ||
+ | * <code>New-PSDrive -Name K -PSProvider FileSystem -Root "\\ServerName\ShareName" -Persist -Scope Global</code><ref>https://community.spiceworks.com/topic/2219152-powershell-mapping-network-drive</ref> | ||
+ | * <code>New-PSDrive -Name K -PSProvider FileSystem -Root "\\ServerName\ShareName" -Persist -Credential $cre -Scope Global</code> | ||
− | + | See also: https://davidring.ie/2018/07/06/windows-2016-mount-an-nfs-share/ | |
− | |||
− | == Configuration | + | == Configuration file: /etc/exports == |
− | <code>/etc/exports</code> <ref>https://linux.die.net/man/5/exports</ref> | + | <code>[[/etc/exports]]</code> <ref>https://linux.die.net/man/5/exports</ref> |
Example: | Example: | ||
Line 28: | Line 41: | ||
:<code>fsid=0</code> signals the NFS server that this export is the root. | :<code>fsid=0</code> signals the NFS server that this export is the root. | ||
− | Warning: /etc/exports is affected by adding additional space characters, be mindful about format | + | Warning: <code>/etc/exports</code> is affected by adding additional space characters, be mindful about format |
== NFSv4 == | == NFSv4 == | ||
− | NFSv4 no longer utilizes the MOUNT protocol. | + | [[NFSv4]] no longer utilizes the MOUNT protocol. |
+ | |||
+ | == Linux Kernel == | ||
+ | * [[5.12]] [[Eager]] NFS writes | ||
+ | |||
+ | == Related terms == | ||
+ | * [[Round Time Trip]] | ||
+ | * [[NetBIOS]] | ||
+ | * <code>[[systemctl status rpc-statd]]</code> | ||
+ | * [[Nutanix Distributed Filesystem (NDFS)]] | ||
+ | * [[Filestore CSI driver]] | ||
== Activities == | == Activities == | ||
Line 38: | Line 61: | ||
::Install client (optional): <code> apt-get install nfs-common</code> | ::Install client (optional): <code> apt-get install nfs-common</code> | ||
− | * Mount a remote nfs share | + | * [[Mount a remote nfs share]]: <code>[[mount -t nfs]]</code> |
− | + | * [[List mounted NFS resources]] | |
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
+ | * {{NFS}} | ||
* [[Red Hat Virtualization|sanlock]] shared storage lock manager | * [[Red Hat Virtualization|sanlock]] shared storage lock manager | ||
* {{storage protocols}} | * {{storage protocols}} | ||
− | * [[ | + | * [[Amazon Elastic File System]] (EFS) and [[EBS]] |
[[Category:Linux]] | [[Category:Linux]] |
Latest revision as of 06:39, 25 May 2023
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[edit]
apt install nfs-common
apt install nfs-kernel-server
Linux commands[edit]
exportfs
(apt install nfs-kernel-server: nfsdcltrack, rpc.nfsd, rpc.mountd
)
Example output NFS share to everyone:
HOST#exportfs
/nfs <world>
Windows commands[edit]
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[edit]
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[edit]
NFSv4 no longer utilizes the MOUNT protocol.
Linux Kernel[edit]
Related terms[edit]
- Round Time Trip
- NetBIOS
systemctl status rpc-statd
- Nutanix Distributed Filesystem (NDFS)
- Filestore CSI driver
Activities[edit]
- 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[edit]
- 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: