Browse code

Merge pull request #22990 from thaJeztah/docs-cherry-picks

Docs cherry picks (2016-05-25)

Sven Dowideit authored on 2016/05/26 05:25:05
Showing 19 changed files
... ...
@@ -1,17 +1,8 @@
1
-FROM docs/base:latest
1
+FROM docs/base:oss
2 2
 MAINTAINER Mary Anthony <mary@docker.com> (@moxiegirl)
3 3
 
4
-RUN svn checkout https://github.com/docker/compose/trunk/docs /docs/content/compose
5
-RUN svn checkout https://github.com/docker/swarm/trunk/docs /docs/content/swarm
6
-RUN svn checkout https://github.com/docker/machine/trunk/docs /docs/content/machine
7
-RUN svn checkout https://github.com/docker/distribution/trunk/docs /docs/content/registry
8
-RUN svn checkout https://github.com/docker/notary/trunk/docs /docs/content/notary
9
-RUN svn checkout https://github.com/docker/kitematic/trunk/docs /docs/content/kitematic
10
-RUN svn checkout https://github.com/docker/toolbox/trunk/docs /docs/content/toolbox
11
-RUN svn checkout https://github.com/docker/opensource/trunk/docs /docs/content/opensource
12
-
13 4
 ENV PROJECT=engine
14 5
 # To get the git info for this repo
15 6
 COPY . /src
16
-
7
+RUN rm -r /docs/content/$PROJECT/
17 8
 COPY . /docs/content/$PROJECT/
... ...
@@ -24,9 +24,8 @@ HUGO_BASE_URL=$(shell test -z "$(DOCKER_IP)" && echo localhost || echo "$(DOCKER
24 24
 HUGO_BIND_IP=0.0.0.0
25 25
 
26 26
 GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
27
-DOCKER_IMAGE := docker$(if $(GIT_BRANCH),:$(GIT_BRANCH))
28
-DOCKER_DOCS_IMAGE := docs-base$(if $(GIT_BRANCH),:$(GIT_BRANCH))
29
-
27
+GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g")
28
+DOCKER_DOCS_IMAGE := docker-docs$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN))
30 29
 
31 30
 DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
32 31
 
... ...
@@ -84,10 +84,9 @@ Because of which, the driver specific log tag options `syslog-tag`, `gelf-tag` a
84 84
 ### LXC built-in exec driver
85 85
 **Deprecated In Release: v1.8**
86 86
 
87
-**Target For Removal In Release: v1.10**
87
+**Removed In Release: v1.10**
88 88
 
89
-The built-in LXC execution driver is deprecated for an external implementation.
90
-The lxc-conf flag and API fields will also be removed.
89
+The built-in LXC execution driver, the lxc-conf flag, and API fields have been removed.
91 90
 
92 91
 ### Old Command Line Options
