Skip to main content

Disk

The Disk section in our platform applications allows developers to easily manage dedicated storage space for their applications. This space is designed to be secure and scalable, enabling you to store and manage files, data, and content for your applications without worrying about storage limitations.

How Can I Create a Disk for My Application?

Kubar provides the ability to create a Disk when building and running a project. To create a disk:

During Project Creation
  1. On the Advanced Settings page, click on the Disk tab.
  2. In the Disk section, set the size of your disk.
  3. Click on Create Disk.

After creating the disk, you can:

  • Change the disk size.
  • Delete the disk.
  • Create a partition for the disk.

To create a partition for the disk, click on the Add Partition option.

Disk

  1. Partition Name: Enter the name of your partition.
  2. Path: Enter the path for your partition.

To create the partition, click on Add.

Partition

During Project Execution
  1. Click on the Disk Settings tab.
  2. In the Disk section, set the size of your disk.
  3. Click on Create Disk.

After creating the disk, you can:

  • Change the disk size.
  • Delete the disk.
  • Create a partition for the disk.

To create a partition for the disk, click on the Add Partition option.

Disk

  1. Partition Name: Enter the name of your partition.
  2. Path: Enter the path for your partition.

To create the partition, click on Add.

Partition

How Can I Access the Created Partition?

To access the created partition in your applications, you can use the console or access the path where the partition was created in your application code.

For example, if you created a partition named test, you can access it using the following code:

import os

disk_path = os.path.join(os.path.sep, 'mnt', 'test')
caution

If you set the replica value to more than 1, you will not be able to create the desired disk and partitions.