Skip to content

Commit 5423de9

Browse files
author
Matt Bentley
committed
Add deferred deletion to recommended dm options
Signed-off-by: Matt Bentley <[email protected]>
1 parent 4ab65ba commit 5423de9

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)