August 31Aug 31 Hi everyone,I’m releasing the first public version of Unraid VSOCK Sensors, a plugin that exports disk and HBA temperatures from an Unraid VM to its Proxmox host using AF_VSOCK.GitHub:GitHubGitHub - milouz1985/unraid-vsock-sensorsContribute to milouz1985/unraid-vsock-sensors development by creating an account on GitHub.What does it do?The plugin runs a small server inside the Unraid VM. A companion service installed on the Proxmox host retrieves the sensor data through VSOCK and exposes it as standard Linux hwmon devices.The temperatures can then be used by tools such as:lm-sensorsCoolerControlfancontrolfan2gocustom monitoring scriptsOn the Proxmox host, the sensors appear as:unraid_storage: individual disk temperatures and maximum temperatures by categoryunraid_hba: HBA controller temperatures, when HBA monitoring is enabledThe storage device includes one channel per internal disk. It can also expose maximum temperature channels for HDDs, SATA SSDs and NVMe SSDs.Why VSOCK?My previous solution used the Unraid web API. It worked, but I wanted something more direct and better suited to communication between a VM and its host.AF_VSOCK provides a dedicated communication channel between the Unraid guest and the Proxmox host:no IP address or virtual network configuration is required;it does not depend on the Unraid web interface or its authentication API;the sensor service is not exposed on the LAN;communication still works independently of the VM’s network configuration;the protocol is small and dedicated to this specific use case.VSOCK also makes the architecture clearer: Unraid remains responsible for collecting its hardware information, while Proxmox only consumes the resulting sensor data.Disk spin-down supportThe plugin reads disk temperatures directly from Unraid’s existing /var/local/emhttp/disks.ini temperature cache. It does not run smartctl to collect disk temperatures.Therefore, querying the plugin does not wake up sleeping disks.A spun-down disk remains in the inventory, but its temperature is reported according to Unraid’s cached state. The Proxmox hwmon integration also includes failsafe handling when readings are unavailable or communication is interrupted.HBA monitoringTwo HBA backends are currently available:native /dev/mpt3ctl access for controllers using the mpt3sas driver;StorCLI, when installed separately.The native mpt3ctl backend communicates directly with the Linux mpt3sas driver.Its implementation is based on the upstream Linux kernel ABI, structures andreference code, including the mpt3sas control interface and its hwmon support.The long-term goal is for HBA monitoring to rely exclusively on interfaces andcode provided by the Linux kernel, without requiring any proprietaryuser-space utility.RequirementsUnraid running as a QEMU/KVM VM on Proxmox;a vhost-vsock-pci device added to the VM;the Unraid plugin installed inside the VM;the companion Debian package installed on the Proxmox host;Proxmox kernel headers for the virt-temp DKMS module.Basic installationAdd a VSOCK device to the Unraid VM configuration:args: -device vhost-vsock-pci,guest-cid=3If the VM already has an args line, append the device to the existing line.The VM must be fully stopped and started after this change.add plg url in unraid: https://raw.githubusercontent.com/milouz1985/unraid-vsock-sensors/refs/heads/main/unraid-plugin/unraid-vsock-sensors.plgInstall the companion .deb package on the Proxmox host.The complete installation and configuration instructions are available in the GitHub README.Current statusThe project is functional on my own setup, but this is its first public release. I hope this will be useful to others running Unraid as a VM and wanting to control host-side cooling using the actual storage temperatures.
September 13Sep 13 Author Hi everyone,I’m releasing Unraid VSOCK Sensors 2.0.0 (UVSS).First, an apology regarding the previous 1.4.3 announcement.The .plg I published accidentally referenced package files hosted on my private development Gitea instance (git.lan.home) instead of the public GitHub repository.The .plg itself was publicly accessible, but a normal Unraid installation could not actually download the package from outside my own network.Sorry about that — this was a release packaging mistake on my side.The issue is fixed in 2.0.0 and all public plugin/package URLs now point to GitHub.So in practice, UVSS 2.0.0 is the first publicly installable release of the plugin.Plugin URLhttps://raw.githubusercontent.com/milouz1985/unraid-vsock-sensors/refs/heads/main/unraid-plugin/unraid-vsock-sensors.plgGitHubhttps://github.com/milouz1985/unraid-vsock-sensorsReleasehttps://github.com/milouz1985/unraid-vsock-sensors/releases/tag/v2.0.0What changed since the original 1.4.3 announcement?The overall goal of UVSS has not changed:Export disk and HBA temperatures from an Unraid VM to its Proxmox host through AF_VSOCK, so that the Proxmox host can use those temperatures for fan control.However, several parts of the implementation described in my original post have changed significantly.hwmon topology: no more aggregated unraid_storage / unraid_hbaIn the original version, Proxmox exposed aggregated hwmon devices:unraid_storageunraid_hbawith multiple temperature channels inside each device.In 2.0.0, UVSS now creates one stable hwmon device per disk or HBA controller.Examples:unraid_disk1unraid_cacheunraid_hdd_maximumunraid_sata_ssd_maximumunraid_nvme_ssd_maximumunraid_sas3008Each device exposes its temperature as temp1.Disk sensors use the stable Unraid disk ID, while HBA sensors use stable hardware identities such as SAS address, PCI address or serial number.Sensor identity is therefore no longer tied to:/dev/sdXhwmonXarray positioncontroller indexThis makes the topology much more stable when disks or controllers appear, disappear or move around.If anyone manually managed to install the old 1.4.3 package, any CoolerControl, fancontrol or fan2go configuration using unraid_storage or unraid_hba will need to be updated.VSOCK is now a persistent push connectionThe original design was described as a small server inside the Unraid VM that the Proxmox side queried through VSOCK, this has been reworked.The Unraid side now maintains a persistent guest-to-host VSOCK connection and continuously pushes its latest snapshot to Proxmox.A snapshot is sent every second and also acts as a heartbeat, if the connection is lost UVSS automatically reconnects.This makes failure detection simpler and is better suited to continuously published sensor data.Disk collection now uses more of Unraid’s native runtime stateThe original description mainly focused on disk temperatures coming from /var/local/emhttp/disks.ini, In 2.0.0 UVSS now uses:disks.ini for assigned disksdevs.ini for unassigned disksUnraid’s existing SMART cache to validate temperature freshnessThe Unassigned Devices plugin is not required. Assigned disks take precedence if the same stable ID appears in both sources.UVSS also validates the inventory more strictly. Duplicate IDs within the same source now invalidate the inventory instead of silently hiding one of the disks.The agent still never runs smartctl to collect disk temperatures, so UVSS itself does not wake sleeping disks.SMART freshness and spin-down handling were redesignedThe original version already avoided waking sleeping disks, but freshness handling is now more precise.UVSS reads Unraid’s poll_attributes value and uses it to determine how long a cached SMART temperature can be considered fresh.After Unraid completes its SMART polling cycle, the native poll_attributes event sends a lightweight refresh request to UVSS.There is also a five-second watchdog for:missed eventsinventory changesspin-down / wake-up transitionsSMART cache expirationPhysical USB detection and per-disk policiesThis did not exist in the original release.UVSS can now automatically exclude disks that are physically connected through USB, Detection uses the Linux sysfs hardware topology instead of trusting only the transport field reported by emhttpd.This matters because some USB-SATA bridges can make a disk physically connected through USB appear as transport=ata.The plugin UI now provides three policies for every stable disk ID:AutoIncludeExcludeIn Auto mode:physically USB-connected disks are excludednon-USB disks are includedif the physical bus cannot be determined, the disk is included as the thermally safer fallbackThe Unraid boot flash device is always excluded.Overrides are stored using the stable Unraid disk ID, so a change from /dev/sdX to another device name does not change the policy.HBA monitoring is still available through both backends, but is more robustThe two backends mentioned in the original post are still available:native /dev/mpt3ctlStorCLIThe long-term direction has not changed: the native backend uses the public Linux mpt3sas ABI directly and does not require a proprietary userspace utility.Several details have improved in 2.0.0:backend-specific refresh defaultsbetter controller identity handlingstricter MPT3 parsingbetter handling of native ioctls that remain blocked past their deadlinestale results are rejected instead of overwriting newer stateadditional fuzz testing around the MPT3 parserDefault refresh intervals are now:native mpt3ctl: 15 secondsStorCLI: 30 secondsStorCLI intentionally uses a longer interval because launching and parsing StorCLI is significantly more expensive than the native ioctl path.Persistent topology and stronger failsafe behaviourThe Proxmox side now persists the hwmon topology. After the service or host restarts, the previous sensors can be recreated immediately before the Unraid VM has sent its first new snapshot.They start in the failsafe state rather than disappearing.The virt-temp module applies a per-sensor timeout, if a sensor is not refreshed for ten seconds, it becomes 100 °CThis protects against situations such as:unavailable readingsguest collection failurelost VSOCK connectionstopped receiverstale topology stateA new valid value automatically restores the actual temperature.The receiver can also recover automatically after a virt-temp module reload and from stale kernel sessions (ESTALE).The plugin UI has been expandedThe Unraid settings page now includes:service status and versionVSOCK portread-only Unraid SMART polling intervalHBA enable / disableHBA backendbackend-specific HBA refresh intervalper-disk Auto / Include / Exclude policiesdetected physical buseffective inclusion stateThe normal descriptions now use Unraid’s native contextual help system instead of being permanently displayed on the page.Current statusUVSS 2.0.0 is the first version that is actually installable from the public URLs I intended to provide in the original announcement.I use it on my own virtualized Unraid setup for host-side fan control.The native mpt3ctl backend is still considered experimental outside the hardware I can test myself, currently a LSI SAS3008.And again, apologies for the broken private git.lan.home URL in the previously announced 1.4.3 package descriptor.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.