ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • How to share directories to the network(NFS)
    linux 2023. 2. 22. 10:13

    NFS (Network File System) is a distributed file system protocol that allows users to access files over a network as if they were on their local machines. It allows file systems to be shared across different servers and clients over a network.

    Here is an explanation table for some common NFS options:

    OptionExplanation

    -o Specifies the options to use when mounting the NFS share.
    nfsvers Specifies the version of the NFS protocol to use.
    rw Allows read and write access to the NFS share.
    ro Allows read-only access to the NFS share.
    sync Ensures that changes made to the NFS share are written to disk immediately.
    async Delays writing changes to the NFS share until the server can handle them more efficiently.
    noexec Prevents execution of any binaries on the NFS share.
    noatime Prevents the NFS share from updating access times on files to improve performance.
    actimeo Specifies the cache timeout for the NFS share.

    Here are some examples of using NFS:

    • To mount an NFS share from the server with the IP address 192.168.0.100 to the local mount point /mnt/nfs, use the following command:This command mounts the NFS share with read and write access, using NFS version 4.
    sudo mount -o rw,vers=4 192.168.0.100:/nfs_share /mnt/nfs
    • To unmount an NFS share from the local mount point /mnt/nfs, use the following command:This command unmounts the NFS share from the local mount point.
     
    sudo umount /mnt/nfs
    • To automatically mount an NFS share at boot time, add an entry to the /etc/fstab file with the following format:
    <NFS server IP address>:<NFS share> <local mount point> nfs <options> 0 0

    For example:

    192.168.0.100:/nfs_share /mnt/nfs nfs rw,vers=4 0 0

    This entry mounts the NFS share from the server with read and write access, using NFS version 4, at the local mount point /mnt/nfs at boot time.

     

    'linux' 카테고리의 다른 글

    SAMBA vulnerability  (0) 2023.02.22
    What is SAMBA?  (0) 2023.02.22
    What is mount in Linux?  (0) 2023.02.22
    Why FTP security?  (0) 2023.02.22
    What is FTP?  (0) 2023.02.22
Designed by Tistory.