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 stateful workload.
- 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
Caveats
The shared filesystem does not support:- snapshots
- certain commands:
createVolumeSnapshotdeleteVolumeSnapshotrestoreVolumedeleteVolumeshrinkVolume
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, but this causes data loss (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.
| Step | Calculation | Result |
|---|---|---|
| Current state | 8 GB used, 2 GB free | 20% free — threshold met |
| Minimum capacity for 20% free | 8 / (1 - 0.20) | 10 GB |
Apply scalingFactor | 10 2 | 20 GB |
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:
| Field | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable predictive scaling based on historical growth rates. |
lookbackHours | number | 24 | Hours of historical data to analyze for the growth rate calculation. Min: 1, Max: 168 (1 week). |
projectionHours | number | 6 | Hours into the future to project storage needs. Min: 1, Max: 72. |
minDataPoints | number | 10 | Minimum number of historical data points required before a projection is considered reliable. Prevents premature scaling decisions when insufficient data is available. Min: 2, Max: 100. |
minGrowthRateGBPerHour | number | 0.01 | Minimum growth rate (GB/hour) to trigger predictive expansion. Volumes growing slower than this rate will not trigger predictive scaling. |
scalingFactor | number | (inherited) | Scaling factor for predictive expansion. If not set, uses the parent autoscaling.scalingFactor. A lower value (e.g., 1.2) is recommended for gentler proactive scaling. Min: 1.1. |
When
predictive.enabled is true, the parent autoscaling.minFreePercentage and autoscaling.scalingFactor fields are required.Example
Volume Set with Predictive Scaling
| Step | Calculation | Result |
|---|---|---|
| Current state | 40 GB used, 10 GB free | 20% free — threshold met |
| Minimum capacity for 20% free | 40 / (1 - 0.20) | 50 GB |
Apply scalingFactor (2.0) | 50 2.0 | 100 GB |
| Step | Calculation | Result |
|---|---|---|
| Project usage 12 hours ahead | 40 + (0.5 12) | 46 GB |
| Minimum capacity for 20% free | 46 / (1 - 0.20) | 57.5 GB |
Apply predictive scalingFactor (1.2) | 57.5 1.2 | ⌈69⌉ = 69 GB |
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
| Service Provider | Max Throughput | Max IOPS |
|---|---|---|
| AWS | 125 MB/s | 3000 |
| GCP | 1200 MB/s | 80000 |
| Azure | 125 MB/s | 3000 |
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
| Service Provider | Max Throughput | Max IOPS |
|---|---|---|
| AWS | 400 MB/s | 4600 |
| GCP | 1200 MB/s | 100000 |
| Azure | 1200 MB/s | 15500 |
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. 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. If the volume set is in-use by a workload, the corresponding workload replica will be restarted.
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 is only available for ext4 and xfs filesystems. It is not supported for shared filesystems.shrinkVolume
Spec:- location
- volumeIndex
- newStorageCapacity
shrinkVolume Command
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:| Permission | Description | Implies |
|---|---|---|
| create | Create new volumesets | |
| delete | Delete existing volumesets | |
| edit | Modify existing volumesets | view |
| exec | Execute commands | exec.restoreVolume, exec.createVolumeSnapshot, exec.expandVolume, exec.deleteVolume, exec.deleteVolumeSnapshot, exec.shrinkVolume |
| exec.createVolumeSnapshot | Create a snapshot of a volume | |
| exec.deleteVolume | Delete a volume | |
| exec.deleteVolumeSnapshot | Delete a volume snapshot | |
| exec.expandVolume | Increase the storage capacity of a volume | |
| exec.restoreVolume | Restore a volume to a snapshot | |
| exec.shrinkVolume | Shrink a volume (causes data loss) | |
| manage | Full access | create, delete, edit, exec, exec.createVolumeSnapshot, exec.deleteVolume, exec.deleteVolumeSnapshot, exec.expandVolume, exec.restoreVolume, exec.shrinkVolume, manage, view |
| view | Read-only access |