In this article, we'll show you how to mount shared storage on a server running the Linux distribution CentOS 7, CentOS Stream 8 or CentOS Stream 9.

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

  • You set the access permissions for the desired server in the detailed view of the shared storage.

  • You have downloaded the Kerberos key.

  • You made a copy of the NFS path.

Please Note

If you have assigned a domain to the server, it must be accessible on the Internet.

  • Make sure the krb5 and nfs packages are installed. To install these packages, type the following command:
    yum install nfs-utils krb5-workstation

  • Open the zipped Kerberos key file.

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

  • Paste the files into the /etc folder.

Please Note

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

  • Optional: If the error message Failed to issue method call:No such file or directory is displayed, run the following commands:
    ln -s /usr/lib/systemd/system/nfs-secure.service /etc/systemd/system/multi-user.target.wants/
    ln -s /usr/lib/systemd/system/nfs.service /etc/systemd/system/multi-user.target.wants/

  • To restart the server, enter the following command: reboot

  • Create the directory where the shared storage is to be mounted.
    mkdir /mnt/nfs

  • To mount the shared storage permanently, open the file /etc/fstab with the editor (
    e.g. 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

Please Note

For this, you need will the NFS path.

  • To check the new entry in /etc/fstab and mount the shared storage, type the following command: mount -a

The shared storage is now mounted.