Managing backends

Creating a backend configuration

We have an entire backend configuration guide to help you with this.

Creating a backend

Once you have a backend configuration file, run:

tridentctl create backend -f <backend-file>

If backend creation fails, something was wrong with the backend configuration. You can view the logs to determine the cause by running:

tridentctl logs

Once you identify and correct the problem with the configuration file you can simply run the create command again.

Deleting a backend

Note

If Trident has provisioned volumes from this backend that still exist, deleting the backend will prevent new volumes from being provisioned by it but the backend will continue to exist and Trident will continue to manage those volumes until they are deleted.

To delete a backend from Trident, run:

# Retrieve the backend name
tridentctl get backend

tridentctl delete backend <backend-name>

Viewing the existing backends

To view the backends that Trident knows about, run:

# Summary
tridentctl get backend

# Full details
tridentctl get backend -o json

Identifying the storage classes that will use a backend

This is an example of the kind of questions you can answer with the JSON that tridentctl outputs for Trident backend objects. This uses the jq utility, which you may need to install first.

tridentctl get backend -o json | jq '[.items[] | {backend: .name, storageClasses: [.storage[].storageClasses]|unique}]'

Updating a backend

Once you have a new backend configuration file, run:

tridentctl update backend <backend-name> -f <backend-file>

If backend update fails, something was wrong with the backend configuration or you attempted an invalid update. You can view the logs to determine the cause by running:

tridentctl logs

Once you identify and correct the problem with the configuration file you can simply run the update command again.