Skip to main content

Volumes

A Volume is storage that outlives your pods. Attach one to a pod and it is mounted at /mnt. Use it for datasets, model weights, checkpoints and results.

Any user in the pod can read and write the volume, and every file on it shows as 0777. Keep SSH private keys on the container disk with chmod 600, because ssh refuses a key that other users can read.

Volumes are object storage: fine for loading data, slower than local disk for random reads and writes. For heavy I/O, copy what you need to /root (or /tmp if /root is encrypted) and write results back to /mnt.

Create a volume​

Creating a volume needs one completed top-up on your account. Signup, referral or admin credit alone does not count.

Open Volumes

In the sidebar, open Storage → Volumes, then click ADD NEW +.

Name it

Enter a Name and click Create.

Volumes page with rate calculator and existing volume

See what a volume costs

The Est. cost / day column shows each volume's storage cost per day. Click COST HISTORY for the last 30 days, per volume per day.

Attach a volume to a pod​

When you deploy

On the Create Pod form, open Choose Volume and pick one, or click Add a Volume. Then Deploy.

With the API, pass volume_id in the rent request (POST /executors/{executor_id}/rent).

After you deploy

On the pod page, click Volume. This works only while the pod has no volume.

Attaching restarts the pod. Only files in the pod volume (where it was first mounted; the attach dialog names the path, usually /root) and the attached volume are kept; running processes and everything else in the container are lost.

With the API, pass volume_id to POST /pods/{id}/reboot.

A pod's volume can't be changed or detached. To stop using it, terminate the pod; the data stays on the volume.

One volume can be attached to several pods at once. They all see the same files, with no locking.

Use it in the pod​

ls /mnt
df -h /mnt # confirm it's mounted

Copy files you read often from /mnt to the pod's disk and read them there: every read from /mnt is downloaded again and billed as egress.

List a volume's files​

See what a volume holds without attaching it to a pod:

curl "https://lium.io/api/volumes/<volume_id>/files?prefix=data/" \
-H "X-API-Key: $LIUM_API_KEY"

It returns files (name, size, last_modified), folders and next_cursor, one folder level at a time. Names are relative to /mnt. Leave prefix empty for the top level. Up to 200 entries per page (limit, max 1000); pass next_cursor as cursor for the next page. A key with read is enough; it needs account pod visibility. Listing bills no egress.

Billing​

  • Storage: $0.00005 per GB-hour (about $0.036 per GB-month) of data stored, also while detached.
  • Egress: every read from /mnt and every download is billed per GB at what AWS charges Lium. Writes are free.
  • Balance below $0: your volumes and backups keep billing, and we e-mail you to top up. At -$5.00 they are deleted, never sooner than 48 hours after your balance reached -$5.00.
  • Charged as it accrues: every 5 minutes, like pod time, storage so far (at your volume's last measured size) is taken from your balance once it reaches $0.01, and the egress of the reads made so far is taken as it is read. Low-balance warnings, auto top-up and your estimated balance see them like pod time.
  • COST HISTORY on the Volumes page shows storage and egress per volume per day, including deleted volumes. A day's exact cost is settled about 2 days later, once AWS reports it in full: any difference from what was already charged is charged or returned.

The Volumes page and Billing show egress for the latest 2 days AWS has reported, with a warning when one day reaches $10.

Delete a volume​

In the Volumes list, click the trash icon. Billing stops. To undo it, contact support with the volume ID within 7 days.

Pod backups do not include /mnt.

Use the API or CLI​

# List your volumes
curl https://lium.io/api/volumes \
-H "X-API-Key: $LIUM_API_KEY"

# Create one
curl -X POST https://lium.io/api/volumes \
-H "X-API-Key: $LIUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "my-dataset", "description": "Training data v2"}'

# Delete one
curl -X DELETE https://lium.io/api/volumes/<volume_id> \
-H "X-API-Key: $LIUM_API_KEY"

CLI: lium volumes list / new / rm (reference). You need an API key.