sidebar | permalink | keywords | summary |
---|---|---|---|
sidebar |
trident-docker/volumes-docker.html |
create volumes, astra trident, trident for docker, docker, docker volume |
To create volumes, use the standard `docker volume` commands with the Astra Trident driver name specified when needed. |
You can easily create, clone, and remove volumes using the standard docker volume
commands with the Astra Trident driver name specified when needed.
-
Create a volume with a driver using the default name:
docker volume create -d netapp --name firstVolume
-
Create a volume with a specific Astra Trident instance:
docker volume create -d ntap_bronze --name bronzeVolume
NoteIf you do not specify any options, the defaults for the driver are used. -
Override the default volume size. See the following example to create a 20GiB volume with a driver:
docker volume create -d netapp --name my_vol --opt size=20G
TipVolume sizes are expressed as strings containing an integer value with optional units (example: 10G, 20GB, 3TiB). If no units are specified, the default is G. Size units can be expressed either as powers of 2 (B, KiB, MiB, GiB, TiB) or powers of 10 (B, KB, MB, GB, TB). Shorthand units use powers of 2 (G = GiB, T = TiB, …).
-
Remove the volume just like any other Docker volume:
docker volume rm firstVolume
ImportantWhen using the solidfire-san
driver, the above example deletes and purges the volume.
Perform the steps below to upgrade Astra Trident for Docker.
When using the ontap-nas
, ontap-san
, solidfire-san
, and gcp-cvs storage drivers
, Astra Trident can clone volumes. When using the ontap-nas-flexgroup
or ontap-nas-economy
drivers, cloning is not supported. Creating a new volume from an existing volume will result in a new snapshot being created.
-
Inspect the volume to enumerate snapshots:
docker volume inspect <volume_name>
-
Create a new volume from an existing volume. This will result in a new snapshot being created:
docker volume create -d <driver_name> --name <new_name> -o from=<source_docker_volume>
-
Create a new volume from an existing snapshot on a volume. This will not create a new snapshot:
docker volume create -d <driver_name> --name <new_name> -o from=<source_docker_volume> -o fromSnapshot=<source_snap_name>
docker volume inspect firstVolume [ { "Driver": "ontap-nas", "Labels": null, "Mountpoint": "/var/lib/docker-volumes/ontap-nas/netappdvp_firstVolume", "Name": "firstVolume", "Options": {}, "Scope": "global", "Status": { "Snapshots": [ { "Created": "2017-02-10T19:05:00Z", "Name": "hourly.2017-02-10_1505" } ] } } ] docker volume create -d ontap-nas --name clonedVolume -o from=firstVolume clonedVolume docker volume rm clonedVolume docker volume create -d ontap-nas --name volFromSnap -o from=firstVolume -o fromSnapshot=hourly.2017-02-10_1505 volFromSnap docker volume rm volFromSnap