mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 12:42:49 +00:00
3e4ea03433
The registry keeps one resource per source ID, and an agent disk's source ID was its bare serial or WWN. Since same-serial disks on different machines stay apart (#2660), a dual-ported SAS shelf, cloned VMs with an explicit serial or fixed-serial USB bridges left every disk but the last one ingested without its agent source target. A disk only the agent reports then had no metrics target and no chart, both in the live registry and in the one the resource API seeds from unified resources. The agent SMART and Unraid source ID is now <agent ID>/physical-disk:<serial or WWN>, and seeding rebuilds it from the agent host above the disk, directly or through an Unraid array or cache pool. Seeding an identity-less array disk now reproduces its live host:device key too, instead of a storage-scoped key no writer uses. Canonical IDs do not move: SourceSpecificID hashes an agent disk's bare serial or WWN, so a disk split off onto its source-specific ID, and the exclusion that split it, keep their recorded IDs. Every host's split copy shares that ID, and two agent IDs on one machine no longer share a source key, so findMatch's split branch now takes it keyed to the machine when another machine's disk holds it, and joins a holder on the same machine, instead of overwriting either. History stays keyed by the serial or WWN, which every disk writer and reader shares, so a drive keeps one history across sources and host moves; a host-scoped key would orphan the stored history of every agent disk with a serial. Distinct drives sharing a serial across hosts still interleave in one series, a residual the contract records.