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
- On the Advanced Settings page, click on the Disk tab.
- In the Disk section, set the size of your disk.
- 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.
- Partition Name: Enter the name of your partition.
- Path: Enter the path for your partition.
To create the partition, click on Add.
During Project Execution
- Click on the Disk Settings tab.
- In the Disk section, set the size of your disk.
- 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.
- Partition Name: Enter the name of your partition.
- Path: Enter the path for your partition.
To create the partition, click on Add.
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')
If you set the replica value to more than 1, you will not be able to create the desired disk and partitions.