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:
1 parent
5209579631
commit
d560b41b81
22 files changed
+641
-66
No files matched your search
@@ -42,6 +42,9 @@ services:
|
||||
# CHRONOS_PRIORITY_QUEUE: "true"
|
||||
# Trace, Debug, Information, Warning or Error
|
||||
CHRONOS_LOG_LEVEL: Information
|
||||
# The admin panel shows the archive volume's free space. An Unraid share (/mnt/user/<share>) reports its primary
|
||||
# storage, often the cache: map the share's array view to /space (volumes below) and show that one instead.
|
||||
# CHRONOS_SPACE_PATH: /space
|
||||
PUID: ${PUID:-1000}
|
||||
PGID: ${PGID:-1000}
|
||||
TZ: ${TZ:-UTC}
|
||||
@@ -49,6 +52,8 @@ services:
|
||||
# The archive folder should belong to PUID:PGID; an empty or root-owned one is given to them at start (the folder
|
||||
# only, never its contents).
|
||||
- ${CHRONOS_ARCHIVE:-./archive}:/archive
|
||||
# Optional, with CHRONOS_SPACE_PATH above: the same share seen on the array only, to show the array's free space.
|
||||
# - /mnt/user0/Timelapse:/space:ro
|
||||
- ${CHRONOS_DATA:-./data}:/data
|
||||
|
||||
postgres:
|
||||
|
||||
Reference in new issue
Block a user