Volume¶
A volume is an accessible storage area with a single file system, used to store persistent data created by and used by a single service or application:
- The contents of the volume lives outside the life cycle of the application or service: you don’t lose the data in a volume if an instance crashes or stops.
- You can reduce the size of your application or service by storing the data in a volume.
- It isn’t possible to share a volume between applications or services, not even between different instances of the same application or service.
- Object storage buckets are a good alternative if you want to share data storage between applications or services. You can even share buckets with other tenants, or outside the DSH.
Note
If you add a volume to a service definition, then you need to make sure that the service always runs on one instance only. You can achieve this by adding the following to your service definition:
"instances": 1,"singleInstance": true,
See Number of instances and single instance for more information.
Limits¶
The DSH imposes the following limits on volumes:
- Volume count: The maximum number of volumes that your tenant can use across all its services and applications.
- Total size: The maximum value for the sum of all your volumes’ unit sizes.
- Unit size: The maximum capacity of a single unit inside your tenant.
You can request new limits:
- Click “Resources” > “Overview” in the menu bar of the DSH Console.
- Under “Volumes”, click the “Request” button for the limit that you want to change.
- Fill out the desired value and click “Request”. A platform administrator will process your request, which appears as a ticket in the Support Portal.
Managing volumes¶
You can manage your volumes in the DSH Console.
Tip
You can also use endpoints in the Tenant Management API to manage volumes.
Adding a volume¶
Take the following steps to add a new volume:
- Click “Resources” > “Volumes” in the menu bar of the DSH Console.
- Click the “+ Volume” button to add a new volume. Fill out the following fields:
- Volume name: Enter a name that’s unique in your tenant
- Volume size: Enter a size. Make sure that the size is within the volume limits for your tenant.
- Click “Create volume” to add the volume.
Note
- You can’t change the size of a volume once it’s created, so make sure that you choose an appropriate size for your volume when you create it.
- The DSH deviates from Docker when mounting a volume over existing data. If you mount a volume into a directory in the container that already contains files and directories, then the mount always obscures these pre-existing files.
Deleting a volume¶
Take the following steps to delete an existing volume:
- Click “Resources” > “Volumes” in the menu bar of the DSH Console.
- Click the “Delete” button next to a volume to remove it.
Note
It isn’t possible to delete a volume if a service is using it. You can find the name of the service in question in the column “Derived from”.
Checking size and limits¶
You can check the size of a volume and the limits in two places:
- You can find the “Volume count”, “Total size”, and “Unit size” by clicking “Resources” in the menu bar of the DSH Console. The values appear under “Volumes”.
- You can find the unit size and available space by clicking “Resources” > “Volumes” in the menu bar of the DSH Console.