Volumes
Volumes are persistent block storage for VMs. Use them when data must outlive a VM/session lifecycle.
When to use volumes
Use volumes when you need:
- Data to survive VM termination
- Shared data across multiple VM runs
- Explicit storage lifecycle separate from compute lifecycle
- Preloaded project assets mounted into a VM path
Volumes vs sandbox filesystem vs snapshots
| Storage type | Persistence | Best for |
|---|---|---|
Session filesystem (/app) | Lost when VM/session ends | Temporary execution artifacts |
| Volume | Persists until deleted | Durable project data, model artifacts, cached dependencies |
| Snapshot | VM image state at a point in time | Fast reproducible VM boot environments |
Use snapshots to define boot-time environment state. Use volumes for mutable data that should continue across VM restarts.
Volume lifecycle
- Create a volume (
name,quota_bytes) - Upload/list/download/delete files directly on the volume (without mounting)
- Optionally create checkpoints for point-in-time restore anchors
- Mount volume into a VM path (for example
/data) - Unmount when done
- Delete volume when no longer needed
Mount model
- A volume mount is explicit:
volume_id + mount_path + mode - Modes:
rw(read/write)ro(read-only)
- You can mount during VM lifecycle operations or hot-plug on an existing VM
- Unmount requires
mount_path
File operations without a mount
Volume file APIs work outside VM mounts:
- Upload directly to a volume path
- List files with
prefix,recursive, andlimit - Download by path
- Delete by path
This is useful for pre-seeding data before VM boot and for post-run retrieval/cleanup.
Checkpoints
Volume checkpoints let you capture a volume state marker and later mount from a specific checkpoint context (where supported by your workflow).
Common use cases:
- Guardrail before risky writes
- Roll-forward pipeline milestones
- Controlled dataset versioning
Limitations and guardrails
- Volumes are not a managed database service.
- Do not use volumes as a replacement for transactional database hosting (for example PostgreSQL/MySQL production workloads).
- If you need ACID semantics, replication, failover, and database-specific durability guarantees, use a dedicated database platform and access it from your VM.
Next steps
- Guide: Volumes -- end-to-end workflows
- Python SDK: Volumes -- manager methods and flags
- REST API Reference -- endpoint details