Skip to content

fix(storage-metrics): merge shared volumes across hosts when byte-exact#2852

Merged
enoch85 merged 7 commits into
developmentfrom
fix/storage-metrics-shared-cross-host-2841
May 9, 2026
Merged

fix(storage-metrics): merge shared volumes across hosts when byte-exact#2852
enoch85 merged 7 commits into
developmentfrom
fix/storage-metrics-shared-cross-host-2841

Conversation

@enoch85

@enoch85 enoch85 commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Closes #2841.

Storage totals were doubled when Radarr and Sonarr ran in separate LXC containers against the same backend volume — different hostnames meant PR #2721's per-host dedupe could not collapse them.

Adds a second pass after the per-host dedupe that merges mounts across hosts only when the signature is implausibly tight for unrelated filesystems: byte-exact totalSpace + freeSpace, or matching volume label + byte-exact totalSpace. Any block-level write diverges unrelated hosts byte-for-byte, so the false-positive surface is narrow.

Per-host dedupe still uses the existing 1 MiB freeSpace bucket to absorb same-host poll drift between Arr clients.

@enoch85

This comment was marked as outdated.

enoch85 commented May 6, 2026

Copy link
Copy Markdown
Collaborator Author

@rstuke82 thanks for the detailed report — the byte-exact freeSpace match across both rootfolder payloads was exactly the signal this fix uses to detect shared backend storage across separate hosts.

A pr-2852 Docker tag is being built now. Once it's up, would you give it a try and confirm your storage card no longer double-counts?

@github-actions

This comment was marked as outdated.

@enoch85

This comment was marked as outdated.

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Released to maintainerr/maintainerr:pr-2852 🚀

@nbellowe

nbellowe commented May 8, 2026

Copy link
Copy Markdown
Contributor

hey thanks for this. This is the same issue that I was trying to point out. Appreciate it!

@enoch85

enoch85 commented May 8, 2026

Copy link
Copy Markdown
Collaborator Author

@nbellowe so does it work? Did you test the pr-tag? 🙂

@nbellowe

nbellowe commented May 8, 2026

Copy link
Copy Markdown
Contributor

Tested locally - works!
Thanks!

