Barrack API Documentation
  1. Volumes
Barrack API Documentation
  • Platform Documentation
    • Getting Started
    • Authentication & Access
    • Account Management
    • API Keys
    • GPU Models
    • Regions
    • Instance
      • OS Images
      • Bootsource Management
      • Deploy Instance
      • Instance Management
      • Hibernation
      • View Instances
    • SSH Keys
      • Add SSH Keys
      • Manage SSH Keys
    • Volumes
      • Overview
      • Create Volume
      • List and View Volumes
      • Attach Volumes
      • Detach Volumes
      • Clone Volumes
      • Resize Volume
      • Delete Volume
    • Advanced Configurations
      • Network And Security
      • Cloudinit Script
      • Startup Script
    • Firewall
      • Manage Firewall
      • Rules and Attachment
    • Snapshot
      • Overview
      • Manage Snapshots
      • Restore Snapshots
    • Custom Images
      • Overview
      • Create and Manage Images
    • dashboard
      • "Dashboard Overview"
      • "VM Management"
    • AI Chat
      • AI Chat
  • Balance
    • Get credit balance
      GET
  • GPU Stocks
    • Get GPU stock availability
      GET
  • GPU Specs
    • Get GPU specifications
      GET
  • Regions
    • List available regions
  • Pricing
    • Get pricing information
    • Get pricing information
  • Deploy Instance
    • Create a new instance
  • Instance management
    • List instances
    • Get instance details
    • Get instance billing
    • Start instance
    • Stop instance
    • Reboot instance
    • Hibernate instance
    • Restore hibernated instance
    • Toggle public IP for instance
    • Add instance security rule
    • Remove instance security rule
    • Delete instance
  • OS Images
    • List OS images
  • SSH Keys
    • List SSH keys
    • Get SSH key
    • Create SSH key
    • Delete SSH key
  • Volumes
    • List volumes
    • Create volume
    • Get volume details
    • Delete volume
    • Resize volume
    • Clone volume
    • Attach volumes to instance
    • Detach volumes from instance
    • List available volume types
    • Get volume billing
  • Firewalls
    • List firewalls
    • Get firewall details
    • Get supported protocols
    • Get firewalls attached to instance
    • List instances available for firewall attachment
    • Create firewall
    • Delete firewall
    • Add firewall rule
    • Remove firewall rule
    • Attach firewall to instances
  • Scripts
    • List all startup scripts
    • Get startup script details
    • Create a startup script
    • Update a startup script
    • Delete a startup script
    • Delete multiple startup scripts
  • Snapshots
    • List snapshots
    • Get snapshot details
    • List Instance eligible for snapshot creation
    • Get snapshot billing
    • Create snapshot
    • Delete snapshot
    • Restore snapshot
  • Images
    • List custom images
    • Get image details
    • Create image from snapshot
    • Delete custom image
    • Get snapshot-image relationship
    • Get snapshot-image relationship list
  • AI Chat
    • Get available AI models
    • Chat with AI
    • Get AI usage summary
    • Get AI usage history
  • Schemas
    • AITransaction
    • AddFirewallRuleRequest
    • AddFirewallRuleResponse
    • AddVMSecurityRuleResponse
    • AttachFirewallRequest
    • AggregatedBillingResponse
    • AttachFirewallResponse
    • AttachVolumesRequest
    • AttachVolumesResponse
    • AttachedFirewall
    • BatchSnapshotImageRelationshipResponse
    • Balance
    • Billing
    • ChatCompletionsRequest
    • ChatCompletionsResponse
    • CloneVolumeRequest
    • BillingRecord
    • CloneVolumeResponse
    • BillingSummary
    • CreateFirewallRequest
    • CreateFirewallResponse
    • CreateImageFromSnapshotRequest
    • CreateSSHKeyRequest
    • CreateScriptRequest
    • CreateSnapshotRequest
    • CreateSnapshotResponse
    • CreateSSHKeyResponse
    • CurrencyEnum
    • Data
    • CreditBalanceResponse
    • DeleteFirewallResponse
    • CreateVolumeRequest
    • DeleteSnapshotResponse
    • CreateVolumeResponse
    • DeleteVMResponse
    • DetachVolumesRequest
    • DetachVolumesResponse
    • DeploymentRequest
    • DirectionEnum
    • DeploymentResponse
    • EthertypeEnum
    • ErrorResponse
    • FirewallAttachment
    • DeleteVolumeResponse
    • DeleteSSHKeyResponse
    • FirewallEnvironment
    • FirewallResponse
    • FirewallRule
    • FirewallVM
    • GetBatchSnapshotImageRelationshipsRequest
    • GetFirewallDetailsResponse
    • GPUStockConfiguration
    • GPUSpec
    • GetHibernatedVMsResponse
    • GPUStockItem
    • GPUSpecsResponse
    • GetSupportedProtocolsResponse
    • GPUStocksResponse
    • GetVMAttachedFirewallsResponse
    • GetVolumeTypesResponse
    • HibernateVMResponse
    • HibernationBillingMetrics
    • ListFirewallsResponse
    • ListUserVMsResponse
    • ListVMsResponse
    • ModelsResponse
    • GetSSHKeysResponse
    • Pagination
    • PricingRequest
    • OSImage
    • PricingResponse
    • OSImagesResponse
    • Protocol
    • GpuCountEnum
    • ProtocolEnum
    • Image
    • GpuModelEnum
    • GetVolumeDetailsResponse
    • RebootVMResponse
    • ImageCreateResponse
    • RecentHibernation
    • ImageDeleteResponse
    • GetVolumesWithNextNameResponse
    • RemoveFirewallRuleResponse
    • ImageDetailResponse
    • RemoveVMSecurityRuleResponse
    • Region
    • ImageListResponse
    • ResizeVolumeRequest
    • RegionsResponse
    • Price
    • ResizeVolumeResponse
    • ResourceTypeEnum
    • RestoreSnapshotRequest
    • RestoreSnapshotResponse
    • RestoreVMResponse
    • Snapshot
    • SnapshotImageRelationshipResponse
    • Specs
    • StartVMResponse
    • StopVMResponse
    • TierEnum
    • UpdateScriptRequest
    • UsageHistoryResponse
    • UsageSummaryResponse
    • RegionEnum
    • UserVM
    • VMDetailsResponse
    • VMFlavor
    • VMImage
    • VMInstance
    • VMResponse
    • SpecsMetadata
    • VMSecurityRule
    • VMSecurityRuleRequest
    • VMStatus
    • VMVolumeAttachment
    • Script
    • VolumeTypeEnum
    • SSHKeyResponse
    • ScriptListResponse
    • ToggleVMPublicIPResponse
    • VolumeBillingRecord
    • VolumeBillingSummary
    • VolumeHourlyBillingResponse
    • VolumeResponse
  1. Volumes

