From c7710819a5d32de956013f746f7c20418ee50a30 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Thu, 13 Jul 2017 00:38:47 +1000 Subject: [PATCH] docs: add documentation for dm.libdm_log_level This is a new option added specifically to allow for debugging of bugs in Docker's storage drivers or libdm itself. Signed-off-by: Aleksa Sarai --- docs/reference/commandline/dockerd.md | 28 +++++++++++++++++++++++++++ man/dockerd.8.md | 25 ++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/docs/reference/commandline/dockerd.md b/docs/reference/commandline/dockerd.md index 3e2d434974..676da28df8 100644 --- a/docs/reference/commandline/dockerd.md +++ b/docs/reference/commandline/dockerd.md @@ -700,6 +700,34 @@ ENOSPC and will shutdown filesystem. $ sudo dockerd --storage-opt dm.xfs_nospace_max_retries=0 ``` +##### `dm.libdm_log_level` + +Specifies the maxmimum `libdm` log level that will be forwarded to the +`dockerd` log (as specified by `--log-level`). This option is primarily +intended for debugging problems involving `libdm`. Using values other than the +defaults may cause false-positive warnings to be logged. + +Values specified must fall within the range of valid `libdm` log levels. At the +time of writing, the following is the list of `libdm` log levels as well as +their corresponding levels when output by `dockerd`. + +| `libdm` Level | Value | `--log-level` | +| ------------- | -----:| ------------- | +| `_LOG_FATAL` | 2 | error | +| `_LOG_ERR` | 3 | error | +| `_LOG_WARN` | 4 | warn | +| `_LOG_NOTICE` | 5 | info | +| `_LOG_INFO` | 6 | info | +| `_LOG_DEBUG` | 7 | debug | + +###### Example + +```bash +$ sudo dockerd \ + --log-level debug \ + --storage-opt dm.libdm_log_level=7 +``` + #### ZFS options ##### `zfs.fsname` diff --git a/man/dockerd.8.md b/man/dockerd.8.md index e9d7e68739..8a7619ca2c 100644 --- a/man/dockerd.8.md +++ b/man/dockerd.8.md @@ -703,6 +703,31 @@ Example use: $ sudo dockerd --storage-opt dm.xfs_nospace_max_retries=0 +##### dm.libdm_log_level + +Specifies the maxmimum libdm log level that will be forwarded to the dockerd +log (as specified by --log-level). This option is primarily intended for +debugging problems involving libdm. Using values other than the defaults may +cause false-positive warnings to be logged. + +Values specified must fall within the range of valid libdm log levels. At the +time of writing, the following is the list of libdm log levels as well as their +corresponding levels when output by dockerd. + +| libdm Level | Value | --log-level | +| ----------- | -----:| ----------- | +| _LOG_FATAL | 2 | error | +| _LOG_ERR | 3 | error | +| _LOG_WARN | 4 | warn | +| _LOG_NOTICE | 5 | info | +| _LOG_INFO | 6 | info | +| _LOG_DEBUG | 7 | debug | + +Example use: + + $ sudo dockerd \ + --log-level debug \ + --storage-opt dm.libdm_log_level=7 ## ZFS options