-
|
I’d like to have my disks (20+) automatically detected and monitored but I don’t want to have to change the docker-compose.yaml or collector.yaml every time I replace a disk, etc. Does that mean I need to use |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Short answer: Yes, How it works under the hood: The collector always runs Option A — Explicit device list (default, more secure): devices:
- "/dev/sda"
- "/dev/sdb"
# ... repeat for all 20+
cap_add:
- SYS_RAWIO
- SYS_ADMIN # required for NVMe
volumes:
- /run/udev:/run/udev:ro
Option B — Privileged + full /dev mount (zero maintenance): privileged: true
volumes:
- /dev:/dev
- /run/udev:/run/udev:ro
Note on |
Beta Was this translation helpful? Give feedback.
-
|
Thanks so much for the reply! I can add :ro to the /dev passthrough for extra security though, right? |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately no -- Also, when |
Beta Was this translation helpful? Give feedback.
Short answer: Yes,
privileged: true+-v /dev:/dev:rois the right approach for your use case.How it works under the hood:
The collector always runs
smartctl --scanautomatically on each collection run — nocollector.yamlconfiguration is needed for standard disks. The issue is purely whether the container can see the/devnodes in the first place.Option A — Explicit device list (default, more secure):
smartctl --scanruns inside the container and only sees what you explicitly passed in. Secure, but you have to update the list wh…