AnalogJ / scrutiny

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

[FEAT] Allow groups of disks, and allow alternate paths for disk devices #622

Open Halfwalker opened 3 months ago

Halfwalker commented 3 months ago

Is your feature request related to a problem? Please describe. 1) I have several ZFS pools of disks in a fairly large server. It would be nice to have those disks grouped together in some fashion.

2) The regular /dev/sda type path isn't the greatest. It would be nice to have disks identified via the /dev/disk/by-id type paths. In fact, with ZFS I use a /dev/disk/by-vdev path that has symlinks (like the other /dev/disk/ dirs) that link the disk to the position name of the disk in the server

Describe the solution you'd like 1) The config file could allow a disk grouping syntax. Perhaps something like

# Disk grouping - by name
group: pool1
  devicepath: /dev/disk/by-vdev
  disks:
    - /dev/disk/by-vdev/slot1
    - /dev/disk/by-vdev/slot2
    - /dev/disk/by-vdev/slot3
    - /dev/disk/by-vdev/slot4

group: pool2
  devicepath: /dev/disk/by-vdev
  disks:
    - /dev/disk/by-vdev/slot5
    - /dev/disk/by-vdev/slot6

Then the disk tiles in the dashboard could show which group each disk is in. Even better to group them in a frame of sorts named for the group:. The tile could also show the proper path for the disk device, /dev/disk/by-vdev/slot2 rather than /dev/sdb

2) Since smartctl --scan only seems to look at disks in /dev/sd? type paths, this would likely require some matching between the disks found and the desired devicepath: to populate the disk tile titles.