feat(server): show the Unraid array's free space and check the archive volume before filing uploads

On Unraid the archive is a user share (FUSE shfs), which reports the share's
primary storage, often the cache, while the mover sends the photos to the
array: the admin panel showed the cache's free space (owner review 2, R2).

- New option SpacePath (server.json) / CHRONOS_SPACE_PATH: the admin panel
  shows that folder's volume; empty, or a folder that cannot be measured, falls
  back to the archive's volume (one warning, at start, not per request).
- VolumeSpace measures folders (DriveInfo; the path root on Windows) and reads
  the filesystem type and mount from /proc/self/mountinfo on Linux (longest
  mount point on segment boundaries, octal escapes, optional fields, the top of
  stacked mounts), since DriveFormat calls an shfs share only "fuse". It is an
  injectable service, so tests simulate a full volume; the /data checks use it.
- ArchiveStatsDto keeps FreeBytes/CapacityBytes for the shown volume and gains
  optional trailing members: the write volume's figures (when a space path is
  in use and they differ), the filesystem type and UsesSpacePath.
- Admin panel (dashboard and archive): a tooltip on the storage figures names
  the volume and its filesystem and, on an shfs share without a space path,
  says they are the primary storage and to map the array view to /space; a
  "Write volume" line shows the archive's own volume when it differs.
- Completing an upload, a render upload or a render node's result checks the
  archive volume for its size plus the 64 MiB reserve before the staging copy
  and answers 507 insufficient_storage, the upload still receiving.
- Diagnostics list the archive and space volumes with filesystem and mount.
- Unraid template: optional read-only "Array view" /space (default
  /mnt/user0/Timelapse) and "Space path" CHRONOS_SPACE_PATH=/space; compose and
  the releases README describe the same as an option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-10-26 21:58:27 +01:00
1 parent 5209579631
commit d560b41b81
22 files changed
+641 -66

No files matched your search