Detach Volumes

Detach Volumes#

Disconnect persistent storage volumes from instances while preserving all volume data. Detached volumes can be re-attached to the same or different instances.

Detachment Requirements#

Before detaching a volume, ensure these conditions are met:
Volume Status
Must Be "Attached"
Currently connected to an instance
Not in "Available" status
Not in "Creating" status
Shows "Attached" badge on volume card
Volume Type
Must Be Non-Bootable
Cannot be OS/bootable volume
Volume details show "Bootable: No"
Was not created from OS image
Detach button is enabled (not grayed out)
OS/Bootable Volume Restriction:
Created from OS image (CANADA-1 only)
Bootable flag set to true
Permanent attachment - cannot be detached
Detach button disabled with tooltip
Instance Status
Must Be "SHUTOFF"
Instance is powered off
Not running (ACTIVE)
Not creating, hibernated, or suspended
Shut down instance before detachment
How to Shut Down:
1.
Go to instances page
2.
Click shutdown/stop button
3.
Wait for SHUTOFF status
4.
Return to volumes page

Detaching a Volume#

1
Verify & Prepare
Check Volume Type:
Navigate to barrack.ai/volumes
Use region dropdown to filter volumes
Locate the attached volume
Verify volume details show "Bootable: No"
If "Bootable: Yes", volume cannot be detached
Verify Instance Status:
Check instance status displayed on volume card
Status must show SHUTOFF
If not SHUTOFF, shut down the instance:
1.
Go to barrack.ai/instances
2.
Click shutdown/stop button on instance card
3.
Wait for status to change to SHUTOFF
4.
Return to volumes page
Confirm Before Proceeding:
Volume is non-bootable (can be detached)
Instance is in SHUTOFF state
Detach button is enabled on volume card
2
Detach Volume
Click the Detach button on the volume card
Confirmation Modal Appears:
Shows volume name
Displays warning about potential application disruption
Shows instance status validation
If Instance Not SHUTOFF:
Error message displays:
"Cannot detach: Volume is attached to a [STATUS] instance. The instance must be in SHUTOFF state to perform volume operations. Please shut down the instance first before attempting to detach volumes."
If Instance Is SHUTOFF:
Click the Detach button in the modal to confirm
Processing:
Request sent to backend
Volume disconnected from instance
Typically completes in 5-10 seconds
Success notification appears
3
Verify Detachment
Volume Card Updates:
Status changes from "Attached" to "Available"
Instance name and ID are removed
Detach button changes to Attach button
Delete button becomes enabled
Volume Details Updates:
"Attached to" field is cleared
Status shows "Available"
Data Preservation:
All data on volume is preserved
No data loss occurs during detachment
Filesystem and files remain unchanged
Volume can be re-attached with data intact

