From 0411064829e02ce521944daeeb060bb4f500909f Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Wed, 28 Jun 2017 10:23:51 -0700 Subject: [PATCH] Address requested changes --- docker-for-aws/persistent-data-volumes.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docker-for-aws/persistent-data-volumes.md b/docker-for-aws/persistent-data-volumes.md index d2cb159021..30ba2db34f 100644 --- a/docker-for-aws/persistent-data-volumes.md +++ b/docker-for-aws/persistent-data-volumes.md @@ -14,8 +14,8 @@ mode tasks and regular Docker containers can use a volume created with Cloudstor to mount a persistent data volume. In Docker for AWS, Cloudstor has two `backing` options: -- `relocatable` data volumes which are backed by EBS. -- `shared` data volumes which are backed by EFS. +- `relocatable` data volumes are backed by EBS. +- `shared` data volumes are backed by EFS. When you use the Docker CLI to create a swarm service along with the persistent volumes used by the service tasks, you can create three different types of @@ -132,11 +132,13 @@ The only option available for EFS is `perfmode`. You can set `perfmode` to `maxio` for high IO throughput: ```bash +{% raw %} $ docker service create \ --replicas 5 \ --name ping3 \ --mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol5,destination=/mydata,volume-opt=perfmode=maxio \ alpine ping docker.com +{% endraw %} ``` You can also create `shared` Cloudstor volumes using the @@ -163,11 +165,13 @@ the following volume options are available: Example usage: ```bash +{% raw %} $ docker service create \ --replicas 5 \ --name ping3 \ --mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol,destination=/mydata,volume-opt=backing=local,volume-opt=size=25,volume-opt=ebstype=gp2 \ alpine ping docker.com +{% endraw %} ``` The above example creates and mounts a distinct Cloudstor volume backed by 25 GB EBS @@ -186,7 +190,6 @@ IOPs is absolutely necessary. You can also create EBS backed volumes using the `docker volume create` CLI: ```bash -{% raw %} $ docker volume create \ -d "cloudstor:aws" \ --opt ebstype=io1 \ @@ -194,7 +197,6 @@ $ docker volume create \ --opt iops=1000 \ --opt backing=relocatable \ mylocalvol1 -{% endraw %} ``` Sharing the same `relocatable` Cloudstor volume across multiple tasks of a @@ -209,11 +211,13 @@ you already have too many EBS volumes or want to reduce the amount of time it takes to transfer volume data across availability zones. ```bash +{% raw %} $ docker service create \ --replicas 5 \ --name ping2 \ --mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol,destination=/mydata \ alpine ping docker.com +{% endraw %} ``` Here, each task has mounts its own volume at `/mydata/` and the files under that