Browse code

Add note about mount propagation on systemd

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2016/01/27 05:53:11
Showing 3 changed files
... ...
@@ -1385,6 +1385,14 @@ Similarly the operator can set the **hostname** with `-h`.
1385 1385
 > **Note**:
1386 1386
 > The auto-creation of the host path has been [*deprecated*](../misc/deprecated.md#auto-creating-missing-host-paths-for-bind-mounts).
1387 1387
 
1388
+> **Note**:
1389
+> When using systemd to manage the Docker daemon's start and stop, in the systemd
1390
+> unit file there is an option to control mount propagation for the Docker daemon
1391
+> itself, called `MountFlags`. The value of this setting may cause Docker to not
1392
+> see mount propagation changes made on the mount point. For example, if this value
1393
+> is `slave`, you may not be able to use the `shared` or `rshared` propagation on
1394
+> a volume.
1395
+
1388 1396
 The volumes commands are complex enough to have their own documentation
1389 1397
 in section [*Managing data in
1390 1398
 containers*](../userguide/dockervolumes.md). A developer can define
... ...
@@ -411,6 +411,14 @@ will convert /foo into a `shared` mount point. Alternatively one can directly
411 411
 change propagation properties of source mount. Say `/` is source mount for
412 412
 `/foo`, then use `mount --make-shared /` to convert `/` into a `shared` mount.
413 413
 
414
+> **Note**:
415
+> When using systemd to manage the Docker daemon's start and stop, in the systemd
416
+> unit file there is an option to control mount propagation for the Docker daemon
417
+> itself, called `MountFlags`. The value of this setting may cause Docker to not
418
+> see mount propagation changes made on the mount point. For example, if this value
419
+> is `slave`, you may not be able to use the `shared` or `rshared` propagation on
420
+> a volume.
421
+
414 422
 **--volume-driver**=""
415 423
    Container's volume driver. This driver creates volumes specified either from
416 424
    a Dockerfile's `VOLUME` instruction or from the `docker run -v` flag.
... ...
@@ -582,6 +582,14 @@ will convert /foo into a `shared` mount point. Alternatively one can directly
582 582
 change propagation properties of source mount. Say `/` is source mount for
583 583
 `/foo`, then use `mount --make-shared /` to convert `/` into a `shared` mount.
584 584
 
585
+> **Note**:
586
+> When using systemd to manage the Docker daemon's start and stop, in the systemd
587
+> unit file there is an option to control mount propagation for the Docker daemon
588
+> itself, called `MountFlags`. The value of this setting may cause Docker to not
589
+> see mount propagation changes made on the mount point. For example, if this value
590
+> is `slave`, you may not be able to use the `shared` or `rshared` propagation on
591
+> a volume.
592
+
585 593
 **--volume-driver**=""
586 594
    Container's volume driver. This driver creates volumes specified either from
587 595
    a Dockerfile's `VOLUME` instruction or from the `docker run -v` flag.