Loading...
Loading...
Creates and manages persistent volumes on TrueFoundry. Handles creation, listing, mounting, storage class selection, and static volume attachment.
npx skill4agent add truefoundry/tfy-deploy-skills truefoundry-volumes<objective>Routing note: For ambiguous user intents, use the shared clarification templates in references/intent-clarification.md.
ephemeral_storagedeploysecrets| Aspect | Volumes | Blob Storage (S3/GCS) |
|---|---|---|
| Access method | Standard file system APIs (open, read, write) | SDK clients (boto3, gcsfs) |
| Speed | Faster (local-disk latency) | Slower (network round-trips) |
| Durability | High | Extremely high (11 nines) |
| Cost | Higher per GB | Lower per GB |
| Scope | Region/cluster limited | Global access |
| Best for | Shared model weights, training checkpoints, low-latency reads | Large archives, datasets accessed infrequently, cross-region data |
TFY_BASE_URLTFY_API_KEY.envTFY_WORKSPACE_FQNreferences/prerequisites.mdReadWriteManyRetainefs.csi.aws.coms3.csi.aws.comgcsfuse.csi.storage.gke.iofile.csi.azure.comblob.csi.azure.comreferences/volume-storage-classes.mdTFY_API_SHscripts/tfy-api.shreferences/tfy-api-setup.md50my-cluster.example.truefoundry.com/adminsecretsVolume to create:
Type: Create new (dynamic)
Name: training-data
Size: 100 GB
Storage class: efs-sc
Workspace: my-cluster:my-workspace
Volume Browser: Enabled
Endpoint: https://my-cluster.example.truefoundry.com/training-data/
Username: admin
Password: (secret: my-cluster:my-workspace:vol-browser-pw)
Note: Size can be expanded later but not reduced.
Proceed?Volume to create:
Type: Create new (dynamic)
Name: training-data
Size: 100 GB
Storage class: efs-sc
Workspace: my-cluster:my-workspace
Volume Browser: Disabled
Note: Size can be expanded later but not reduced.
Proceed?tfy_applications_create_deployment(
manifest={"type": "volume", "name": "my-volume", "config": {"type": "dynamic", "size": 100, "storage_class": "efs-sc"}},
options={"workspace_id": "ws-id-here"}
)$TFY_API_SH PUT /api/svc/v1/apps '{
"manifest": {
"type": "volume",
"name": "my-volume",
"config": {
"type": "dynamic",
"size": 100,
"storage_class": "efs-sc"
}
},
"workspaceId": "ws-id-here"
}'$TFY_API_SH PUT /api/svc/v1/apps '{
"manifest": {
"type": "volume",
"name": "my-volume",
"config": {
"type": "dynamic",
"size": 100,
"storage_class": "efs-sc"
},
"volume_browser": {
"username": "admin",
"password_secret_fqn": "my-cluster:my-workspace:vol-browser-pw",
"endpoint": {
"host": "my-cluster.example.truefoundry.com",
"path": "/my-volume/"
}
}
},
"workspaceId": "ws-id-here"
}'$TFY_API_SH PUT /api/svc/v1/apps '{
"manifest": {
"type": "volume",
"name": "my-existing-vol",
"config": {
"type": "static",
"persistent_volume_name": "pv-name-in-k8s"
}
},
"workspaceId": "ws-id-here"
}'tfy_applications_list(filters={"workspace_fqn": "my-cluster:my-workspace", "application_type": "volume"})# List volumes in a workspace
$TFY_API_SH GET '/api/svc/v1/apps?workspaceFqn=my-cluster:my-workspace&applicationType=volume'
# Get a specific volume by ID
$TFY_API_SH GET /api/svc/v1/apps/VOLUME_APP_IDVolumes in my-cluster:my-workspace:
| Name | Size | Storage Class | Status | Created |
|----------------|--------|---------------|----------|--------------------|
| training-data | 100Gi | efs-sc | RUNNING | 2026-02-10 14:30 |
| model-cache | 50Gi | premium-rwx | RUNNING | 2026-02-08 09:15 |from truefoundry.deploy import Service, VolumeMount
service = Service(
name="my-service",
# ... image, ports, resources ...
mounts=[
VolumeMount(
mount_path="/data",
volume_fqn="my-cluster:my-workspace:my-volume",
),
],
){
"manifest": {
"kind": "Service",
"name": "my-service",
"image": {"type": "image", "image_uri": "my-image:latest"},
"mounts": [
{
"type": "volume",
"mount_path": "/data",
"volume_fqn": "my-cluster:my-workspace:my-volume"
}
],
"resources": {
"cpu_request": 0.5, "cpu_limit": 1.0,
"memory_request": 512, "memory_limit": 1024
}
},
"workspaceId": "ws-id-here"
}{
"manifest": {
"kind": "Job",
"name": "my-training-job",
"image": {"type": "image", "image_uri": "my-training:latest"},
"mounts": [
{
"type": "volume",
"mount_path": "/data",
"volume_fqn": "my-cluster:my-workspace:training-data"
},
{
"type": "volume",
"mount_path": "/checkpoints",
"volume_fqn": "my-cluster:my-workspace:checkpoint-vol"
}
],
"resources": {
"cpu_request": 4.0, "cpu_limit": 8.0,
"memory_request": 16384, "memory_limit": 32768
}
},
"workspaceId": "ws-id-here"
}{cluster}:{workspace}:{volume-name}my-cluster:my-workspace:training-datacache_volumellm-deploy# In LLM deployment manifest
cache_volume:
cache_size: 50
storage_class: efs-sc| Use Case | Recommended Size | Notes |
|---|---|---|
| Small model cache (< 7B params) | 20-50 Gi | 2x the model size in FP16 |
| Large model cache (7B-70B params) | 50-200 Gi | 2x the model size; account for multiple formats |
| Shared training dataset | 50-500 Gi | Depends on dataset size; leave 20% headroom |
| Checkpointing | 20-100 Gi | Depends on checkpoint frequency and model size |
| General shared storage | 10-50 Gi | Start small, expand as needed |
references/static-volume-setup.mdreferences/volume-browser-setup.mdworkspacesVolumeMountcache_volumeapplications| Error | Cause | Fix |
|---|---|---|
| Volume not found | Wrong name or workspace | Verify FQN; volumes are workspace-scoped |
| Storage class not available | Cluster missing provisioner | Check |
| Size cannot be reduced | PVC limitation | Create new smaller volume and migrate data |
| Workspace mismatch | Volume in different workspace | Create volume in same workspace as the app |
| Permission denied | API key lacks access | Check API key permissions for this workspace |
| PV not found (static) | K8s PV doesn't exist | Verify with |
| Data corruption | Multiple pods writing same path | Use per-pod sub-directories (e.g., |