Overview
A volume set is a collection of storage volumes, which may be linked to one or more workloads running on Control Plane. The behavior varies greatly depending on your choice of filesystem.Traditional File Systems (ext4, xfs)
- Control Plane provisions a unique volume for each replica in the linked workload.
- Each volume set can be used by at most one workload, which must be of type stateful or vm.
- Each volume in the set is bound to a single workload replica
- Data is not replicated between volumes. If you require data sharing or replication, this must be accomplished at the application level (e.g. by using WAL streaming between two Postgresql instances)
Shared File System
- Control Plane provisions a single volume per location
- The volume set can be attached to any number of workloads
- All attached workload replicas in a given location use the same volume
- On a BYOK location, it needs a one-time object storage setup; see Shared File System on BYOK
Caveats
The shared filesystem does not support:- snapshots
- certain commands:
createVolumeSnapshotdeleteVolumeSnapshotrestoreVolumedeleteVolumeshrinkVolumecopyVolume
Capacity and Billing
- When a volume is created, it will have an initial capacity defined by the spec of your volume set.
- Volume capacity can be increased by sending an
expandVolumecommand. - Volume capacity can be decreased using the
shrinkVolumecommand, which copies the data to a smaller volume (see Volume Shrinkage below). - The bill for a volume set is calculated by summing the reserved GB of all volumes.
Autoscaling
One Volume Per Replica
This only applies to volume sets using traditional file systems (e.g. ext4, xfs)
- Like workloads, volume sets scale horizontally. Every replica in the linked workload is automatically assigned a volume.
- When the linked workload scales down, the volumes are preserved. Volumes are only deleted when you send a
deleteVolumecommand, or when the volume set itself is deleted.
Automatic Expansion (Reactive)
Thespec.autoscaling object allows you to specify rules for automatically expanding volumes in the set. When a volume’s free space drops below a threshold, Control Plane expands it. The available options are:
maxCapacity: The largest allowable size (in GB) for any volume in the set.minFreePercentage: This must be a number between 1 and 100. When the free percentage on any volume drops below this threshold, Control Plane will issue anexpandVolumecommand automatically.scalingFactor: This must be a number 1. Applied as a multiplier when calculating the new capacity, providing headroom beyond the minimum needed to restoreminFreePercentage.
maxCapacity.
Example calculation: Suppose a 10 GB volume has 8 GB used (2 GB free, 20%), and the configuration is minFreePercentage: 20, scalingFactor: 2.
The volume expands to 20 GB (assuming this is
maxCapacity).
Volume Set with Reactive Autoscaling
Predictive Scaling
Reactive scaling responds to low free space after it happens. In most cases this is sufficient, but workloads that experience rapid surges in storage consumption can outpace reactive scaling — the volume fills up faster than the expansion can complete. Predictive scaling addresses this by projecting future usage and expanding volumes before they run low. It is a supplement to reactive scaling, not a replacement. On each evaluation cycle, Control Plane computes both a reactive target and a predictive target, then uses whichever is larger (capped atmaxCapacity). This means reactive scaling always acts as a safety net.
How It Works
When predictive scaling is enabled, Control Plane:- Queries volume usage over a configurable lookback window.
- Fits a linear regression to compute the average growth rate.
- Projects usage forward over a configurable projection window.
- Calculates a predictive target capacity using the same formula as reactive scaling, but substituting projected usage for current usage:
- Compares the predictive and reactive targets, and uses the larger of the two.
- The volume’s growth rate is below
minGrowthRateGBPerHour. - Fewer than
minDataPointsdata points are available in the lookback window, meaning the projection is not yet considered reliable.
Configuration
Add apredictive object inside autoscaling to enable predictive scaling:
When
predictive.enabled is true, the parent autoscaling.minFreePercentage and autoscaling.scalingFactor fields are required.Example
Volume Set with Predictive Scaling
Predictive target:
Control Plane compares the two targets: reactive (100 GB) vs. predictive (69 GB). Since reactive is larger, the volume expands to 100 GB (which also equals
maxCapacity in this configuration).
In a different scenario — say the volume still has plenty of free space but is growing rapidly — the predictive target could exceed the reactive target. The key principle is: whichever target is larger gets used, ensuring the volume is sized for both current needs and anticipated growth.
Snapshots
Snapshots can be taken at any time and (optionally) on a regular schedule. To set up automatic snapshotting, you may use thespec.snapshots object. Options include:
retentionDuration: The length of time to retain a newly created snapshot. This should be a floating point number followed by either d, h, or m (for day, hour or minute)schedule: A cron expression describing the snapshot frequency. Snapshots cannot be taken more frequently than once per hour.
File System Type
Currently supported file systems are:- ext4
- xfs
- shared
Mount Resources
For the shared file system only, you will be charged CPU and memory per mount point. Shared volumes must be mounted once per node.There will be at most one mount point per replica.
mountOptions property. e.g.
Resource Constraints
minCpuandmaxCpucan be at most 4000m apart- The ratio between
minCpuandmaxCpumust be at least 1:4 minMemoryandmaxMemorycan be at most 4096Mi apart- The ratio between
minMemoryandmaxMemorymust be at least 1:4
Performance Classes
Each volume set has a single, immutable, performance class. The performance class determines:- How many Megabytes per second can be transferred to and from the volume (MB/second)
- How many I/O operations can be processed per second. (IOPS)
- Read/write latency
Because these drives are served over the network, IOPS/throughput is limited per VM. The performance of individual drives will vary.
General-Purpose SSD
Name:general-purpose-ssd
Minimum Capacity: 10Gb
Maximum Capacity: 65536Gb
High-Throughput SSD
In general, IOPS/throughput capacity varies linearly with storage capacity. The values shown below are the maximum possible values, and may only be achievable with large volume sizes.
high-throughput-ssd
Minimum Capacity: 200Gb
Maximum Capacity: 65536Gb
Custom Encryption (AWS)
Control Plane encrypts all volumes by default. The custom encryption feature allows you to specify your own AWS KMS keys for encrypting volumes in a volume set, giving you complete control over the encryption keys used for your data.When to Use Custom Encryption
Use custom encryption when you need to:- Meet specific compliance or regulatory requirements that mandate customer-managed keys
- Maintain control over key lifecycle management (rotation, revocation, etc.)
- Use separate encryption keys for different environments or applications
- Integrate with existing key management workflows
Custom encryption is currently only available for AWS. Support for other cloud providers is not yet available.
Prerequisites
Before configuring custom encryption, you need:- An AWS KMS key in each region where you want to use custom encryption
- Appropriate KMS key policies configured for the KMS key to allow volume encryption
Required Key Policies
Your KMS key policy must permit to Control Plane to use the key for volume encryption. The policies below grant the necessary permissions. You must add these policies to any KMS key used with Control Plan volume sets.Configuration Schema
Custom encryption is configured in the volume setspec using the customEncryption object:
customEncryption.regions: An object mapping region names to encryption configurations{cloud-provider}-{region}: The region identifier in Control Plane format (e.g.,aws-us-east-1,aws-eu-west-1)keyId: The full ARN of the AWS KMS key to use for volumes in that region
Region Naming Format
Region names must follow the format:aws-{aws-region-name}
Examples:
aws-us-east-1for US East (N. Virginia)aws-us-west-2for US West (Oregon)aws-eu-west-1for EU (Ireland)aws-ap-southeast-1for Asia Pacific (Singapore)
Complete Example
Here’s a full example of a volume set with custom encryption configured for two AWS regions:Volume Set with Custom Encryption
Important Constraints
Key Immutability- Once a volume is created with a specific KMS key, the encryption key cannot be changed
- To use a different key, you must create new volumes
- Encryption keys are configured per region, not globally
- Each region can have its own KMS key
- If a region is not specified in
customEncryption.regions, volumes in that region will use AWS default encryption
- Custom encryption only works with traditional file systems:
ext4andxfs - The
sharedfile system does not support custom encryption
- This feature is for Control Plane-managed clusters only
- For BYOK clusters you have full control over your storage classes, and therefore the encryption method as well.
Commands
Volume sets support imperative operations on individual volumes and snapshots. Each one is an asynchronous command whose progress you can follow. To issue a command, send aPOST to the volume set’s -command endpoint. e.g. POST https://api.cpln.io/org/my-org/gvc/my-gvc/volumeset/my-volume-set/-command. These commands can also be created using the Control Plane console at https://console.cpln.io
Volume Expansion
Volumes can be expanded on-demand by issuing anexpandVolume command. A volume in use by a workload keeps serving: ext4 and xfs volumes are resized online, and shared volumes need no restart. If an online resize times out, the command either restarts the replica to finish the resize or reverts it, depending on the storage driver.
Volumes cannot be “expanded” to a smaller size.
expandVolume
Spec:- location
- volumeIndex
- newStorageCapacity
expandVolume Command
Volume Shrinkage
Volumes can be shrunk on-demand by issuing ashrinkVolume command. If the volume set is in-use by a workload, the corresponding workload replica will be restarted.
The shrinkVolume command provisions a new volume at the smaller size, copies the existing data to it, and swaps it in. If the copy fails, the volume keeps its original storage device and data.
The
shrinkVolume command is only available for ext4 and xfs filesystems. It is not supported for shared filesystems.shrinkVolume
Spec:- location
- volumeIndex
- newStorageCapacity
shrinkVolume Command
Volume Copy
AcopyVolume command copies one volume into another location of the same volume set, or into a volume of another volume set in the same org, including one in another GVC. The copy lands on the same volume index at the destination and replaces the volume there. The source volume is never modified.
copyVolume is only available for ext4 and xfs volume sets, on both ends. It is not supported for shared file systems.copyVolume
Spec:location: the location the volume is copied from. Required.volumeIndex: the index of the volume to copy. The copy replaces the volume at the same index at the destination. Required.targetLocation: the location the volume is copied to. Required.acknowledgeDestinationVolumeDeletion: must betrue. Confirms that the destination volume is replaced and its storage device deleted.targetVolumeSet: optional. A link to the volume set that receives the copy, in the same org. It defaults to the volume set the command is issued on. It accepts these forms://volumeset/VOLUME_SET: a volume set in the same GVC//gvc/GVC/volumeset/VOLUME_SET/org/ORG/gvc/GVC/volumeset/VOLUME_SET
copyVolume Command
copyVolume Command (another volume set)
Volume Copy
AcopyVolume command copies one volume into another location of the same volume set, or into a volume of another volume set in the same org, including one in another GVC. The copy lands on the same volume index at the destination and replaces the volume there. The source volume is never modified.
copyVolume is only available for ext4 and xfs volume sets, on both ends. It is not supported for shared file systems.copyVolume
Spec:location: the location the volume is copied from. Required.volumeIndex: the index of the volume to copy. The copy replaces the volume at the same index at the destination. Required.targetLocation: the location the volume is copied to. Required.acknowledgeDestinationVolumeDeletion: must betrue. Confirms that the destination volume is replaced and its storage device deleted.targetVolumeSet: optional. A link to the volume set that receives the copy, in the same org. It defaults to the volume set the command is issued on. It accepts these forms://volumeset/VOLUME_SET: a volume set in the same GVC//gvc/GVC/volumeset/VOLUME_SET/org/ORG/gvc/GVC/volumeset/VOLUME_SET
copyVolume Command
copyVolume Command (another volume set)
Copy Volume Rules
- Source: the volume must have a storage device. A replica using the source volume keeps running during the copy, so the copy isn’t crash-consistent. Stop the workload first if you need a consistent copy.
- Destination: the destination location doesn’t need a volume at that index yet; the copy creates it. The destination GVC must include
targetLocation. The destination volume ends up the same size as the source. - Same location: within one volume set,
targetLocationmust differ fromlocation. A same-location copy is allowed into another volume set, but only when both GVCs run on the same cluster in that location. - Destination workload: if a workload replica uses the destination volume, it keeps running on its old volume until the copy is committed. Control Plane then waits for all of the workload’s replicas to be ready, restarts that replica onto the copied volume, and deletes the old storage device.
- Permissions: the caller needs
exec.copyVolumeon both the source and target volume sets. - Conflicts: a copy conflicts with
restoreVolume,expandVolume,shrinkVolume,deleteVolume, and othercopyVolumecommands on the same volume, at either end. A snapshot of the source can run alongside it. AdeleteVolumeissued on either end while a copy runs isn’t refused: it marks the copyfailed.
Run a Volume Copy
- Console
- CLI
- API
- Open the source volume set and go to its Volumes page.
- In the Actions menu of the volume to copy, select Copy Volume. It is disabled when the volume has no storage device.
- Under Destination Volume Set, leave the field empty to copy into another location of this volume set, or pick any volume set in the org.
- Choose the Destination Location.
- Tick the acknowledgement that the destination volume will be replaced and its storage device deleted. If the destination is known to hold a storage device, also type the confirmation text shown.
- Select Copy. The copy’s progress shows in the Copy operations panel on the source volume set’s Volumes page. A destination in another volume set doesn’t list the copy.
Follow a Volume Copy
A copy is an asynchronous command. The APIPOST returns the created command, including its id. cpln volumeset copy doesn’t print the ID, so list the source volume set’s running commands to find it:
lifecycleStage is completed, cancelled, or failed:
status:
status.source.stage:capture-source,await-receiver,apply-source-egress,run-bulk-sync, thencleanup-k8s.status.target.stage:prepare-destination,apply-receiver,await-bulk-sync,commit-and-prepare-swap,shutdown-target-replica,await-target-replica-termination, thencleanup-k8s.shutdown-target-replicaandawait-target-replica-terminationare skipped when no workload replica uses the destination volume.- Either end’s stage is
failwhen that end has failed; the command is then cancelled (see Cancel a Volume Copy). status.source.messagesandstatus.target.messagesexplain what each end is doing or why it failed.status.bulkSyncProgressPercent,status.bulkSyncTransferredBytes,status.bulkSyncRateandstatus.bulkSyncEtareport the transfer’s progress. They refresh about every 10 seconds.
completed once both ends have finished and cleaned up.
Cancel a Volume Copy
A copy has no time limit. To stop one that is in progress or taking too long, request its cancellation. This needsexec.copyVolume on the source volume set:
commit-and-prepare-swap stage, when the volume set is pointed at the copied volume.
- Before the copy is committed: the new volume is deleted, and the destination keeps its original storage device.
- After the copy is committed: the volume set already points at the copied volume, so the copy is rolled forward. The destination replica is moved onto the copied volume, and the old storage device is deleted.
cancelled only after both ends have removed the temporary resources they created.
A copy that fails on its own also ends in
cancelled, not failed: a failing end cancels the command so that both ends clean up, with the same before- and after-commit outcomes. Read status.source.messages and status.target.messages for the reason. The source makes up to 3 bulk-sync attempts before it fails. A copy ends in failed only when a deleteVolume on either end overrides it.Copy Volume Errors
ThePOST is refused with 400, 403 or 409 when the copy can’t run. The messages include:
Volume Deletion
To delete a volume, issue adeleteVolume command.
deleteVolume
This command deletes the specified volume’s storage device. Note: the metadata for the volume at the specified index will not be removed from the volume set. Only your data will be deleted.Deleting an in-use volume
If the volume set is in-use by a workload, a new storage device may be immediately created. e.g. if the volume set is in-use by a workload with one replica, and you delete the volume at index 0, Control Plane will:- Create an empty volume to service the workload
- Delete the old volume as requested
- Restart the workload replica, binding it to the volume created in step 1.
deleteVolume Command
Snapshots
Each volume in a set has its own list of snapshots. You manipulate snapshots by issuing commands to the volume set.createVolumeSnapshot
Take a snapshot for a given volume (specified by location and volume index).snapshotName must be unique for the target volume.
Spec:
- location
- volumeIndex
- snapshotName
- snapshotExpirationDate
- tags
- Specify any key/value pair here.
createVolumeSnapshot Command
deleteVolumeSnapshot
Delete the specified snapshot. Spec:- location
- volumeIndex
- snapshotName
deleteVolumeSnapshot Command
restoreVolume
Restore the specified volume to one of its snapshots. If this volume set is in-use by a workload, the corresponding workload replica will restart. Spec:- location
- volumeIndex
- snapshotName
restoreVolume Command
BYOK Support
Volume sets are supported in BYOK locations as long as the following prerequisites are met:- The cluster must have a CSI-compatible storage driver installed.
-
You must create storage classes which use the CSI-compatible provisioner, with the following names:
general-purpose-ssd-ext4general-purpose-ssd-xfspremium-low-latency-ssd-ext4premium-low-latency-ssd-xfsgeneral-purpose-ssd-ext4-commandgeneral-purpose-ssd-xfs-commandpremium-low-latency-ssd-ext4-commandpremium-low-latency-ssd-xfs-command
Planned Features
- Automatic volume expansion.
Permissions
The permissions below are used to define policies together with one or more of the four principal types:exec doesn’t include exec.copyVolume or exec.shrinkVolume. Both destroy a storage device, so they must be granted explicitly or through manage.