From 7576bf400c9e66db20633c3c2791c0186ea281b9 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Wed, 18 Aug 2021 14:21:19 +0530 Subject: [PATCH] doc: update rbd-nbd doc about log path details Document the changes needed for configuring custom logging path Signed-off-by: Prasanna Kumar Kalever --- docs/rbd-nbd.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/rbd-nbd.md b/docs/rbd-nbd.md index a24885536..cadf0c400 100644 --- a/docs/rbd-nbd.md +++ b/docs/rbd-nbd.md @@ -3,6 +3,7 @@ - [RBD NBD Mounter](#rbd-nbd-mounter) - [Overview](#overview) - [Configuration](#configuration) + - [Configuring logging path](#configuring-logging-path) - [Status](#status) - [Support Matrix](#support-matrix) - [CSI spec and Kubernetes version compatibility](#csi-spec-and-kubernetes-version-compatibility) @@ -28,6 +29,41 @@ client-side, which is inside the `csi-rbdplugin` node plugin. To use the rbd-nbd mounter for RBD-backed PVs, set `mounter` to `rbd-nbd` in the StorageClass. +### Configuring logging path + +If you are using the default rbd nodeplugin daemonset and StorageClass +templates then `cephLogDir` will be `/var/log/ceph`, this directory will be +a host-path and the default log file path will be +`/var/log/ceph/rbd-nbd-.log`. rbd-nbd creates a log file per volume +under the `cephLogDir` path on NodeStage(map) and removed the same on +the respective NodeUnstage(unmap). + +In case if you need a customized log path, you should do below: + +- Edit the daemonset templates to change the `cephLogDir` + - If you are using helm charts, then you can use key `cephLogDir` + + ``` + helm install --set cephLogDir=/var/log/ceph-csi/my-dir + ``` + + - For standard templates edit [csi-rbdplugin.yaml](../deploy/rbd/kubernetes/csi-rbdplugin.yaml) + to update `hostPath` for `ceph-logdir`, also edit psp [csi-nodeplugin-psp.yaml](../deploy/rbd/kubernetes/csi-nodeplugin-psp.yaml) + to update `pathPrefix` spec entries. +- Update the StorageClass with the customized log directory path + - Now update rbd StorageClass for `cephLogDir`, for example + + ``` + cephLogDir: "/var/log/prod-A-logs" + ``` + +`NOTE`: + +- On uninstall make sure to delete `cephLogDir` on host manually to freeup + some space just in case if there are any uncleaned log files. +- In case if you do not need the rbd-nbd logging to persistent, then just + update the StorageClass for `cephLogDir` to use a non-persistent path. + ## Status Rbd-nbd support status: **Alpha**