Skip to main content

Disk Management

Disks in the Arvancloud Cloud Container are equivalent to Persistent Volumes in Kubernetes. By default, an application's data is stored on ephemeral storage. But this data is deleted each time the application restarts. So if you need to store data permanently, you must use disks.

In general, disks are useful for the following applications:

  • Infrastructure services, such as Kafka, Elasticsearch, and so on
  • Content management platforms and CMSs, such as WordPress, Ghost, Strapi, and so on
  • Communication tools, such as Mattermost, Discourse, and so on
  • Databases, such as PostgreSQL, MySQL, and so on

Disks in the Arvancloud Cloud Container are kept independently of the application. This means that even after the application is deleted, the disk and its contents can still be available at the project level.

In the Disk Management section of the panel, you can see all disks in the project and each one's status, capacity, age, and access mode.

In addition, to add, edit, or delete a disk attached to an application, you can click the application's name in the panel and go to the Disk section.

Adding a Disk​

To add a new disk, click the application's name, select the Disk tab, and click Add New Disk.

Next, specify the disk size and the path where the storage is mounted in the application. The mount path is the same as container-path in Docker.

docker run -d -p <hostPort>:<containePort> -v <host-path>:<container-path> <image>

For example, consider the command

docker run -d -p 5000:5000 -v /app:/app myflaskimage

or the following Docker Compose file:

version: '3'
services:
web:
image: myflaskimage
ports:
- "5000:5000"
volumes:
- /app:/app

To implement these settings in the panel, enter /app in the mount path field.

Note that creating a new disk restarts the application.

After the application restarts, the new disk is available to you.

Attaching and Detaching a Disk​

To disconnect a disk from the application, use Detach Disk next to its name.

Note that detaching the disk restarts the application.

Also, if you previously detached a disk from the application, you can reattach it to the app on the same page by clicking Attach.

Then specify the disk's capacity and new mount path.

Note that attaching the disk restarts the application.

After the application restarts, the disk is available to the app.

Editing a Disk​

If you need to change your disks' settings, you can change them at any time by clicking Edit.

In this section, you can change the disk's mount path as well as its size.

In the Cloud Container, you can only increase a disk's size; decreasing it isn't possible. Also, the value entered for the disk must be an integer.

Note that editing a disk restarts the application.

After the application restarts, the changes are applied.

Deleting a Disk​

To delete a disk, click Delete and confirm the operation.

Note that after the disk is deleted, its data can't be recovered in any way.