93 92
 **Deprecated In Release: [v1.8.0](https://github.com/docker/docker/releases/tag/v1.8.0)**
... ...
@@ -60,7 +60,7 @@ Plugin
60 60
 [Keywhiz plugin](https://github.com/calavera/docker-volume-keywhiz)                 | A plugin that provides credentials and secret management using Keywhiz as a central repository.
61 61
 [Local Persist Plugin](https://github.com/CWSpear/local-persist)                    | A volume plugin that extends the default `local` driver's functionality by allowing you specify a mountpoint anywhere on the host, which enables the files to *always persist*, even if the volume is removed via `docker volume rm`.
62 62
 [NetApp Plugin](https://github.com/NetApp/netappdvp) (nDVP)                         | A volume plugin that provides direct integration with the Docker ecosystem for the NetApp storage portfolio. The nDVP package supports the provisioning and management of storage resources from the storage platform to Docker hosts, with a robust framework for adding additional platforms in the future.
63
-[Netshare plugin](https://github.com/gondor/docker-volume-netshare)                 | A volume plugin that provides volume management for NFS 3/4, AWS EFS and CIFS file systems.
63
+[Netshare plugin](https://github.com/ContainX/docker-volume-netshare)                 | A volume plugin that provides volume management for NFS 3/4, AWS EFS and CIFS file systems.
64 64
 [OpenStorage Plugin](https://github.com/libopenstorage/openstorage)                 | A cluster-aware volume plugin that provides volume management for file and block storage solutions.  It implements a vendor neutral specification for implementing extensions such as CoS, encryption, and snapshots. It has example drivers based on FUSE, NFS, NBD and EBS to name a few.
65 65
 [Quobyte Volume Plugin](https://github.com/quobyte/docker-volume)                   | A volume plugin that connects Docker to [Quobyte](http://www.quobyte.com/containers)'s data center file system, a general-purpose scalable and fault-tolerant storage platform.
66 66
 [REX-Ray plugin](https://github.com/emccode/rexray)                                 | A volume plugin which is written in Go and provides advanced storage functionality for many platforms including VirtualBox, EC2, Google Compute Engine, OpenStack, and EMC.
... ...
@@ -186,7 +186,7 @@ You can uninstall the Docker software with `dnf`.
186 186
 
187 187
 1. List the package you have installed.
188 188
 
189
-		$ dnf list installed | grep docker dnf list installed | grep docker
189
+		$ dnf list installed | grep docker
190 190
 		docker-engine.x86_64     1.7.1-0.1.fc21 @/docker-engine-1.7.1-0.1.fc21.el7.x86_64
191 191
 
192 192
 2. Remove the package.
... ...
@@ -361,7 +361,16 @@ RUN /bin/bash -c 'source $HOME/.bashrc ; echo $HOME'
361 361
 > This means that normal shell processing does not happen. For example,
362 362
 > `RUN [ "echo", "$HOME" ]` will not do variable substitution on `$HOME`.
363 363
 > If you want shell processing then either use the *shell* form or execute
364
-> a shell directly, for example: `RUN [ "sh", "-c", "echo", "$HOME" ]`.
364
+> a shell directly, for example: `RUN [ "sh", "-c", "echo $HOME" ]`.
365
+>
366
+> **Note**:
367
+> In the *JSON* form, it is necessary to escape backslashes. This is
368
+> particularly relevant on Windows where the backslash is the path seperator.
369
+> The following line would otherwise be treated as *shell* form due to not
370
+> being valid JSON, and fail in an unexpected way:
371
+> `RUN ["c:\windows\system32\tasklist.exe"]`
372
+> The correct syntax for this example is:
373
+> `RUN ["c:\\windows\\system32\\tasklist.exe"]`
365 374
 
366 375
 The cache for `RUN` instructions isn't invalidated automatically during
367 376
 the next build. The cache for an instruction like
... ...
@@ -28,7 +28,7 @@ detached  process.
28 28
 To stop a container, use `CTRL-c`. This key sequence sends `SIGKILL` to the
29 29
 container. If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to
30 30
 the container. You can detach from a container and leave it running using the
31
-using `CTRL-p CTRL-q` key sequence.
31
+ `CTRL-p CTRL-q` key sequence.
32 32
 
33 33
 > **Note:**
34 34
 > A process running as PID 1 inside a container is treated specially by
... ...
@@ -298,6 +298,9 @@ accessed like regular environment variables in the `RUN` instruction of the
298 298
 Dockerfile. Also, these values don't persist in the intermediate or final images
299 299
 like `ENV` values do.
300 300
 
301
+Using this flag will not alter the output you see when the `ARG` lines from the
302
+Dockerfile are echoed during the build process.
303
+
301 304
 For detailed information on using `ARG` and `ENV` instructions, see the
302 305
 [Dockerfile reference](../builder.md).
303 306
 
... ...
@@ -81,7 +81,17 @@ you must be explicit with a relative or absolute path, for example:
81 81
     `/path/to/file:name.txt` or `./file:name.txt`
82 82
 
83 83
 It is not possible to copy certain system files such as resources under
84
-`/proc`, `/sys`, `/dev`, and mounts created by the user in the container.
84
+`/proc`, `/sys`, `/dev`, [tmpfs](run.md#mount-tmpfs-tmpfs), and mounts created by
85
+the user in the container. However, you can still copy such files by manually
86
+running `tar` in `docker exec`. For example (consider `SRC_PATH` and `DEST_PATH`
87
+are directories):
88
+
89
+    $ docker exec foo tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | tar Cxf DEST_PATH -
90
+
91
+or
92
+
93
+    $ tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | docker exec -i foo tar Cxf DEST_PATH -
94
+
85 95
 
86 96
 Using `-` as the `SRC_PATH` streams the contents of `STDIN` as a tar archive.
87 97
 The command extracts the content of the tar to the `DEST_PATH` in container's
... ...
@@ -27,6 +27,15 @@ can `pull` and try without needing to define and configure your own.
27 27
 To download a particular image, or set of images (i.e., a repository),
28 28
 use `docker pull`.
29 29
 
30
+## Proxy configuration
31
+
32
+If you are behind a HTTP proxy server, for example in corporate settings,
33
+before open a connect to registry, you may need to configure the Docker
34
+daemon's proxy settings, using the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`
35
+environment variables. To set these environment variables on a host using
36
+`systemd`, refer to the [control and configure Docker with systemd](../../admin/systemd.md#http-proxy)
37
+for variables configuration.
38
+
30 39
 ## Examples
31 40
 
32 41
 ### Pull an image from Docker Hub
... ...
@@ -227,12 +227,12 @@ system's interfaces.
227 227
 This sets simple (non-array) environmental variables in the container. For
228 228
 illustration all three
229 229
 flags are shown here. Where `-e`, `--env` take an environment variable and
230
-value, or if no `=` is provided, then that variable's current value is passed
231
-through (i.e. `$MYVAR1` from the host is set to `$MYVAR1` in the container).
232
-When no `=` is provided and that variable is not defined in the client's
233
-environment then that variable will be removed from the container's list of
234
-environment variables.
235
-All three flags, `-e`, `--env` and `--env-file` can be repeated.
230
+value, or if no `=` is provided, then that variable's current value, set via
231
+`export`, is passed through (i.e. `$MYVAR1` from the host is set to `$MYVAR1`
232
+in the container). When no `=` is provided and that variable is not defined
233
+in the client's environment then that variable will be removed from the
234
+container's list of environment variables. All three flags, `-e`, `--env` and
235
+`--env-file` can be repeated.
236 236
 
237 237
 Regardless of the order of these three flags, the `--env-file` are processed
238 238
 first, and then `-e`, `--env` flags. This way, the `-e` or `--env` will
... ...
@@ -612,15 +612,12 @@ with the same logic -- if the original volume was specified with a name it will
612 612
 
613 613
 
614 614
 You can override the default labeling scheme for each container by specifying
615
-the `--security-opt` flag. For example, you can specify the MCS/MLS level, a
616
-requirement for MLS systems. Specifying the level in the following command
615
+the `--security-opt` flag. Specifying the level in the following command
617 616
 allows you to share the same content between containers.
618 617
 
619 618
     $ docker run --security-opt label=level:s0:c100,c200 -it fedora bash
620 619
 
621
-An MLS example might be:
622
-
623
-    $ docker run --security-opt label=level:TopSecret -it rhel7 bash
620
+> **Note**: Automatic translation of MLS labels is not currently supported.
624 621
 
625 622
 To disable the security labeling for this container versus running with the
626 623
 `--permissive` flag, use the following command:
... ...
@@ -1433,7 +1430,7 @@ The `host-src` can either be an absolute path or a `name` value. If you
1433 1433
 supply an absolute path for the `host-dir`, Docker bind-mounts to the path
1434 1434
 you specify. If you supply a `name`, Docker creates a named volume by that `name`.
1435 1435
 
1436
-A `name` value must start with start with an alphanumeric character,
1436
+A `name` value must start with an alphanumeric character,
1437 1437
 followed by `a-z0-9`, `_` (underscore), `.` (period) or `-` (hyphen).
1438 1438
 An absolute path starts with a `/` (forward slash).
1439 1439
 
... ...
@@ -22,7 +22,7 @@ times but with different values, newer labels overwrite previous labels. Docker
22 22
 uses the last `key=value` you supply.
23 23
 
24 24
 >**Note:** Support for daemon-labels was added in Docker 1.4.1. Labels on
25
->containers and images are new in Docker 1.6.0
25
+>containers and images were added in Docker 1.6.0
26 26
 
27 27
 ## Label keys (namespaces)
28 28
 
... ...
@@ -57,7 +57,7 @@ docker0   Link encap:Ethernet  HWaddr 02:42:47:bc:3a:eb
57 57
           RX bytes:1100 (1.1 KB)  TX bytes:648 (648.0 B)
58 58
 ```
59 59
 
60
-The `none` network adds a container to a container-specific network stack. That container lacks a network interface. Attaching to such a container and looking at it's stack you see this:
60
+The `none` network adds a container to a container-specific network stack. That container lacks a network interface. Attaching to such a container and looking at its stack you see this:
61 61
 
62 62
 ```
63 63
 $ docker attach nonenetcontainer
... ...
@@ -289,7 +289,7 @@ examine its networking stack:
289 289
 $ docker attach container2
290 290
 ```
291 291
 
292
-If you look a the container's network stack you should see two Ethernet interfaces, one for the default bridge network and one for the `isolated_nw` network.
292
+If you look at the container's network stack you should see two Ethernet interfaces, one for the default bridge network and one for the `isolated_nw` network.
293 293
 
294 294
 ```bash
295 295
 / # ifconfig
... ...
@@ -212,7 +212,7 @@ a `direct-lvm` configuration.
212 212
 > and have images you want to keep, `push` them Docker Hub or your private
213 213
 > Docker Trusted Registry before attempting this procedure.
214 214
 
215
-The procedure below will create a 90GB data volume and 4GB metadata volume to
215
+The procedure below will create a logical volume configured as a thin pool to
216 216
 use as backing for the storage pool. It assumes that you have a spare block
217 217
 device at `/dev/xvdf` with enough free space to complete the task. The device
218 218
 identifier and volume sizes may be be different in your environment and you
... ...
@@ -221,106 +221,146 @@ assumes that the Docker daemon is in the `stopped` state.
221 221
 
222 222
 1. Log in to the Docker host you want to configure and stop the Docker daemon.
223 223
 
224
-2. If it exists, delete your existing image store by removing the
225
-`/var/lib/docker` directory.
224
+2. Install the LVM2 package.
225
+	The LVM2 package includes the userspace toolset that provides logical volume
226
+	management facilities on linux.
227
+
228
+3. Create a physical volume replacing `/dev/xvdf` with your block device.
226 229
 
227 230
 	```bash
228
-	$ sudo rm -rf /var/lib/docker
231
+	$ pvcreate /dev/xvdf
229 232
 	```
230 233
 
231
-3. Create an LVM physical volume (PV) on your spare block device using the
232
-`pvcreate` command.
234
+4. Create a 'docker' volume group.
233 235
 
234 236
 	```bash
235
-	$ sudo pvcreate /dev/xvdf
236
-	Physical volume `/dev/xvdf` successfully created
237
+	$ vgcreate docker /dev/xvdf
237 238
 	```
238 239
 
239
-	The device identifier may be different on your system. Remember to substitute
240
-	your value in the command above. If your host is running on AWS EC2, you may
241
-	need to install `lvm2` and <a href="http://goo.gl/Q5pUwG"
242
-	target="_blank">attach an EBS device</a> to use this procedure.
240
+5. Create a thin pool named `thinpool`.
243 241
 
244
-4. Create a new volume group (VG) called `vg-docker` using the PV created in
245
-the previous step.
242
+	In this example, the data logical is 95% of the 'docker' volume group size.
243
+	Leaving this free space allows for auto expanding of either the data or
244
+	metadata if space runs low as a temporary stopgap.
246 245
 
247 246
 	```bash
248
-	$ sudo vgcreate vg-docker /dev/xvdf
249
-	Volume group `vg-docker` successfully created
247
+	$ lvcreate --wipesignatures y -n thinpool docker -l 95%VG
248
+	$ lvcreate --wipesignatures y -n thinpoolmeta docker -l 1%VG
250 249
 	```
251 250
 
252
-5. Create a new 90GB logical volume (LV) called `data` from space in the
253
-`vg-docker` volume group.
251
+6. Convert the pool to a thin pool.
254 252
 
255 253
 	```bash
256
-	$ sudo lvcreate -L 90G -n data vg-docker
257
-	Logical volume `data` created.
254
+	$ lvconvert -y --zero n -c 512K --thinpool docker/thinpool --poolmetadata docker/thinpoolmeta
255
+	```
256
+
257
+7. Configure autoextension of thin pools via an `lvm` profile.
258
+
259
+	```bash
260
+	$ vi /etc/lvm/profile/docker-thinpool.profile
261
+	```
262
+
263
+8. Specify 'thin_pool_autoextend_threshold' value.
264
+
265
+	The value should be the percentage of space used before `lvm` attempts
266
+	to autoextend the available space (100 = disabled).
267
+
268
+	```
269
+	thin_pool_autoextend_threshold = 80
270
+	```
271
+
272
+9. Modify the `thin_pool_autoextend_percent` for when thin pool autoextension occurs.
273
+
274
+	The value's setting is the perentage of space to increase the thin pool (100 =
275
+	disabled)
276
+
258 277
 	```
278
+	thin_pool_autoextend_percent = 20
279
+	```
280
+
281
+10. Check your work, your `docker-thinpool.profile` file should appear similar to the following:
259 282
 
260
-	The command creates an LVM logical volume called `data` and an associated
261
-	block device file at `/dev/vg-docker/data`. In a later step, you instruct the
262
-	`devicemapper` storage driver to use this block device to store image and
263
-	container data.
283
+	An example `/etc/lvm/profile/docker-thinpool.profile` file:
264 284
 
265
-	If you receive a signature detection warning, make sure you are working on
266
-	the correct devices before continuing. Signature warnings indicate that the
267
-	device you're working on is currently in use by LVM or has been used by LVM in
268
-	the past.
285
+	```
286
+	activation {
287
+		thin_pool_autoextend_threshold=80
288
+		thin_pool_autoextend_percent=20
289
+	}
290
+	```
291
+
292
+11. Apply your new lvm profile
293
+
294
+	```bash
295
+	$ lvchange --metadataprofile docker-thinpool docker/thinpool
296
+	```
269 297
 
270
-6. Create a new logical volume (LV) called `metadata` from space in the
271
-`vg-docker` volume group.
298
+12. Verify the `lv` is monitored.
272 299
 
273 300
 	```bash
274
-	$ sudo lvcreate -L 4G -n metadata vg-docker
275
-	Logical volume `metadata` created.
301
+	$ lvs -o+seg_monitor
276 302
 	```
277 303
 
278
-	This creates an LVM logical volume called `metadata` and an associated
279
-	block device file at `/dev/vg-docker/metadata`. In the next step you instruct
280
-	the `devicemapper` storage driver to use this block device to store image and
281
-	container metadata.
304
+13. If the Docker daemon was previously started, clear your graph driver directory.
305
+
306
+	Clearing your graph driver removes any images, containers, and volumes in your
307
+	Docker installation.
282 308
 
283
-7. Start the Docker daemon with the `devicemapper` storage driver and the
284
-`--storage-opt` flags.
309
+	```bash
310
+	$ rm -rf /var/lib/docker/*
311
+	```
285 312
 
286
-	The `data` and `metadata` devices that you pass to the `--storage-opt`
287
-	options were created in the previous steps.
313
+14. Configure the Docker daemon with specific devicemapper options.
314
+
315
+	There are two ways to do this. You can set options on the commmand line if you start the daemon there:
288 316
 
289 317
 	```bash
290
-	$ sudo docker daemon --storage-driver=devicemapper --storage-opt dm.datadev=/dev/vg-docker/data --storage-opt dm.metadatadev=/dev/vg-docker/metadata &
291
-	[1] 2163
292
-	[root@ip-10-0-0-75 centos]# INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
293
-	INFO[0027] Option DefaultDriver: bridge
294
-	INFO[0027] Option DefaultNetwork: bridge
295
-	<-- output truncated -->
296
-	INFO[0027] Daemon has completed initialization
297
-	INFO[0027] Docker daemon commit=1b09a95 graphdriver=aufs version=1.11.0-dev
318
+	--storage-driver=devicemapper --storage-opt=dm.thinpooldev=/dev/mapper/docker-thinpool --storage-opt dm.use_deferred_removal=true
298 319
 	```
299 320
 
300
-	It is also possible to set the `--storage-driver` and `--storage-opt` flags
301
-	in the Docker config file and start the daemon normally using the `service` or
302
-	`systemd` commands.
321
+	You can also set them for startup in the `daemon.json` configuration, for example:
322
+
323
+	```json
324
+	 {
325
+		 "storage-driver": "devicemapper",
326
+		 "storage-opts": [
327
+			 "dm.thinpooldev=/dev/mapper/docker-thinpool",
328
+			 "dm.use_deferred_removal=true"
329
+		 ]
330
+	 }
331
+	```
303 332
 
304
-8. Use the `docker info` command to verify that the daemon is using `data` and
305
-`metadata` devices you created.
333
+15. If using systemd and modifying the daemon configuration via unit or drop-in file, reload systemd to scan for changes.
306 334
 
307 335
 	```bash
308
-	$ sudo docker info
309
-	INFO[0180] GET /v1.20/info
310
-	Containers: 0
311
-	Images: 0
312
-	Storage Driver: devicemapper
313
-	 Pool Name: docker-202:1-1032-pool
314
-	 Pool Blocksize: 65.54 kB
315
-	 Backing Filesystem: xfs
316
-	 Data file: /dev/vg-docker/data
317
-	 Metadata file: /dev/vg-docker/metadata
318
-	[...]
336
+	$ systemctl daemon-reload
319 337
 	```
320 338
 
321
-	The output of the command above shows the storage driver as `devicemapper`.
322
-	The last two lines also confirm that the correct devices are being used for
323
-	the `Data file` and the `Metadata file`.
339
+16. Start the Docker daemon.
340
+
341
+	```bash
342
+	$ systemctl start docker
343
+	```
344
+
345
+After you start the Docker daemon, ensure you monitor your thin pool and volume
346
+group free space. While the volume group will auto-extend, it can still fill
347
+up. To monitor logical volumes, use `lvs` without options or `lvs -a` to see tha
348
+data and metadata sizes. To monitor volume group free space, use the `vgs` command.
349
+
350
+Logs can show the auto-extension of the thin pool when it hits the threshold, to
351
+view the logs use:
352
+
353
+```bash
354
+$ journalctl -fu dm-event.service
355
+```
356
+
357
+If you run into repeated problems with thin pool, you can use the
358
+`dm.min_free_space` option to tune the Engine behavior. This value ensures that
359
+operations fail with a warning when the free space is at or near the minimum.
360
+For information, see <a
361
+href="../../../reference/commandline/daemon/#storage-driver-options"
362
+target="_blank">the storage driver options in the Engine daemon reference</a>.
363
+
324 364
 
325 365
 ### Examine devicemapper structures on the host
326 366
 
... ...
@@ -329,20 +369,20 @@ You can use the `lsblk` command to see the device files created above and the
329 329
 
330 330
 ```bash
331 331
 $ sudo lsblk
332
-NAME                       MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
333
-xvda                       202:0    0    8G  0 disk
334
-└─xvda1                    202:1    0    8G  0 part /
335
-xvdf                       202:80   0   10G  0 disk
336
-├─vg--docker-data          253:0    0   90G  0 lvm
337
-│ └─docker-202:1-1032-pool 253:2    0   10G  0 dm
338
-└─vg--docker-metadata      253:1    0    4G  0 lvm
339
-  └─docker-202:1-1032-pool 253:2    0   10G  0 dm
332
+NAME			   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
333
+xvda			   202:0	0	 8G  0 disk
334
+└─xvda1			   202:1	0	 8G  0 part /
335
+xvdf			   202:80	0	10G  0 disk
336
+├─vg--docker-data		   253:0	0	90G  0 lvm
337
+│ └─docker-202:1-1032-pool 253:2	0	10G  0 dm
338
+└─vg--docker-metadata	   253:1	0	 4G  0 lvm
339
+  └─docker-202:1-1032-pool 253:2	0	10G  0 dm
340 340
 ```
341 341
 
342 342
 The diagram below shows the image from prior examples updated with the detail
343 343
 from the `lsblk` command above.
344 344
 
345
-![](http://farm1.staticflickr.com/703/22116692899_0471e5e160_b.jpg)
345
+![](images/lsblk-diagram.jpg)
346 346
 
347 347
 In the diagram, the pool is named `Docker-202:1-1032-pool` and spans the `data`
348 348
 and `metadata` devices created earlier. The `devicemapper` constructs the pool
... ...
@@ -371,7 +411,8 @@ capacity.
371 371
 
372 372
 ### For a loop-lvm configuration
373 373
 
374
-In this scenario, the thin pool is configured to use `loop-lvm` mode. To show the specifics of the existing configuration use `docker info`:
374
+In this scenario, the thin pool is configured to use `loop-lvm` mode. To show
375
+the specifics of the existing configuration use `docker info`:
375 376
 
376 377
 ```bash
377 378
 $ sudo docker info
... ...
@@ -426,12 +467,10 @@ The `Data Space` values show that the pool is 100GB total. This example extends
426 426
 3. Verify the file size changed.
427 427
 
428 428
 	```bash
429
-	$ sudo ls -al /var/lib/docker/devicemapper/devicemapper/
430
-	total 1175492
431
-	drwx------ 2 root root         4096 Mar 29 02:45 .
432
-	drwx------ 5 root root         4096 Mar 29 02:48 ..
433
-	-rw------- 1 root root 214748364800 Mar 31 11:20 data
434
-	-rw------- 1 root root   2147483648 Mar 31 11:17 metadata
429
+	$ sudo ls -lh /var/lib/docker/devicemapper/devicemapper/
430
+	total 1.2G
431
+	-rw------- 1 root root 200G Apr 14 08:47 data
432
+	-rw------- 1 root root 2.0G Apr 19 13:27 metadata
435 433
 	```
436 434
 
437 435
 4. Reload data loop device
... ...
@@ -448,23 +487,35 @@ The `Data Space` values show that the pool is 100GB total. This example extends
448 448
 
449 449
 	a. Get the pool name first.
450 450
 
451
-		$ sudo dmsetup status docker-8:1-123141-pool: 0 209715200 thin-pool 91
452
-		422/524288 18338/1638400 - rw discard_passdown queue_if_no_space -
451
+	```bash
452
+	$ sudo dmsetup status | grep pool
453
+	docker-8:1-123141-pool: 0 209715200 thin-pool 91
454
+	422/524288 18338/1638400 - rw discard_passdown queue_if_no_space -
455
+	```
453 456
 
454
-		The name is the string before the colon.
457
+	The name is the string before the colon.
455 458
 
456
- 	b. Dump the device mapper table first.
459
+	b. Dump the device mapper table first.
457 460
 
458
-		$ sudo dmsetup table docker-8:1-123141-pool
459
-		0 209715200 thin-pool 7:1 7:0 128 32768 1 skip_block_zeroing
461
+	```bash
462
+	$ sudo dmsetup table docker-8:1-123141-pool
463
+	0 209715200 thin-pool 7:1 7:0 128 32768 1 skip_block_zeroing
464
+	```
460 465
 
461 466
 	c. Calculate the real total sectors of the thin pool now.
462 467
 
463
-		Change the second number of the table info (i.e. the disk end sector) to reflect the new number of 512 byte sectors in the disk. For example, as the new loop size is 200GB, change the second number to 419430400.
468
+	Change the second number of the table info (i.e. the disk end sector) to
469
+	reflect the new number of 512 byte sectors in the disk. For example, as the
470
+	new loop size is 200GB, change the second number to 419430400.
471
+
464 472
 
465 473
 	d. Reload the thin pool with the new sector number
466 474
 
467
-		$ sudo dmsetup suspend docker-8:1-123141-pool && sudo dmsetup reload docker-8:1-123141-pool --table '0 419430400 thin-pool 7:1 7:0 128 32768 1 skip_block_zeroing' && sudo dmsetup resume docker-8:1-123141-pool
475
+	```bash
476
+	$ sudo dmsetup suspend docker-8:1-123141-pool \
477
+	    && sudo dmsetup reload docker-8:1-123141-pool --table '0 419430400 thin-pool 7:1 7:0 128 32768 1 skip_block_zeroing' \
478
+	    && sudo dmsetup resume docker-8:1-123141-pool
479
+	```
468 480
 
469 481
 #### The device_tool
470 482
 
... ...
@@ -506,29 +557,39 @@ disk partition.
506 506
 
507 507
 	a. Get the pool name.
508 508
 
509
-		$ sudo dmsetup status | grep pool
510
-		docker-253:17-1835016-pool: 0 96460800 thin-pool 51593 6270/1048576 701943/753600 - rw no_discard_passdown queue_if_no_space
509
+	```bash
510
+	$ sudo dmsetup status | grep pool
511
+	docker-253:17-1835016-pool: 0 96460800 thin-pool 51593 6270/1048576 701943/753600 - rw no_discard_passdown queue_if_no_space
512
+	```
511 513
 
512
-		The name is the string before the colon.
514
+	The name is the string before the colon.
513 515
 
514 516
 	b. Dump the device mapper table.
515 517
 
516
-		$ sudo dmsetup table docker-253:17-1835016-pool
517
-		0 96460800 thin-pool 252:0 252:1 128 32768 1 skip_block_zeroing
518
+	```bash
519
+	$ sudo dmsetup table docker-253:17-1835016-pool
520
+	0 96460800 thin-pool 252:0 252:1 128 32768 1 skip_block_zeroing
521
+	```
518 522
 
519 523
 	c. Calculate the real total sectors of the thin pool now. we can use `blockdev` to get the real size of data lv.
520 524
 
521
-		Change the second number of the table info (i.e. the disk end sector) to
522
-		reflect the new number of 512 byte sectors in the disk. For example, as the
523
-		new data `lv` size is `264132100096` bytes, change the second number to
524
-		`515883008`.
525
+	Change the second number of the table info (i.e. the number of sectors) to
526
+	reflect the new number of 512 byte sectors in the disk. For example, as the
527
+	new data `lv` size is `264132100096` bytes, change the second number to
528
+	`515883008`.
525 529
 
526
-		$ sudo blockdev --getsize64 /dev/vg-docker/data
527
-		264132100096
530
+	```bash
531
+	$ sudo blockdev --getsize64 /dev/vg-docker/data
532
+	264132100096
533
+	```
528 534
 
529 535
 	d. Then reload the thin pool with the new sector number.
530 536
 
531
-		$ sudo dmsetup suspend docker-253:17-1835016-pool && sudo dmsetup reload docker-253:17-1835016-pool --table  '0 515883008 thin-pool 252:0 252:1 128 32768 1 skip_block_zeroing' && sudo dmsetup resume docker-253:17-1835016-pool
537
+	```bash
538
+	$ sudo dmsetup suspend docker-253:17-1835016-pool \
539
+	    && sudo dmsetup reload docker-253:17-1835016-pool --table  '0 515883008 thin-pool 252:0 252:1 128 32768 1 skip_block_zeroing' \
540
+	    && sudo dmsetup resume docker-253:17-1835016-pool
541
+	```
532 542
 
533 543
 ## Device Mapper and Docker performance
534 544
 
... ...
@@ -570,20 +631,20 @@ There are several other things that impact the performance of the
570 570
 `devicemapper` storage driver.
571 571
 
572 572
 - **The mode.** The default mode for Docker running the `devicemapper` storage
573
-driver is `loop-lvm`. This mode uses sparse files and suffers from poor
574
-performance. It is **not recommended for production**. The recommended mode for
575
- production environments is `direct-lvm` where the storage driver writes
576
-directly to raw block devices.
573
+  driver is `loop-lvm`. This mode uses sparse files and suffers from poor
574
+  performance. It is **not recommended for production**. The recommended mode for
575
+  production environments is `direct-lvm` where the storage driver writes
576
+  directly to raw block devices.
577 577
 
578 578
 - **High speed storage.** For best performance you should place the `Data file`
579
- and `Metadata file` on high speed storage such as SSD. This can be direct
580
-attached storage or from a SAN or NAS array.
579
+  and `Metadata file` on high speed storage such as SSD. This can be direct
580
+  attached storage or from a SAN or NAS array.
581 581
 
582 582
 - **Memory usage.** `devicemapper` is not the most memory efficient Docker
583
-storage driver. Launching *n* copies of the same container loads *n* copies of
584
-its files into memory. This can have a memory impact on your Docker host. As a
585
-result, the `devicemapper` storage driver may not be the best choice for PaaS
586
-and other high density use cases.
583
+  storage driver. Launching *n* copies of the same container loads *n* copies of
584
+  its files into memory. This can have a memory impact on your Docker host. As a
585
+  result, the `devicemapper` storage driver may not be the best choice for PaaS
586
+  and other high density use cases.
587 587
 
588 588
 One final point, data volumes provide the best and most predictable
589 589
 performance. This is because they bypass the storage driver and do not incur
590 590
new file mode 100644
591 591
Binary files /dev/null and b/docs/userguide/storagedriver/images/lsblk-diagram.jpg differ
... ...
@@ -40,10 +40,10 @@ driver names:
40 40
 |AUFS          |`aufs`               |
41 41
 |Btrfs         |`btrfs`              |
42 42
 |Device Mapper |`devicemapper`       |
43
-|VFS*          |`vfs`                |
43
+|VFS           |`vfs`                |
44 44
 |ZFS           |`zfs`                |
45 45
 
46
-To find out which storage driver is set on the daemon , you use the
46
+To find out which storage driver is set on the daemon, you use the
47 47
 `docker info` command:
48 48
 
49 49
     $ docker info
... ...
@@ -71,18 +71,18 @@ For example, the `btrfs` storage driver on a Btrfs backing filesystem. The
71 71
 following table lists each storage driver and whether it must match the host's
72 72
 backing file system:
73 73
 
74
-|Storage driver |Must match backing filesystem |Incompatible with   |
75
-|---------------|------------------------------|--------------------|
76
-|`overlay`      |No                            |`btrfs` `aufs` `zfs`|
77
-|`aufs`         |No                            |`btrfs` `aufs`      |
78
-|`btrfs`        |Yes                           |   N/A              |
79
-|`devicemapper` |No                            |   N/A              |
80
-|`vfs`          |No                            |   N/A              |
81
-|`zfs`          |Yes                           |   N/A              |
74
+|Storage driver |Commonly used on |Disabled on                   |
75
+|---------------|-----------------|------------------------------|
76
+|`overlay`      |`ext4` `xfs`     |`btrfs` `aufs` `overlay` `zfs`|
77
+|`aufs`         |`ext4` `xfs`     |`btrfs` `aufs`                |
78
+|`btrfs`        |`btrfs` _only_   |   N/A                        |
79
+|`devicemapper` |`direct-lvm`     |   N/A                        |
80
+|`vfs`          |debugging only   |   N/A                        |
81
+|`zfs`          |`zfs` _only_     |   N/A                        |
82 82
 
83 83
 
84 84
 > **Note**
85
-> Incompatible with means some storage drivers can not run over certain backing
85
+> "Disabled on" means some storage drivers can not run over certain backing
86 86
 > filesystem.
87 87
 
88 88
 You can set the storage driver by passing the `--storage-driver=<name>` option
... ...
@@ -78,7 +78,16 @@ you must be explicit with a relative or absolute path, for example:
78 78
     `/path/to/file:name.txt` or `./file:name.txt`
79 79
 
80 80
 It is not possible to copy certain system files such as resources under
81
-`/proc`, `/sys`, `/dev`, and mounts created by the user in the container.
81
+`/proc`, `/sys`, `/dev`, tmpfs, and mounts created by the user in the container.
82
+However, you can still copy such files by manually running `tar` in `docker exec`.
83
+For example (consider `SRC_PATH` and `DEST_PATH` are directories):
84
+
85
+    $ docker exec foo tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | tar Cxf DEST_PATH -
86
+
87
+or
88
+
89
+    $ tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | docker exec -i foo tar Cxf DEST_PATH -
90
+
82 91
 
83 92
 Using `-` as the `SRC_PATH` streams the contents of `STDIN` as a tar archive.
84 93
 The command extracts the content of the tar to the `DEST_PATH` in container's