Difference between revisions of "NFS"
Jump to navigation
Jump to search
↑ https://linux.die.net/man/5/exports
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 25: | Line 25: | ||
/export 192.168.1.0/24(rw,fsid=0,insecure,no_subtree_check,async) | /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) | /export/users 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async) | ||
+ | |||
+ | <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: /etc/exports is affected by adding additional space characters, be mindful about format |
Revision as of 07:08, 3 March 2020
Network File System (NFS) is a distributed file system protocol that allow to share files and folders using a TCP network.
Installation
apt install nfs-common apt install nfs-kernel-server
Commands
exportfs
(apt install nfs-kernel-server
)
Example output NFS share to everyone:
HOST#exportfs
/nfs <world>
showmount clnt_create: RPC: Program not registered
showmount -e
Restart service: systemctl start nfs-server
Configuration files
/etc/exports
[1]
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.
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:
- Mount a remote nfs share:
mount -t nfs -o proto=tcp,port=2049 REMOTE_IP_SERVER:/REMOTE_SHARE_DIR /YOUR/LOCAL_DIR/
See also
- sanlock shared storage lock manager
- Storage protocols: CIFS, NFS, iSCSI, FCP, FCoE, SMB, NetBIOS, SCSI
- EFS and EBS
Advertising: