# Cybus::Volume

A volume represents a storage space that can be associated with [containers](/2-1-2/documentation/services/service-commissioning-files/resources/cybus-container.md). Volumes allow data to be retained across service lifecycles, ensuring that files remain available even after services are disabled or removed.

{% hint style="warning" %}
This feature is only available in Docker Compose deployments of Connectware. It is not supported in Kubernetes deployments. Attempting to use this resource in a Kubernetes deployment will result in an error.
{% endhint %}

## Lifecycle of a Volume

* **Creation**: If the volume does not already exist when the service is enabled, Connectware automatically creates it.
* **Persistence**: Once created, Connectware will not delete or truncate the volume. Neither when disabling the service nor at any other time.
* **Manual cleanup**: Volumes remain in place even if services are installed, enabled, disabled, or removed. If you want to free up space, you must delete the volume manually.

This design ensures that volumes can be reused across different services and deployments, making them ideal for scenarios where persistent data storage is required.

## Relationship to Files

Service commissioning files can also specify [Cybus::File](/2-1-2/documentation/services/service-commissioning-files/resources/cybus-file.md) resources. These files are created inside the associated volume, allowing configuration or data files to be provisioned automatically during service setup.

## Example

{% code lineNumbers="true" %}

```yaml
myVolume:
  type: Cybus::Volume
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cybus.io/2-1-2/documentation/services/service-commissioning-files/resources/cybus-volume.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