@enoch85 enoch85 merged commit 6307fda into development May 9, 2026
12 checks passed
@enoch85 enoch85 deleted the fix/storage-metrics-shared-cross-host-2841 branch May 9, 2026 09:02
maintainerr-automation Bot added a commit that referenced this pull request May 10, 2026
* build(deps): bump fast-uri from 3.0.6 to 3.1.2 (#2862)

Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.0.6 to 3.1.2.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.0.6...v3.1.2)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add typed TanStack Query test helpers and migrate spec mocks (#2863)

* Add typed React Query test helpers

* Reuse existing deferred helper in queryResults

* fix(storage-metrics): merge shared volumes across hosts when byte-exact (#2852)

* fix(storage-metrics): merge shared volumes across hosts when signature is byte-exact

Resolves #2841.

* style: apply prettier formatting

---------

Co-authored-by: Kristian Matthews-Kennington <kristian@matthews-kennington.com>

* build(deps-dev): bump typescript-eslint from 8.59.1 to 8.59.2 (#2850)

Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.59.1 to 8.59.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.59.2/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.59.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(overlays): add force processing and reset concurrency gating (#2827)

* feat(overlays): add force reapply processing flow

* feat(ui): add reapply all overlays action

* feat(ui): add collection overlay reapply action

* feat(ui): clarify overlay action semantics

* fix: prevent collection detail render crash

* fix(overlays): serialize collection reapply actions

* refactor(overlays): tighten phase one implementation

* style(ui): format collection detail spec

* fix(overlays): use named zod import

* fix(overlays): simplify manual reapply controls

* test(ui): harden notification save spec

* refactor(overlays): tighten phase 1 review fixes

- Promote process result + request schema to @maintainerr/contracts so
  server and UI share one wire shape; drop the duplicate UI interface
  (skipped was incorrectly optional) and the inline zod schema in the
  controller.
- Remove the appliedMediaItems recursion sentinel from the public
  processCollection signature so the lock check can't be bypassed by a
  truthy empty array; processAllCollections now calls the internal
  helper directly.
- Gate DELETE /overlays/reset against concurrent processing and add
  spec coverage for both reset-while-disabled and reset-while-running.
- Surface the skipped count in the inline overlay summary alert.
- Replace the TriggerRuleButton re-export shim with a direct import of
  TriggerRuleActionButton at the one usage site, and revert the no-op
  canTestMedia change on CollectionDetailPage.

---------

Co-authored-by: Craig Linford <craig.linford@sas.com>
Co-authored-by: enoch85 <mailto@danielhansson.nu>

* build(deps-dev): bump @suites/unit and @suites/doubles.jest to 3.1.x (#2865)

The two packages augment each other's types; bumping only one causes
StubbedInstance/Mocked type mismatches. Bumps both in lockstep,
superseding #2846 and #2848.

* build(deps): bump node from 24.15.0-alpine3.22 to 26.1.0-alpine3.22 (#2857)

* build(deps): bump node from 24.15.0-alpine3.22 to 26.1.0-alpine3.22

Bumps node from 24.15.0-alpine3.22 to 26.1.0-alpine3.22.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 26.0.0-alpine3.22
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(docker): install corepack for Node 26+ where it's no longer bundled

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: enoch85 <mailto@danielhansson.nu>

* build(deps-dev): bump typescript from 5.9.3 to 6.0.3 (#2713)

* build(deps-dev): bump typescript from 5.9.3 to 6.0.3

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v5.9.3...v6.0.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 6.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(server): set explicit rootDir for TypeScript 6 build

TS 6 no longer infers rootDir from input files; it defaults to the
tsconfig directory. Setting rootDir explicitly in the build config
preserves the dist/<file> layout that mirrors src/<file>.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: enoch85 <mailto@danielhansson.nu>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kristian Matthews-Kennington <kristian@matthews-kennington.com>
Co-authored-by: enoch85 <mailto@danielhansson.nu>
Co-authored-by: Craig Linford <clinford86@gmail.com>
Co-authored-by: Craig Linford <craig.linford@sas.com>
@maintainerr-automation

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@enoch85 enoch85 added this to the 3.11.0 milestone May 12, 2026
doonga pushed a commit to greyrock-labs/home-ops that referenced this pull request May 13, 2026
…11.1 ) (#29)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/maintainerr/maintainerr](https://github.com/Maintainerr/Maintainerr) | minor | `3.10.1` → `3.11.1` |

---

### Release Notes

<details>
<summary>Maintainerr/Maintainerr (ghcr.io/maintainerr/maintainerr)</summary>

### [`v3.11.1`](https://github.com/Maintainerr/Maintainerr/blob/HEAD/CHANGELOG.md#3111-2026-05-12)

[Compare Source](Maintainerr/Maintainerr@v3.11.0...v3.11.1)

#### Highlights

- Fixed an issue where Jellyfin libraries with "Group films into collections" enabled caused BoxSet members to incorrectly toggle in and out of rule results ([#&#8203;2870](Maintainerr/Maintainerr#2870)).
- Improved error message for invalid Plex library section IDs to better guide users in resolving configuration issues ([#&#8203;2883](Maintainerr/Maintainerr#2883)).
- Enhanced custom collection UX by renaming tags for clarity and adding tooltips to explain collection handling options ([#&#8203;2882](Maintainerr/Maintainerr#2882)).

#### Fixes

- Validated Jellyfin IDs before refresh to prevent errors ([#&#8203;2853](Maintainerr/Maintainerr#2853)).
- Improved error message when Plex library section ID is invalid ([#&#8203;2883](Maintainerr/Maintainerr#2883)).
- Resolved Jellyfin collection add/remove loop for BoxSet items ([#&#8203;2870](Maintainerr/Maintainerr#2870)).
- Clarified custom collection terminology and added warnings for disabling collection handling ([#&#8203;2882](Maintainerr/Maintainerr#2882)).
- Added explicit token permissions to the Fider move job to address CodeQL findings.
- Added environment gate to mitigate TOCTOU vulnerability in the release\_pr workflow ([#&#8203;2879](Maintainerr/Maintainerr#2879)).
- Addressed transitive dependency vulnerabilities by adding Yarn resolutions for specific packages ([#&#8203;2881](Maintainerr/Maintainerr#2881)).

#### Dependencies

- Updated 10 dependencies, including notable packages: vite, typeorm, and [@&#8203;typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/eslint-plugin).

#### New Contributors

- [@&#8203;blixten85](https://github.com/blixten85) made their first contribution in [#&#8203;2881](Maintainerr/Maintainerr#2881)

### [`v3.11.0`](https://github.com/Maintainerr/Maintainerr/blob/HEAD/CHANGELOG.md#3110-2026-05-11)

[Compare Source](Maintainerr/Maintainerr@v3.10.2...v3.11.0)

#### Highlights

- Added support for force-processing overlays and gated reset operations against concurrent processing runs ([#&#8203;2827](Maintainerr/Maintainerr#2827)).
- Improved collection sorting: collections now apply sort order on save and synchronize with the media server ([#&#8203;2860](Maintainerr/Maintainerr#2860)).
- Enhanced storage metrics: potential reclaimable storage is now split into movie, show, season, and episode panels ([#&#8203;2854](Maintainerr/Maintainerr#2854)).

#### Breaking Changes

- None.

#### Features

- Added force-processing support for overlay operations and gated reset operations against concurrent processing runs ([#&#8203;2827](Maintainerr/Maintainerr#2827)).
- Improved storage metrics by splitting potential reclaimable storage into movie, show, season, and episode panels ([#&#8203;2854](Maintainerr/Maintainerr#2854)).

#### Fixes

- Fixed collection sorting to apply on save and synchronize with the media server ([#&#8203;2860](Maintainerr/Maintainerr#2860)).
- Resolved issue where excluding a single episode incorrectly excluded all episodes of the same show ([#&#8203;2867](Maintainerr/Maintainerr#2867)).
- Fixed storage metrics to merge shared volumes across hosts when byte-exact ([#&#8203;2852](Maintainerr/Maintainerr#2852)).
- Fixed Jellyfin retry ID check to align with pre-filter logic ([#&#8203;2853](Maintainerr/Maintainerr#2853)).
- Addressed issue where reclaimed bytes were not credited when `sizeBytes` was not yet cached ([#&#8203;2855](Maintainerr/Maintainerr#2855)).

#### Performance

- None.

#### Database migrations

- Added a new `mediaServerSort` column to the `collection` table to support media server-specific sorting.

#### Internal

- Added typed TanStack Query test helpers and migrated UI spec mocks to use typed builders ([#&#8203;2863](Maintainerr/Maintainerr#2863)).
- Added an architecture overview document detailing the monorepo structure, runtime flow, and core components ([#&#8203;2817](Maintainerr/Maintainerr#2817)).

#### Dependencies

- Updated 5 dependencies, including notable updates to TypeScript and typescript-eslint.

### [`v3.10.2`](https://github.com/Maintainerr/Maintainerr/blob/HEAD/CHANGELOG.md#3102-2026-05-08)

[Compare Source](Maintainerr/Maintainerr@v3.10.1...v3.10.2)

#### Highlights

- Fixed incorrect version comparison logic that caused update notifications to fail for multi-digit version segments ([#&#8203;2838](Maintainerr/Maintainerr#2838)).
- Improved storage metrics by deduplicating reclaimable bytes and adding per-type cleanup byte counters ([#&#8203;2833](Maintainerr/Maintainerr#2833)).

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/New_York)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNjAuNyIsInVwZGF0ZWRJblZlciI6IjQzLjE2MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19-->

Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Storage space being counted twice

3 participants