Skip to main content

File Storage

File Storage is a data storage method that helps users store and manage their data as files in folders. This system supports standard network protocols (Network File System, NFS), which makes data easy to access from different operating systems.

Put simply, File Storage works like a shared file system that you can think of as a network drive. Arvancloud File Storage lets you share data among several instances in a private, isolated environment.

Some of the many features of this service are:

  • Concurrent data access: Connect several instances to a single storage space and use the data at the same time
  • Simple, unified management: Control all File Storage processes, such as backup, access management, and monitoring, through the panel or tools
  • Scalability: Increase File Storage capacity instantly without worrying about hardware limits
  • Access level support: Set each instance's Read/Write access level to the File Storage

Object Storage, Block Storage, and File Storage Compared​

If you need fast storage for a specific server, Block Storage is the right choice; if your goal is archiving large data, Object Storage is the better option. But if you need to share data among several servers with concurrent access, File Storage is the ideal option for you.

Block StorageObject StorageFile Storage
StructureStores data in raw blocksStores data as objects and retrieves them through an APIStores data as files and folders and retrieves them through network protocols
UseStoring operating systems, databases, and applications that need direct, fast accessUnstructured data such as media files, archives, and backupsSharing data among several servers with concurrent access

Using Arvancloud File Storage​

In the Cloud Server section of the Arvancloud panel, click File Storage in the disk menu.

Click New File Storage and specify your File Storage's details.

After setting the File Storage's capacity and name, you need to put it in the private network of the instances that need access to it. After the File Storage is created, a private address from this network is assigned to it.

Connecting an Instance​

After creating the File Storage, you can connect the private network's instances to it. To do this, click Connect Instance.

Currently, only Linux instances can be connected to File Storage.

Then click Connect New Instance.

In this section, specify the instance and its access level: Read only, or Read/Write.

Finally, click the + button to connect the instance to the storage space.

After connecting the instance, you need to mount the File Storage on the instance.

Mounting on the Instance​

First, install the package needed to mount the shared file system based on your operating system distribution:

sudo apt-get install nfs-common

Then create a directory to mount the storage on:

sudo mkdir /mnt/arvanfs

Set the necessary permissions for it:

sudo chown -R user:group /mnt/arvanfs

Note that you need to replace user:group with the appropriate username and group for your system.

Now you can connect the shared storage to the instance by running the following command:

sudo mount -t nfs {share_port_ip}:{share_location} /mnt/arvanfs

Note that you must replace {share_port_ip}:{share_location} with the File Storage's private address.

You can copy this value in the panel.

To make sure the /mnt/arvanfs path was mounted successfully, run the following command:

df -hT

To connect the File Storage permanently, so it's mounted automatically on every boot, edit the fstab file:

sudo vim /etc/fstab

And add the following line to the file:

{share_port_ip}:{share_location} /mnt/arvanfs nfs4 rw,soft 0 0

Then run the following command to apply the changes:

sudo mount -a

If you need to mount the File Storage manually, you can use the following command:

sudo mount -t nfs [ip]:/volumes/_nogroup/[id] [mount_point]

You can get the appropriate values from the panel.

Changing the Access Level​

You can edit an instance's access level from the menu next to it, using Change Access Level.

Disconnecting an Instance​

If you need to disconnect the File Storage from an instance, use Disconnect Instance.

Before disconnecting the instance, make sure Read/Write operations on the File Storage have finished, because doing this in the middle of writing may cause data loss.

Increasing Size​

One of the most important features of File Storage is its scalability and flexibility. If you ever need to increase your File Storage's capacity, you can set a new capacity by clicking Increase Size in the menu next to the File Storage.