2.3 KiB
Storage byte units — r030 (2026-10-11)
unraid_storage_status calls runStatusHelper("storage-status"), which executes
scripts/unraid-mcp-status-helper.php. storage_status() reads
/var/local/emhttp/disks.ini; selected_disk() formerly copied KiB values into
fields labelled bytes.
Only fsSize (fallback size), fsUsed, and fsFree are multiplied by 1024.
Unraid's installed webGui/nchan/device_list and include/DiskList.php likewise
multiply filesystem values by 1024. df -k /mnt/disk1 independently reproduces
all three raw filesystem values. The fallback size * 1024 matches blockdev.
The generic numeric parser, filesize byte outputs and memory processing are
unchanged. /proc/meminfo already receives one KiB-to-byte conversion.
Observed on disk1 / /dev/md1p1:
| Source | KiB | Bytes (independent host check) |
|---|---|---|
| fsSize | 7811938628 | 7999425155072 |
| fsUsed | 6683446380 | 6843849093120 |
| fsFree | 1128492248 | 1155576061952 |
| size (partition) | 7814025540 | 8001562152960 |
Filesystem figures match df -B1 /mnt/disk1; partition capacity matches
blockdev --getsize64 /dev/md1p1. They measure different layers: filesystem
capacity is 2,136,997,888 bytes smaller than partition capacity. Preserve
filesystem capacity for consistency with filesystem used/free, rather than
forcing equality with raw block-device size. Used + free = filesystem capacity;
percentage is unchanged (85.6%). Cached emhttp data may lag current df during writes.
Validation: 10 PHP storage regression checks on Unraid, including memory; 20 existing Bun security tests; TypeScript check; package build and XML validation. Live MCP validation is recorded after installation. No storage or media changes.
Live acceptance: r030 installed on Unraid; authenticated MCP initialize and
tools/list succeeded. unraid_storage_status disk1 returns exactly the three
byte values above, equal to independent df -B1 (all fields). MCP
unraid_system_health reports RAM total 33433522176 bytes, equal to
/proc/meminfo MemTotal * 1024 (not scaled twice). Only MUA was restarted;
configuration, permissions, containers and media were not changed.
The test reads configuration literally like MUA; PHP INI parsing is unsuitable
for arbitrary literal keys. No key was printed or copied.