Post-Detachment Status#

After successful detachment, these changes occur:

Volume Changes#

Status Updates:
Status badge changes from "Attached" to "Available"
Instance information removed from volume card
"Attached to" field cleared in volume details
Button Changes:
Detach button is hidden
Attach button appears
Delete button becomes enabled
Clone/Resize buttons remain available (advanced tier only)
Data Preservation:
All data on volume is preserved
No data loss during detachment
Volume can be re-attached to same or different instance
Data immediately accessible after re-attachment

Instance Impact#

Instance State:
Instance remains in SHUTOFF state
Instance can be started without detached volume
Boot process unaffected (unless it was an OS volume)
Application Impact:
Applications configured to use the detached volume will:
Fail to start if volume mount is missing
Show errors when accessing volume mount point
Require reconfiguration to use different storage
Need volume re-attachment to function normally
Configuration Updates Needed:
If starting instance without the volume:
1.
Remove volume mount from /etc/fstab
2.
Update application configurations
3.
Remove volume-dependent services
4.
Verify applications still function correctly

Billing Impact#

No Change in Billing:
Volume billing continues at the same rate
Detachment does not affect billing charges
Credits deducted hourly based on volume size and type
Same rate whether attached or available

Troubleshooting#

OS/Bootable volumes cannot be detached
Instance must be SHUTOFF to detach volumes
Volume is not attached
Could not find a suitable instance
Instance not available in current currency context
Detach button is disabled
Detachment fails after confirmation
Instance status showing wrong state

Instance State Reference#

Understanding instance states is critical for successful volume detachment:
SHUTOFF (Required)
ACTIVE (Invalid)
CREATING (Invalid)
HIBERNATED (Invalid)
Description: Instance is powered off and not consuming compute resources
Volume Operations:
✅ Detach volumes allowed (non-OS volumes only)
✅ Attach volumes allowed
How to Achieve:
1.
Navigate to instances page
2.
Click shutdown/stop button on instance card
3.
Wait for status to change to SHUTOFF
Verification: Instance card shows "SHUTOFF" status badge

Next Steps#

After detaching volumes:
1
Verify Detachment
Confirm successful detachment:
Volume status shows "Available"
Instance information removed from volume card
Attach button is displayed
2
Decide Next Action
Choose based on your needs:
Attach volume to a different instance
Delete volume if no longer needed
Keep volume available for future use
Clone or resize volume (advanced tier only)
3
Update Instance Configuration
If starting instance without the volume:
Remove volume mount from /etc/fstab
Update application configurations
Remove volume-dependent services
Verify applications still function correctly

Support#

Email Support
Detachment Issues Help
Contact for:
Detachment errors
Instance state problems
OS/bootable volume questions
Include: volume ID and name, instance ID and name, error messages, screenshots
Delete Volumes
Volume Deletion Guide
Learn how to:
Delete detached volumes
Verify volume requirements
Understand billing impact
Troubleshoot deletion errors
Previous
Attach Volumes
Next
Clone Volumes
Built with