Mounting shared storage on a server (Ubuntu 24.04, Ubuntu 26.04, Debian 12, and Debian 13)
Please use the “Print” function at the bottom of the page to create a PDF.
Valid for Cloud Servers, Dedicated Servers, and Bare Metal Servers that are managed in the Cloud Panel.
This article walks you through mounting IONOS Shared Storage on a server running Ubuntu or Debian. These instructions apply to the LTS versions of Ubuntu 24.04 and Ubuntu 26.04, as well as Debian 12 and Debian 13. The commands are identical on all the systems mentioned.
Requirements
You have assigned the shared storage to your server in the Cloud Panel.
You have configured the access permissions for the required server in the shared storage details view.
You have downloaded the Kerberos key. Instructions can be found in the following article: Shared Storage: Downloading the Kerberos key
You have made a note of the NFS path.
The server’s system time is synchronised via NTP. Kerberos will deny access if the time deviation is too great. Check this using the timedatectl tool.
Note
If you have assigned a domain to the server, it must be accessible via the internet.
- Log in to the server as root or as a user with sudo privileges.
Ensure that NFS and Kerberos are installed. To install NFS and Kerberos, enter the following commands:
sudo apt update
sudo apt install nfs-common krb5-userIf unzip is not yet installed on your server for extracting ZIP files, install the software using the following command:
sudo apt install unzip -y
Navigate to the directory where your downloaded ZIP file is located (e.g. your home directory) and extract the file to /etc. Replace the placeholder FILENAME.zip with the actual filename.
unzip FILENAME.zip -d /etc
Example:
unzip nas4_uid123456789.zip -d /etc
Caution
The rpc-gssd service can only start if the file /etc/krb5.keytab exists. You should therefore first extract the file to /etc before starting the service.
Enable and start the rpc-gssd service and ensure that its status is shown as “active (running)”. On all the systems listed (Ubuntu 24.04/26.04, Debian 12/13), use the same commands:
sudo systemctl enable --now rpc-gssd
sudo systemctl status rpc-gssd- To exit the status display, press the q key.
Create a directory where the shared storage is to be mounted:
sudo mkdir /mnt/nfs
Note
To mount multiple shared storage devices, create additional directories as required (e.g. /mnt/nfs2).
Open /etc/fstab using the vi editor. To do this, enter the following command:
vi /etc/fstab
Notes
The vi editor has an insert mode and a command mode. You can enter insert mode by pressing the [i] key. In this mode, the characters you type are inserted into the text immediately. To switch to command mode, press [ESC] afterwards. When you are in command mode, your keystrokes are interpreted as commands.
To mount the shared storage permanently, add the entry for configuring the mount point in the following format:
NFS-PATH /mnt/nfs nfs sec=krb5,_netdev 0 0
Example:
vid15943.nas3.lan:/vid15943 /mnt/nfs nfs sec=krb5,_netdev 0 0
Notes
- You will need the NFS path for this.
- The sec=krb5 option enables Kerberos authentication.
- The _netdev mount option designates the file system as a network drive. This causes the system to wait until the network is available during boot-up before attempting to mount it.
- To exit vi and save the file, enter the command :wq and then press the Enter key.
To ensure that systemd reads the modified /etc/fstab file and regenerates the associated mount units, reload the systemd manager configuration.
sudo systemctl daemon-reload
To mount all file systems defined in fstab, enter the following command:
mount -a
If no error message appears, the mount was successful. In this case, you can safely restart the server. If an error message appears, correct the entry in /etc/fstab before restarting the server.
Caution
Before restarting the server, ensure that the /etc/fstab configuration is correct. If there are any errors, the server may enter “Emergency Mode” during boot-up.
Restart the server (if everything is working). To do this, enter the following command:
sudo reboot
To ensure that the shared storage has been successfully provisioned with the correct storage capacity, you can view the currently mounted NFS shares using the following command:
mount | grep nfs
To check whether the shared storage has been provisioned with the correct storage capacity, enter the following command:
findmnt -t nfs,nfs4
Troubleshooting issues
Error: rpc-gssd fails to start
Check whether the file /etc/krb5.keytab exists:
ls -la /etc/krb5.keytab
If the file does not exist, extract the Kerberos files again to /etc. The Kerberos files must be present before the service is started.
Error: Mount error or access denied
Check the logs:
sudo journalctl -u rpc-gssd -n 50
Check that the NFS path in /etc/fstab is correct:
findmnt --verify
Also check time synchronisation, as Kerberos will deny access if the time difference is too great:
timedatectl
Server starts in Emergency Mode
If the server enters Emergency Mode due to an incorrect fstab entry, proceed as follows:
- Enter the root password to gain access to a maintenance shell.
- Correct the incorrect entry in /etc/fstab (e.g. using vi /etc/fstab).
- Resume the boot process using systemctl default or restart the server with reboot.