Add deferred deletion to recommended dm options

Signed-off-by: Matt Bentley <matt.bentley@docker.com>
This commit is contained in:
Matt Bentley 2016-10-07 13:01:47 -04:00
parent 4ab65ba3a4
commit 5423de94f0
No known key found for this signature in database
GPG Key ID: F38E24466CFFC4FB
1 changed files with 6 additions and 3 deletions

View File

@ -314,10 +314,10 @@ assumes that the Docker daemon is in the `stopped` state.
14. Configure the Docker daemon with specific devicemapper options.
There are two ways to do this. You can set options on the command line if you start the daemon there:
Now that your storage is configured, configure the Docker daemon to use it. There are two ways to do this. You can set options on the command line if you start the daemon there:
```bash
--storage-driver=devicemapper --storage-opt=dm.thinpooldev=/dev/mapper/docker-thinpool --storage-opt dm.use_deferred_removal=true
--storage-driver=devicemapper --storage-opt=dm.thinpooldev=/dev/mapper/docker-thinpool --storage-opt=dm.use_deferred_removal=true --storage-opt=dm.use_deferred_deletion=true
```
You can also set them for startup in the `daemon.json` configuration, for example:
@ -327,11 +327,14 @@ assumes that the Docker daemon is in the `stopped` state.
"storage-driver": "devicemapper",
"storage-opts": [
"dm.thinpooldev=/dev/mapper/docker-thinpool",
"dm.use_deferred_removal=true"
"dm.use_deferred_removal=true",
"dm.use_deferred_deletion=true"
]
}
```
>**Note**: Always set both `dm.use_deferred_removal=true` and `dm.use_deferred_deletion=true` to prevent unintentionally leaking mount points.
15. If using systemd and modifying the daemon configuration via unit or drop-in file, reload systemd to scan for changes.
```bash