Skip to main content

Using Volumes

Add ephemeral or persistent volume configuration to an application

For an example of adding an ephemeral volume configuration see Add ephemeral volume configuration to a service .

For an example of adding a persistent volume configuration see Add persistent volume configuration to a service .

List currently scheduled volumes

When run in the Control Tower, this command displays the summary of all volumes scheduled in the system with the information on the sites each volume is scheduled on and whether it is in use. When run on an edge site, this command only displays the volumes scheduled on this site.

supctl show volumes
- id: with-ephemeral-volume.cache-on-disk-1:cache-volume
sites:
- name: stockholm-sergel
type: ephemeral
size: 10 GB
used-by:
- application: with-ephemeral-volume
service-instance: cache-on-disk-1
- id: with-persistent-volume.persistent-storage-1:storage
sites:
- name: gothenburg-bergakungen
type: persistent
size: 10 GB
used-by:
- application: with-persistent-volume
service-instance: persistent-storage-1
- name: helsingborg-roda-kvarn
type: persistent
size: 10 GB

In the output above cache-volume is an ephemeral volume scheduled on stockholm-sergel by the application with-ephemeral-volume service instance cache-on-disk.

storage is a persistent volume scheduled on sites gothenburg-bergakungen (where it is used by application with-persistent-volume service instance persistent-storage-1) and helsingborg-roda-kvarn where it is unused.

Remove an unused persistent volume from a single site

An unused persistent volume may be removed from a specific site by an explicit action. Upon removal its data will be deleted. This is beneficial if the service is no longer expected to run on the site, or if the service needs to be allowed to be rescheduled to another host within the site at the expense of losing the persisted data.

supctl do volumes with-persistent-volume.persistent-storage-1:storage \
sites helsingborg-roda-kvarn delete

The action will succeed for any unused volume. If the site is not accessible, the deletion will be scheduled and the volume remains on the list until it is removed.

Removed an unused persistent volume from all sites

An unused persistent volume that is not going to be used in the future may be removed from all scheduled sites at once. For example, this may be helpful if the application using the volume is being decommissioned.

supctl do volumes with-persistent-volume.persistent-storage-1:storage \
delete-from-all-sites