High-performance, highly available VPS/VDS with automatic provisioning and full root access to the OS. The resources you order are reserved exclusively for you.
Ensure business continuity with our reliable disaster-recovery solutions, delivering rapid restoration and minimal downtime when unexpected issues arise.
In this guide, we will show you how to connect Servermall Cloud cloud storage using the NFS protocol on Linux, using Ubuntu 20.04.5 LTS as an example. In this guide you will learn how to:
Add your device’s IP address to the trusted list.
Obtain the connection credentials for the cloud storage.
Install the software needed for NFS.
Connect the cloud storage as a network drive.
Disconnect the network drive from your system.
Prerequisites
Your system must be running Linux. A Linux terminal must be available.
You must have a Servermall Cloud account. See the “Creating an Account” guide.
You must place an order for Servermall Cloud cloud data storage. The ordering procedure is described in the “How to Order Cloud Data Storage” guide.
You must wait for an email from Servermall Cloud confirming that your cloud storage is ready for use.
I. Adding Your Device’s IP Address to the Trusted List and Obtaining Connection Credentials
To connect to the storage, you need to obtain the authorization and connection settings, and add the IP address of the device that will use the storage to the trusted list. It is recommended to use a static IP address to avoid having to update the IP address each time it changes.
To add your IP address to the trusted list and obtain the connection data, follow these steps:
1. Determine your device’s IP address.
If you do not know your device’s IP address, find it using one of the following commands in the terminal.
For example, you can determine the IP address with the following command:
hostname -I
This command outputs a list of all the host’s IP addresses.
a. Click on the Services option in the main menu of the control panel. A list titled My Products & Services will appear.
b. Select from the “Product/Service” list the storage you wish to connect to by clicking in its row. You will be taken to the control panel for your selected cloud storage.
4. Ensure that NFS is enabled.
In the “Service Management” section, check the value in the “Status” column of the “NFS” :
If the status is “In Use”, proceed to step 5.
If the status is “Not Used”, click “Enable”in the “NFS” row to turn on access. This will enable NFS access to your storage.
5. Add your device’s IP address to the trusted list.
a. Go to the “IP Control” tab.
b. Click the “+Add” button. A window titled “Add new allowed IP” will open.
c. In the “IP Address” field, enter the IP address you obtained in step 1.
d. Switch “Allow NFS” to the “On” position.
e. Click the “Add” button. The IP address will be added to the trusted list for NFS connections and will appear in the “IP Control” table.
6. Obtain the connection credentials for the storage.
The information needed to connect via NFS – the “IP address” and “Username” – will be sent to you by email when your Servermall Cloud cloud storage is ready. Alternatively, you can get the required information by:
a. In the “Service Management” section, click the “Access Details” button in the “NFS” row under the “Services” tab. A window titled “NFS Access Details” will open, showing the full path to your cloud storage in the “NFS Path” field.
b. Or in the “Access Details” block of the “Account Information” section, the connection data such as ”Primary IP” and “Username” are provided.
So, once you have the connection credentials and have added your device’s IP to the trusted list, you are ready to connect your device to the cloud storage.
II. Installing the Components for NFS
Below is a list of the basic commands to install the NFS client (the packages required for connecting to NFS) for different Linux distributions and versions.
1. Identifying the Linux Distribution and Version
You can determine your Linux distribution and version by running one of the following commands:
lsb_release (if the lsb-release package is installed):
lsb_release -a
The output will look similar to:
netadmin@de2:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
netadmin@de2:~$
where: Distributor ID – the Linux distribution. Release – the Linux version.
To connect to the cloud storage via NFS, follow these steps:
1. Create a directory.
The NFS drive is mounted to an existing local directory. You can create a catalog with the command:
sudo mkdir -p
where:
-p – The parameter will create all directories of the specified path. If any directory does not exist, that path directory is created without warning.
<Directory> – The path and name of the directory to be created.
For example:
sudo mkdir -p /nfs/Disk1
If the directory is created successfully, no message will be displayed.
2. Mount the NFS storage.
Mount the NFS drive to an existing directory using the command:
sudo mount
where:
<Storage_Path> – The path to the NFS drive, which you can find in the “NFS Path” field in the storage control panel (see step 6.a).
<Directory> – The directory where the NFS drive will be mounted.
Alternatively, the mount command may look like this:
sudo mount :/mnt/HDD/
where:
<Storage_IP> – The IP address of the storage, which you can find in the “Primary IP” field in the storage control panel (see step 6.b).
<Username> – The username for the cloud storage, which you can find in the “Username” field in the storage control panel (see step 6.b).
<Directory> – The directory where the NFS drive will be mounted.
For example, in our case the command will look like:
sudo mount 203.0.113.10:/mnt/HDD/prfktat /nfs/Disk1
If the NFS drive is mounted successfully, no message will be displayed, and a new network drive linked to the cloud storage via NFS will be added to your system. You can work with this drive as you would with a local drive.
Note that a drive mounted in this way is only available for the current session. After shutting down or rebooting, you will need to remount the NFS drive or set up automatic mounting as described in step 5 below.
3. Verify the mount.
You can verify that the drive is mounted in several ways:
For example, display the disk usage of all mounted file systems using the command:
In the second-to-last line, you can see that the NFS drive is successfully mounted to the specified directory.
To check access to the NFS drive, you can create a file on it by running:
sudo touch
where: <File> – The path, name, and extension of the file to be created.
The output may look like:
sudo touch /nfs/Disk1/test.test
This command creates the file test.test on the connected drive. If no errors are shown, the file was created successfully.
You can check the file permissions by running:
ls -l
where: -l – This option displays detailed information about the file (permissions, owner, group, modification date, size). <File> – The path, name, and extension of the file to check.
The output might look like:
netadmin@de2:/nfs/Disk1$ ls -l /nfs/Disk1/test.test
-rw-r--r-- 1 1023 1023 0 Mar 1 09:44 /nfs/Disk1/test.test
netadmin@de2:/nfs/Disk1$
In the output, the first three characters (e.g., -rw) indicate that the user has read (r) and write (w) permissions on the file.
4. Set up automatic mounting.
Open the file system table for editing with:
sudo nano /etc/fstab
(You can use any text editor installed on your system, such as vi, vim, or emacs.)
In Nano, add the details for the drive’s address, the mount directory, and the access options at the end of the file in the following format:
<NFS Path> – The network storage address as shown in the NFS Path field (see step 6.a).
<Directory> – The path and name of the directory where the drive will be mounted (for example, /nfs/Disk1).
nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0 – The options for mounting the NFS drive. For example, auto enables automatic mounting at boot, nofail allows the system to continue booting even if the NFS server is unavailable, etc. For more information about these options, run manfstab.
Use the “Tab” key to separate the fields.
In our case, the /etc/fstab file with the added line for the NFS drive looks like:
After adding the details to /etc/fstab, save the file and exit the editor. Here’s how you can do it:
nano: Save: Press “Ctrl+O”, then “Enter”. Exit: Press “Ctrl+X”.
vi/vim: Switch to command mode: Press “Esc”. Save and exit: Type “:wq” and press “Enter”.
emacs: Save: Press “Ctrl+X”, then “Ctrl+S”. Exit: Press “Ctrl+X”, then “Ctrl+C”.
After the next reboot, the NFS drive will be automatically mounted to the specified directory.
IV. Disconnecting the Network Drive via Terminal
If the network drive is no longer needed, you can disconnect it. The following method works for disconnecting NFS drives as well as any other network drives, regardless of the protocol used.
Unmount the NFS drive for the current session with:
sudo umount
where: <Directory> – The path and name of the directory where the drive is mounted.
For example:
sudo umount /nfs/Disk1
This command will disconnect the drive mounted at /nfs/Disk1 for the current session.
If the network drive was set to mount automatically, remove its entry from the /etc/fstab file by opening it with:
sudo nano /etc/fstab
(Again, you can use any text editor like vi, vim, or emacs.)
In the editor, find the line corresponding to the NFS drive and delete it entirely. Then save the changes and exit the editor using the same steps as described above. After the next reboot, the NFS drive will not be automatically mounted.
V. Connecting with the NFS Drive using the Nautilus File Manager (Files)
Initial Connection to the Cloud Storage
Open the “Nautilus” file manager (“Files”).
Select “+ Other Locations” from the menu.
In the “Connect to Server” field, enter the “NFS Path” value you obtained earlier (see step 6.a in Part I) in the following format:
nfs://
For example:
nfs://203.0.113.10:/mnt/HDD/prfktat
Click the “Connect” button. After a successful connection, the NFS drive will appear in the “Network” section.
Click on the cloud storage username or the server IP address in the “Network” section to open it. The connected NFS drive will open, and you can work with it just like a local drive. The connected NFS drive will open, and you can work with it just like a local drive. A drive connected this way will only be available until the current session ends.
Reconnecting to the Cloud Storage
When reconnecting, you do not need to manually enter the path in the “Connect to Server” field. Instead, open the “Recent Servers” list and select the desired server.
Disconnecting the Cloud Storage
To disconnect the cloud storage, click the “Eject” icon next to its name.
Cookie consent
This site uses cookies to ensure it works properly and to track how you use it. By clicking 'Accept', you agree to these technologies. For more details, please see our Privacy Policy and Cookies Policy
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.