• Help & contact
    • Spring Offers
      %

    For Cloud Servers and Dedicated Servers managed in the Cloud Panel

    This article explains how to mount shared storage on a server running Ubuntu/Debian.

    Prerequisites
    • You assigned an IP address or domain to your server.

    • You have assigned the Shared Storage to your server

    • You set the access permissions for the desired server in the Shared Storage Details section.

    • You have downloaded the Kerberos key.

    • You have taken note of the NFS path.

    Please Note

    If you assigned a domain to your server, it must be accessible via the Internet.

    • Make sure that the krb5 and nfs packages are installed. To install these packages, enter the following command:

      Ubuntu 16.04 and Debian 10

      apt-get install nfs-common krb5-user


      Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04 and Debian 11
      To install krb5, enter the following command:

      apt-get install krb5-user


      To install nfs, enter the following commands:

      sudo apt update
      sudo apt install nfs-common

    • Open the /etc/default/nfs-common file using the vi editor. To do this, enter the following command:

      [root@localhost ~]# vi /etc/default/nfs-common

    Additional Information about the vi editor
    • Press the [i] key. In this mode, the entered characters are immediately inserted into the text. To enter the command mode, press [ESC] afterwards. When you use command mode, your keyboard input is interpreted as a command.

    • To exit vi and save the file, type the command :wq, and then press Enter.

    • To enable the NEED_GSSD parameter, enter yes in the NEED_GSSD line in /etc/default/nfs-common.

    • Open the zipped Kerberos key file.

    • Copy the krb5.conf and krb5.keytab files.

    • Paste the files into the /etc folder.

    Note

    If you use a local computer with Windows operating system, you can transfer the files easily and conveniently with the WinSCP program. WinSCP is a graphical open source SFTP and FTP client for Windows. To download the program, click here.

    • To start the required services manually, enter the following commands:

      Debian 10 and 11:

      systemctl start rpc-gssd

      Ubuntu 16.04:

      systemctl start gssd

      Ubuntu 18.04, Ubuntu 20.04 and Ubuntu 22.04:

      systemctl start rpc-gssd

    • Create the directory under which the storage is to be mounted.

      mkdir /mnt/nfs

    Note

    To mount multiple shared storages, create another directory, (e.g. /mnt/nfs2 etc.) Then perform the next step for all shared storages.

    • To mount the shared storage permanently, open /etc/fstab with the editor (for example, vi) and insert the desired mount point in the following format:

      vid12345.nas1.lan:/vid12345 /mnt/nfs nfs sec=krb5 0 0

      Example:

      vid15943.nas3.lan:/vid15943 /mnt/nfs nfs sec=krb5 0 0

    Note

    You need the NFS path for this.

    • To have the new entry in /etc/fstab checked and the shared storage mounted, enter the following command:

      mount -a

    The shared storage is mounted.