Add mention in dockerd command line and storage driver selection documentation.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
| ... | ... |
@@ -142,7 +142,7 @@ precedence over `HTTP_PROXY`. |
| 142 | 142 |
### Daemon storage-driver option |
| 143 | 143 |
|
| 144 | 144 |
The Docker daemon has support for several different image layer storage |
| 145 |
-drivers: `aufs`, `devicemapper`, `btrfs`, `zfs` and `overlay`. |
|
| 145 |
+drivers: `aufs`, `devicemapper`, `btrfs`, `zfs`, `overlay` and `overlay2`. |
|
| 146 | 146 |
|
| 147 | 147 |
The `aufs` driver is the oldest, but is based on a Linux kernel patch-set that |
| 148 | 148 |
is unlikely to be merged into the main kernel. These are also known to cause |
| ... | ... |
@@ -180,9 +180,14 @@ Linux kernel as of [3.18.0](https://lkml.org/lkml/2014/10/26/137). Call |
| 180 | 180 |
> inode consumption (especially as the number of images grows), as well as |
| 181 | 181 |
> being incompatible with the use of RPMs. |
| 182 | 182 |
|
| 183 |
+The `overlay2` uses the same fast union filesystem but takes advantage of |
|
| 184 |
+[additional features](https://lkml.org/lkml/2015/2/11/106) added in Linux |
|
| 185 |
+kernel 4.0 to avoid excessive inode consumption. Call `dockerd -s overlay2` |
|
| 186 |
+to use it. |
|
| 187 |
+ |
|
| 183 | 188 |
> **Note:** |
| 184 |
-> It is currently unsupported on `btrfs` or any Copy on Write filesystem |
|
| 185 |
-> and should only be used over `ext4` partitions. |
|
| 189 |
+> Both `overlay` and `overlay2` are currently unsupported on `btrfs` or any |
|
| 190 |
+> Copy on Write filesystem and should only be used over `ext4` partitions. |
|
| 186 | 191 |
|
| 187 | 192 |
### Storage driver options |
| 188 | 193 |
|
| ... | ... |
@@ -34,14 +34,14 @@ and all containers created by that daemon instance use the same storage driver. |
| 34 | 34 |
The table below shows the supported storage driver technologies and their |
| 35 | 35 |
driver names: |
| 36 | 36 |
|
| 37 |
-|Technology |Storage driver name | |
|
| 38 |
-|--------------|---------------------| |
|
| 39 |
-|OverlayFS |`overlay` | |
|
| 40 |
-|AUFS |`aufs` | |
|
| 41 |
-|Btrfs |`btrfs` | |
|
| 42 |
-|Device Mapper |`devicemapper` | |
|
| 43 |
-|VFS |`vfs` | |
|
| 44 |
-|ZFS |`zfs` | |
|
| 37 |
+|Technology |Storage driver name | |
|
| 38 |
+|--------------|-----------------------| |
|
| 39 |
+|OverlayFS |`overlay` or `overlay2`| |
|
| 40 |
+|AUFS |`aufs` | |
|
| 41 |
+|Btrfs |`btrfs` | |
|
| 42 |
+|Device Mapper |`devicemapper` | |
|
| 43 |
+|VFS |`vfs` | |
|
| 44 |
+|ZFS |`zfs` | |
|
| 45 | 45 |
|
| 46 | 46 |
To find out which storage driver is set on the daemon, you use the |
| 47 | 47 |
`docker info` command: |
| ... | ... |
@@ -71,14 +71,15 @@ 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 |Commonly used on |Disabled on | |
|
| 75 |
-|---------------|-----------------|-----------------------------------------| |
|
| 76 |
-|`overlay` |`ext4` `xfs` |`btrfs` `aufs` `overlay` `zfs` `eCryptfs`| |
|
| 77 |
-|`aufs` |`ext4` `xfs` |`btrfs` `aufs` `eCryptfs` | |
|
| 78 |
-|`btrfs` |`btrfs` _only_ | N/A | |
|
| 79 |
-|`devicemapper` |`direct-lvm` | N/A | |
|
| 80 |
-|`vfs` |debugging only | N/A | |
|
| 81 |
-|`zfs` |`zfs` _only_ | N/A | |
|
| 74 |
+|Storage driver |Commonly used on |Disabled on | |
|
| 75 |
+|---------------|-----------------|----------------------------------------------------| |
|
| 76 |
+|`overlay` |`ext4` `xfs` |`btrfs` `aufs` `overlay` `overlay2` `zfs` `eCryptfs`| |
|
| 77 |
+|`overlay2` |`ext4` `xfs` |`btrfs` `aufs` `overlay` `overlay2` `zfs` `eCryptfs`| |
|
| 78 |
+|`aufs` |`ext4` `xfs` |`btrfs` `aufs` `eCryptfs` | |
|
| 79 |
+|`btrfs` |`btrfs` _only_ | N/A | |
|
| 80 |
+|`devicemapper` |`direct-lvm` | N/A | |
|
| 81 |
+|`vfs` |debugging only | N/A | |
|
| 82 |
+|`zfs` |`zfs` _only_ | N/A | |
|
| 82 | 83 |
|
| 83 | 84 |
|
| 84 | 85 |
> **Note** |
| ... | ... |
@@ -198,6 +199,24 @@ the guidance offered by the table below along with the points mentioned above. |
| 198 | 198 |
|
| 199 | 199 |
 |
| 200 | 200 |
|
| 201 |
+### Overlay vs Overlay2 |
|
| 202 |
+ |
|
| 203 |
+OverlayFS has 2 storage drivers which both make use of the same OverlayFS |
|
| 204 |
+technology but with different implementations and incompatible on disk |
|
| 205 |
+storage. Since the storage is incompatible, switching between the two |
|
| 206 |
+will require re-creating all image content. The `overlay` driver is the |
|
| 207 |
+original implementation and the only option in Docker 1.11 and before. |
|
| 208 |
+The `overlay` driver has known limitations with inode exhaustion and |
|
| 209 |
+commit performance. The `overlay2` driver addresses this limitation, but |
|
| 210 |
+is only compatible with Linux kernel 4.0 and later. For users on a pre-4.0 |
|
| 211 |
+kernel or with an existing `overlay` graph, it is recommended to stay |
|
| 212 |
+on `overlay`. For users with at least a 4.0 kernel and no existing or required |
|
| 213 |
+`overlay` graph data, then `overlay2` may be used. |
|
| 214 |
+ |
|
| 215 |
+> **Note** |
|
| 216 |
+> `overlay2` graph data will not interfere with `overlay` graph data. However |
|
| 217 |
+> when switching to `overlay2`, the user is responsible for removing |
|
| 218 |
+> `overlay` graph data to avoid storage duplication. |
|
| 201 | 219 |
|
| 202 | 220 |
## Related information |
| 203 | 221 |
|
| ... | ... |
@@ -226,7 +226,7 @@ output otherwise. |
| 226 | 226 |
Force the Docker runtime to use a specific storage driver. |
| 227 | 227 |
|
| 228 | 228 |
**--selinux-enabled**=*true*|*false* |
| 229 |
- Enable selinux support. Default is false. SELinux does not presently support the overlay storage driver. |
|
| 229 |
+ Enable selinux support. Default is false. SELinux does not presently support either of the overlay storage drivers. |
|
| 230 | 230 |
|
| 231 | 231 |
**--storage-opt**=[] |
| 232 | 232 |
Set storage driver options. See STORAGE DRIVER OPTIONS. |