Editing NFS
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | [[wikipedia:Network_File_System|Network File System]] (NFS | + | [[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. |
− | |||
− | |||
− | |||
− | |||
== Installation == | == Installation == | ||
− | + | apt install [[nfs-common]] | |
− | + | apt install nfs-kernel-server | |
− | |||
− | |||
− | == | + | == Commands == |
− | * <code>[[exportfs]]</code> (<code>apt install | + | * <code>[[exportfs]]</code> (<code>apt install nfs-kernel-server</code>) |
Example output NFS share to everyone: | Example output NFS share to everyone: | ||
<code> | <code> | ||
Line 18: | Line 12: | ||
/nfs <world> | /nfs <world> | ||
</code> | </code> | ||
− | |||
− | |||
− | + | showmount | |
− | + | clnt_create: RPC: Program not registered | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | showmount -e | |
+ | Restart service: <code>systemctl start nfs-server</code> | ||
− | == Configuration | + | == Configuration files == |
− | <code> | + | <code>/etc/exports</code> <ref>https://linux.die.net/man/5/exports</ref> |
Example: | Example: | ||
Line 41: | Line 28: | ||
:<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: | + | Warning: /etc/exports is affected by adding additional space characters, be mindful about format |
== NFSv4 == | == NFSv4 == | ||
− | + | NFSv4 no longer utilizes the MOUNT protocol. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Activities == | == Activities == | ||
Line 61: | Line 38: | ||
::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: |
− | + | ::<code>[[mount -t nfs]] -o proto=tcp,port=2049 REMOTE_IP_SERVER:/REMOTE_SHARE_DIR /YOUR/LOCAL_DIR/</code> | |
== See also == | == See also == | ||
− | |||
* [[Red Hat Virtualization|sanlock]] shared storage lock manager | * [[Red Hat Virtualization|sanlock]] shared storage lock manager | ||
* {{storage protocols}} | * {{storage protocols}} | ||
− | * [[ | + | * [[EFS]] and [[EBS]] |
[[Category:Linux]] | [[Category:Linux]] |
Advertising: