Use team storage volumes
Create, list, and delete team storage volumes in the web interface or with the CLI, and attach a volume to a GPU Container Job.
A team storage volume is persistent storage that your team attaches to a GPU Container Job. When you delete a job, the volume keeps its data, so you can reuse datasets and checkpoints in later jobs. You can manage volumes in the web interface or with the CLI. You attach a volume when you create a job.
Prerequisites
Before you start, make sure that you have the following.
- The role for your task. Team leads and platform administrators can create and delete volumes. Members can attach a volume to a job that they create. Viewers can view the team's volumes. For more information, see Teams and roles.
- A deployment that serves storage volumes. Volumes work only on a cluster that runs on Gcore. For more information, see Team storage volumes.
- For the CLI steps, CosmicAC CLI version 1.3.0 or later, signed in to your deployment. For more information, see Install the CLI.
Understand team storage volumes
- One job at a time: only one job can use a volume. To free the volume for another job, delete the job that uses the volume.
- Fixed location: a volume stays in the location where you create it. A job that uses the volume runs in that location.
- Fixed size: you set the size in GiB when you create the volume, with a minimum of 100 GiB. You can't resize a volume later.
- Volume limit: each team can hold a limited number of volumes. A failed volume keeps its slot until you delete it. To see how many slots the team uses, check the Volume slots card on the Storage volumes page, or run
cosmicac teams storage-volumes list. - Mount path: inside the job, the volume appears at
/mnt/team-volume.
Create a volume
A volume name must be unique in your team. The name can contain up to 63 lowercase letters, numbers, and hyphens. It must start and end with a letter or number.
- In the sidebar, click Settings.
- In the Team group, click Storage volumes.
- Click New volume.
- In the Location list, select the volume's location. You can't change the location later.
- In the Name field, enter the volume's name.
- In Size, select a preset or enter a whole number of GiB. The minimum is 100.
- Click Create volume.
The volume appears in the list with the status Provisioning. Provisioning takes a few minutes. When the volume is ready, CosmicAC shows a Volume ready notification. The status then changes to Available.
List volumes
To check each volume's status and the job that uses it, list your team's volumes.
In the sidebar, click Settings. Then, in the Team group, click Storage volumes.
Attach a volume to a job
You attach a volume when you create a GPU Container Job. You can't attach a volume to a job that already exists. You can attach only volumes that have the status Available.
To attach a volume, follow the steps in one of the following guides.
Use the volume in the job
Connect to the job, and then work with the files in /mnt/team-volume. To check the volume's size and free space, run the following command.
df -h /mnt/team-volumeA new volume is empty. The first job that uses the volume creates an ext4 file system on it. You don't need to format the volume yourself. Later jobs keep the file system, so they can read the files that earlier jobs wrote. When you delete a job, the volume and the files on it remain.
Delete a volume
Deleting a volume permanently deletes all the data on it. Before you delete a volume, copy everything you want to keep.
You can delete a volume only when its status is Available or Failed. If the status is In use, first delete the job that uses the volume. To find the job, check the Attached to column in the volume list. The volume's status changes to Available a few minutes after you delete the job.
- In Settings > Storage volumes, click Delete in the volume's row.
- To confirm, enter the volume's name.
- Click Delete volume.
The status changes to Deleting. When the deletion completes, the volume disappears from the list.
Help and troubleshooting
The Location list or the CLI shows that no location can serve storage volumes
No rack in your deployment is set up for storage volumes. Ask your platform administrator to set up a rack. For more information, see Team storage volumes.
The New volume button is unavailable, or the CLI reports that the team already holds its maximum number of volumes
Your team has used all of its volume slots. Delete a volume that you no longer need, including any volume with the status Failed. To raise the limit, ask your platform administrator. For more information, see Team storage volumes.