You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add device exclusion and installer drive picker (Issue #28)
Agent: exclude_devices config field with symlink-aware matching, runtime
filter in Refresh(), and [excluded by config] annotation in --discover.
Installer: drive picker auto-detects transport type via lsblk, color-codes
green (sata/nvme/usb/sas) vs yellow (iscsi/fc/unknown), pre-excludes
remote storage. Skipped on macOS (no lsblk). Warns when all drives
excluded. Summary shows red 'all excluded' state.
Docs: README agent config section, Proxmox guide iSCSI troubleshooting.
Response draft for Issue #28 (hessel-a).
standby_mode: standby # optional -- never, standby, sleep, or idle
157
157
advertise_interface: eth0 # optional -- restrict mDNS to this interface
158
+
exclude_devices: # optional -- set by installer's drive picker
159
+
- /dev/sdb
158
160
filesystems: # optional -- set by installer's disk usage picker
159
161
- path: /
160
162
uuid: a1b2c3d4-5678-90ab-cdef-1234567890ab
@@ -164,6 +166,8 @@ filesystems: # optional -- set by installer's disk usage picke
164
166
165
167
All options can also be set via CLI flags: `--port`, `--token`, `--scan-interval`, `--interface`, `--config`.
166
168
169
+
**Exclude devices:** Device paths listed in `exclude_devices` are skipped during every scan. The agent resolves symlinks at startup, so `/dev/disk/by-id/...` paths and their `/dev/sdX` equivalents both match. The installer's drive picker sets this automatically when it detects iSCSI, Fibre Channel, or other remote-storage transports that don't support SMART passthrough. You can also add paths manually and restart the service. If a device appears in both `exclude_devices` and `device_overrides`, the exclusion wins and a warning is logged.
170
+
167
171
**Scan interval:** Uses Go duration syntax -- `30s`, `5m`, `1h`, `24h` are all valid. When `standby_mode` is set, the agent skips sleeping drives and serves cached data, so the interval does not cause unnecessary wake-ups. When `standby_mode` is `never` (the default), each poll wakes any drive that is spun down. This is the *agent-side* read cadence and is separate from the HA Poll Interval entity, which reflects how often Home Assistant pulls fresh data from the agent itself.
168
172
169
173
**Standby mode:** Controls whether the agent avoids waking sleeping drives during polling. Set to `standby`, `sleep`, or `idle` to match your drives' power management (these correspond to `smartctl -n` modes). When set, the agent passes `-n <mode>` to smartctl on each poll -- if a drive is in that power state, smartctl exits without waking it and the agent serves the last cached SMART data with an `in_standby` flag. The default is `never`, which wakes drives on every poll. On the very first poll after startup, the agent always wakes all drives regardless of this setting to collect a SMART baseline (serial number, model, attributes). This one-time wake ensures every drive is registered with a stable identity from the start. Subsequent polls honor the standby setting normally.
Copy file name to clipboardExpand all lines: docs/guides/proxmox.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,19 @@ That's expected. The App (SMART Sniffer App from the HA add-on store) runs smart
145
145
146
146
Yes. If you pass the physical SATA or NVMe controller through to the VM via Proxmox's PCI passthrough (IOMMU), the VM gets direct hardware access. SMART data will work, and you could run the agent inside the VM. But this ties the physical controller to one VM and is more complex to set up. The agent-on-host approach is simpler and is how most Proxmox users run SMART Sniffer.
147
147
148
+
### iSCSI or network-attached storage shows warnings in the log
149
+
150
+
If your Proxmox host mounts iSCSI LUNs, Ceph RBDs, or NFS datastores, smartctl will attempt to read SMART data from those block devices and fail -- iSCSI targets don't support SMART passthrough (the SCSI commands hit the target daemon, not a physical drive). This causes repeated log warnings and exit code 4 errors.
151
+
152
+
The fix is to exclude those devices. If you're running the installer fresh, the drive picker detects iSCSI and other remote transports automatically and pre-excludes them. For existing installs, add the device paths to your config:
153
+
154
+
```yaml
155
+
exclude_devices:
156
+
- /dev/sdb # iSCSI LUN
157
+
```
158
+
159
+
Then restart: `sudo systemctl restart smartha-agent`. Run `smartha-agent --discover` to confirm which drives are local and which are remote.
160
+
148
161
## Example config
149
162
150
163
A typical Proxmox host `config.yaml` at `/etc/smartha-agent/config.yaml`:
@@ -153,6 +166,8 @@ A typical Proxmox host `config.yaml` at `/etc/smartha-agent/config.yaml`:
153
166
port: 9099
154
167
scan_interval: 120
155
168
advertise_interface: vmbr0
169
+
exclude_devices:
170
+
- /dev/sdb # iSCSI LUN -- no SMART passthrough
156
171
```
157
172
158
173
No `device_overrides` needed unless you have a hardware RAID controller. Standard SATA and NVMe drives are detected automatically.
0 commit comments