+6
View File
@@ -83,6 +83,7 @@
<data name="Admin.Dashboard.DoneToday.other" xml:space="preserve"><value>{0} done today</value></data>
<data name="Admin.Dashboard.FailedToday.one" xml:space="preserve"><value>{0} failed</value></data>
<data name="Admin.Dashboard.FailedToday.other" xml:space="preserve"><value>{0} failed</value></data>
<data name="Admin.Dashboard.FileSystem" xml:space="preserve"><value>File system: {0}</value></data>
<data name="Admin.Dashboard.Free" xml:space="preserve"><value>{0} free</value></data>
<data name="Admin.Dashboard.Jobs" xml:space="preserve"><value>Jobs</value></data>
<data name="Admin.Dashboard.Meta" xml:space="preserve"><value>up {0} · {1} · TLS {2} · {3}</value><comment>long</comment></data>
@@ -105,11 +106,16 @@
<data name="Admin.Dashboard.Running" xml:space="preserve"><value>running</value></data>
<data name="Admin.Dashboard.SequenceUnit.one" xml:space="preserve"><value>sequence</value></data>
<data name="Admin.Dashboard.SequenceUnit.other" xml:space="preserve"><value>sequences</value></data>
<data name="Admin.Dashboard.SpaceVolume.Tip" xml:space="preserve"><value>Space of the folder set in CHRONOS_SPACE_PATH, shown instead of the archive's own volume</value></data>
<data name="Admin.Dashboard.Storage" xml:space="preserve"><value>Storage</value></data>
<data name="Admin.Dashboard.Storage.Tip" xml:space="preserve"><value>Space of the volume that holds the archive</value></data>
<data name="Admin.Dashboard.UnraidShare.Tip" xml:space="preserve"><value>An Unraid share: these figures are its primary storage, often the cache, not the array the mover fills. Map the share's array view (/mnt/user0/&lt;share&gt;) to /space to see the array.</value></data>
<data name="Admin.Dashboard.UploadTotals" xml:space="preserve"><value>frames per day · {0} total · peak {1}</value><comment>long</comment></data>
<data name="Admin.Dashboard.Uploads" xml:space="preserve"><value>Uploads · last 30 days</value></data>
<data name="Admin.Dashboard.WithoutProxies.one" xml:space="preserve"><value>{0} sequence without proxies</value><comment>long</comment></data>
<data name="Admin.Dashboard.WithoutProxies.other" xml:space="preserve"><value>{0} sequences without proxies</value><comment>long</comment></data>
<data name="Admin.Dashboard.WriteVolume" xml:space="preserve"><value>Write volume: {0} free</value></data>
<data name="Admin.Dashboard.WriteVolume.Tip" xml:space="preserve"><value>Free space of the archive's own volume, where uploads are written first: on Unraid the share's primary storage, often the cache</value></data>
<data name="Admin.Error.Unreachable" xml:space="preserve"><value>The server did not answer; try again.</value><comment>long</comment></data>
<data name="Admin.Job.Kind.Adopt" xml:space="preserve"><value>Adopt</value></data>
<data name="Admin.Job.Kind.DeepAnalyse" xml:space="preserve"><value>Deep analysis</value></data>
+6
View File
@@ -83,6 +83,7 @@
<data name="Admin.Dashboard.DoneToday.other" xml:space="preserve"><value>{0} completati oggi</value></data>
<data name="Admin.Dashboard.FailedToday.one" xml:space="preserve"><value>{0} fallito</value></data>
<data name="Admin.Dashboard.FailedToday.other" xml:space="preserve"><value>{0} falliti</value></data>
<data name="Admin.Dashboard.FileSystem" xml:space="preserve"><value>File system: {0}</value></data>
<data name="Admin.Dashboard.Free" xml:space="preserve"><value>{0} liberi</value></data>
<data name="Admin.Dashboard.Jobs" xml:space="preserve"><value>Job</value></data>
<data name="Admin.Dashboard.Meta" xml:space="preserve"><value>attivo da {0} · {1} · TLS {2} · {3}</value></data>
@@ -105,11 +106,16 @@
<data name="Admin.Dashboard.Running" xml:space="preserve"><value>in corso</value></data>
<data name="Admin.Dashboard.SequenceUnit.one" xml:space="preserve"><value>sequenza</value></data>
<data name="Admin.Dashboard.SequenceUnit.other" xml:space="preserve"><value>sequenze</value></data>
<data name="Admin.Dashboard.SpaceVolume.Tip" xml:space="preserve"><value>Spazio della cartella indicata in CHRONOS_SPACE_PATH, mostrato al posto del volume dell'archivio</value></data>
<data name="Admin.Dashboard.Storage" xml:space="preserve"><value>Spazio</value></data>
<data name="Admin.Dashboard.Storage.Tip" xml:space="preserve"><value>Spazio del volume che contiene l'archivio</value></data>
<data name="Admin.Dashboard.UnraidShare.Tip" xml:space="preserve"><value>Una condivisione Unraid: questi valori sono il suo storage primario, spesso la cache, non l'array che il mover riempie. Mappa la vista array della condivisione (/mnt/user0/&lt;condivisione&gt;) su /space per vedere l'array.</value></data>
<data name="Admin.Dashboard.UploadTotals" xml:space="preserve"><value>foto al giorno · totale {0} · picco {1}</value></data>
<data name="Admin.Dashboard.Uploads" xml:space="preserve"><value>Caricamenti · ultimi 30 giorni</value></data>
<data name="Admin.Dashboard.WithoutProxies.one" xml:space="preserve"><value>{0} sequenza senza proxy</value></data>
<data name="Admin.Dashboard.WithoutProxies.other" xml:space="preserve"><value>{0} sequenze senza proxy</value></data>
<data name="Admin.Dashboard.WriteVolume" xml:space="preserve"><value>Volume di scrittura: {0} liberi</value></data>
<data name="Admin.Dashboard.WriteVolume.Tip" xml:space="preserve"><value>Spazio libero del volume dell'archivio, dove i caricamenti vengono scritti prima: su Unraid lo storage primario della condivisione, spesso la cache</value></data>
<data name="Admin.Error.Unreachable" xml:space="preserve"><value>Il server non ha risposto; riprova.</value></data>
<data name="Admin.Job.Kind.Adopt" xml:space="preserve"><value>Adozione</value></data>
<data name="Admin.Job.Kind.DeepAnalyse" xml:space="preserve"><value>Analisi completa</value></data>