Skip to content

Commit a41d952

Browse files
author
Misty Stanley-Jones
authored
Merge pull request docker#117 from mbentley/add-deferred-deletion
Add deferred deletion to recommended dm options
2 parents f0b8323 + 5423de9 commit a41d952

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

engine/userguide/storagedriver/device-mapper-driver.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ assumes that the Docker daemon is in the `stopped` state.
314314
315315
14. Configure the Docker daemon with specific devicemapper options.
316316
317-
There are two ways to do this. You can set options on the command line if you start the daemon there:
317+
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:
318318
319319
```bash
320-
--storage-driver=devicemapper --storage-opt=dm.thinpooldev=/dev/mapper/docker-thinpool --storage-opt dm.use_deferred_removal=true
320+
--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
321321
```
322322
323323
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.
327327
"storage-driver": "devicemapper",
328328
"storage-opts": [
329329
"dm.thinpooldev=/dev/mapper/docker-thinpool",
330-
"dm.use_deferred_removal=true"
330+
"dm.use_deferred_removal=true",
331+
"dm.use_deferred_deletion=true"
331332
]
332333
}
333334
```
334335
336+
>**Note**: Always set both `dm.use_deferred_removal=true` and `dm.use_deferred_deletion=true` to prevent unintentionally leaking mount points.
337+
335338
15. If using systemd and modifying the daemon configuration via unit or drop-in file, reload systemd to scan for changes.
336339
337340
```bash

0 commit comments

Comments
 (0)