AnalogJ / scrutiny

Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds
MIT License
5.07k stars 165 forks source link

[FEAT] Is there some way to dynamically deal with external disks attached via USB? #624

Open ovizii opened 5 months ago

ovizii commented 5 months ago

Is your feature request related to a problem? Please describe. I use scrutiny via docker with this image: ghcr.io/analogj/scrutiny:master-omnibus If I add an externally attached disk like this all works fine:

    devices:
      - /dev/disk/by-id/wwn-xyz:/dev/sda

When unplugging the USB disk, scrutiny just ignored it. The issue is I can't start scrutiny like this, while the disk is not attached for obvious reasons as docker can't handle that volume mapping.

I have to comment out the external devices, start scrutiny again. When attaching external devices, I have to remove that comment and start scrutiny, so it picks up the connected devices.

Describe the solution you'd like My question is if there is a different way to have scrutiny deal with externally attached disks, without this whole commenting out, restarting stuff.

If there is none, I guess I'll write a bash script which triggers upon attaching external disks, modifies my docker-compose.yml and restarts scrutiny :-/

adprom commented 5 months ago

It would be nice if Scrutiny gracefully handled disconnected drives or mappings for this reason - I.e. on Synology it could then dynamically pick up new drives added

ovizii commented 5 months ago

I would also like that, but I think the problem lies with docker rather than scrutiny. When starting a docker stack, it will error out when the drives we are trying to map are not connected. Anyway, I was just curious how other people handle this.