NFS volume mount (Linux)
    • PDF

    NFS volume mount (Linux)

    • PDF

    Article Summary

    Available in Classic.

    You can mount the NFS protocol-based NAS volume that was created in NAVER Cloud Platform on the Linux server and use it.
    The following describes the procedure of mounting the NAS volume on the Linux server.

    1.Accessing the server
    2.Installing the NFS-related package
    3.Start NFS-related daemon
    4.Execute mounting
    5.Mount information retention settings (fstab settings)

    1. Access the server

    Before accessing the server, check server access preparations by referring to Prepare for server access. Once you complete the preparations for accessing the server, access the Linux server using the terminal program.

    Note
    • This guide explains how to access the server using PuTTY client software.
    • How to access the server may differ depending on the type and version of terminal connection software in use. For more information on the usage, refer to the guide provided with software.
    1. Run the PuTTY.
    2. Enter or select the following information and click the [Open] button.
      • Host Name (or IP address): enter the public IP of the server or the fort forwarding IP for server connection (refer to the public IP and port forwarding information items in Server details).
      • Port: SSH access port (default set value: 22) or the external port set for port forwarding(refer to Set port forwarding).
      • Connection type: SSH, Telnet optional (default set value)
    3. When the PuTTY Security Alert pop-up window appears, click the [Accept] button.
    4. When the log-in screen is displayed, enter the account name (root) and password that were checked in the Get Admin password menu in the server (See Get Admin password).

    The following describes how to install the NFS-related package.

    Note

    Use the commands suitable for the OS type and version of the server. The installation commands differ depending on the OS type and version.

    • CentOS 6.x and above: Download nfs-utils package

      yum install nfs-utils
      
    • Ubuntu server: Download nfs-common package

      apt-get install nfs-common
      

    The following describes how to start the RPC daemon by entering the NFS start command.

    Note
    • Use the commands suitable for the OS type and version of the server. The start commands differ depending on the OS type and version.
    1. Start the RPC daemon by entering the following command.

      • CentOS 6.x and above: Start rpcbind

        /etc/rc.d/init.d/rpcbind start
        
      • CentOS 7.x and above: Start rpcbind

        service rpcbind start
        

        or

        systemctl start rpcbind.service
        
    2. Register the service so that rpcbind is automatically started when booting.

      • CentOS 6.x and above

        chkconfig rpcbind on
        
      • CentOS 7.x and above

        systemctl enable rpcbind.service
        

    4. Mounting

    Take the following steps to mount the NFS volume after starting the NFS-related daemon.

    1. Enter the following command to create a mounting point (/mnt/nas).

      mkdir /mnt/nas
      
    2. Mount the volume on the mount point with NFS v3 (/mnt/nas) using the mount information(<Example> 10.00.00.00:/n0000000_volume1) given at the time of volume creation (Refer to the Mount information item of the Detailed NAS volume page).

      mount -t nfs -o vers=3 10.00.00.00:/n0000000_volume1 /mnt/nas
      
      Note
      • When mounting NFS volume, you can do it by using NFS v3 by the below method as well.
      1. In the Editor, open the /etc/nfsmount.conf file, and release the annotation and set the version value to be 3 for the volume mount version settings (Nfsvers) as below.
      Nfsvers=3
      
      1. Mount by using mount commands.
      mount -t nfs 10.00.00.00:/n0000000_volume1 /mnt/nas
      

    5. Mount information retention settings (fstab settings)

    To make the Linux server maintain the mount information after rebooting the server, add the volume information to the /etc/fstab file.

    Note

    The /etc/fstab file stores the volume information to be mounted when the server boots up. When mounting NFS volume, you must set to NFS v3.

    When the mount information of the NFS NAS volume is 10.00.00.00:/n0000000_volume1 and the server mount point is /mnt/nas, take the following steps to add the mount information to the /etc/fstab file.

    1. Open the /etc/fstab file in the editor.

      vi /etc/fstab
      
    2. Press the [a] key in the editing page to enter INSERT mode and add the mount information of the volume.

      10.00.00.00:/n0000000_volume1 /mnt/nas nfs vers=3,defaults 0 0
      
      • Editing page example
        # /etc/fstab
        # Created by anaconda on Mon Oct 12 19:30:22 2020
        #
        # Accessible filesystems, by reference, are maintained under '/dev/disk'
        # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
        #
        UUID=79ec23f4-ea9a-4f2c-a2da-xxxxxxxxxxx /     xfs     defaults      0 0
        
        # Add volume mount information ----------------------------------------
        
        10.00.00.00:/n0000000_volume1 /mnt/nas nfs vers=3,defaults 0 0
        
        # -------------------------------------------------------------
        
        
        -- INSERT --
        
    3. Press the [Esc] key to stop INSERT mode and enter :wq to save changes, and then close the editor.

      • Editing page example
        # /etc/fstab
        # Created by anaconda on Mon Oct 12 19:30:22 2020
        #
        # Accessible filesystems, by reference, are maintained under '/dev/disk'
        # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
        #
        UUID=79ec23f4-ea9a-4f2c-a2da-xxxxxxxxxxx /     xfs     defaults      0 0
        
        10.00.00.00:/n0000000_volume1 /mnt/nas nfs defaults 0 0
        
        
        
        :wq
        
      Note
      • You can set for mounting also by NFS v3 by the below method as well.
      1. In the Editor, open the /etc/nfsmount.conf file, and release the annotation and set the version value to be 3 for the volume mount version settings (Nfsvers) as below.
      Nfsvers=3
      
      1. In the Editor, open the /etc/fstab file to add volume mount information.
      10.00.00.00:/n0000000_volume1 /mnt/nas nfs defaults 0 0
      
      Note

      The following section describes each setting value of the volume mount information in detail.

      (1)10.00.00.00:/n0000000_volume1 (2)/mnt/nas (3)nfs (4)defaults (5)0 (6)0
      
      NumberSettingsDescription
      (1)10.00.00.00:/n0000000_volume1Volume mount information
      (2)/mnt/nasServer mount point
      (3)nfsFile system type
      ext4: CentOS 6.x, Ubuntu Server
      xfs: CentOS 7.x
      (4)defaultsOptional features
      defaults: Apply all 5 options below
      auto: Mount automatically when booting
      rw: Mount with read and write support
      nouser: Enable only the root account to mount
      exec: Allow file execution
      suid: Allow SetUID and SetGID
      (5)0Dump settings
      0: File system that does not support dumping
      1: File system that supports dumping
      (6)0fsck Settings
      0: when booting, fsck is not conducted.
      1: when booting, root file system is checked first
      2: when booting, file systems other than root are checked first

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.