Skip to main content

PoolDiskEntry

devicestringrequired
mountPointstringrequired
rolestringrequired

Possible values: [data, parity, cache, boot, external, unassigned]

stateDiskStaterequired

wrong_filesystem is PoolDiskEntry-only: a disk matched to an array slot by identity (serial or WWN) whose filesystem UUID does not match what SQLite recorded for that slot — a replacement disk that kept the original disk's serial/WWN (a cloned or reused drive) but was formatted differently, or not at all. Distinct from missing: the disk is genuinely present, so the pool's own slot list must say so rather than report it active. The storage gate treats it exactly like a missing disk (not ready, no mount attempted for that slot) and never emits it on DiskStateEvent, since it is not a spindown state.

mount_failed is also PoolDiskEntry-only, and covers the case wrong_filesystem deliberately does not: a disk matched to a slot by identity whose filesystem UUID was never positively read at all — most commonly a genuinely blank same-serial replacement — so the storage gate's own identity/FSUUID check reports the array ready for it, but hoservad's own bounded attempt to mount that slot's disk still failed or timed out. Never derived from a device probe on this state's own read path — it reflects the daemon's last actual mount attempt, recorded when it happened. The web/CLI Replace disk flow offers this slot's own device as its only replacement target, the same way it does for wrong_filesystem; the replace job's own one-off probe of that exact device is what actually confirms it is blank before formatting it. Never emitted on DiskStateEvent, since it is not a spindown state.

Possible values: [active, standby, spinning_up, missing, failed, wrong_filesystem, mount_failed]

unraidStickboolean

True when this disk is the Unraid USB stick (see DiskInventoryEntry.unraidStick). It is reported as unassigned but no array operation accepts it, so a client offers it no role.

sizeBytes(integer | null)<int64>nullable
usedBytes(integer | null)<int64>nullable
freeBytes(integer | null)<int64>nullable

Free space from statfs(2) on this disk's mountpoint — never a directory walk. Null for a non-data disk, or when free-space accounting is unavailable (no array topology yet).

nearMinFreeSpaceboolean

True once this disk's free space is at or below the pool's configured minfreespace — the point mergerfs itself excludes it from create-policy placement. Omitted when freeBytes is not being reported for this disk.

removalState object

The removal state of this disk. Null for a disk that is not currently in removal.

oneOf

The disk-removal state machine: evacuating from before an evacuation's first copy until its post-check passes — every pool mount marks this disk no-create for the whole time; evacuated once that copy and post-check finish, but the disk is still in every mergerfs branch list, SnapRAID layout and mount table (still no-create); unpooled once finishDiskRemoval's job has taken it out of every pool mount — still in snapraid.conf and mounted; unlisted once a sync has recorded it empty and it is out of snapraid.conf too — only its unmount and removal from the array are left. A disk that finished leaves the pool and the array altogether.

DiskRemovalState

The disk-removal state machine: evacuating from before an evacuation's first copy until its post-check passes — every pool mount marks this disk no-create for the whole time; evacuated once that copy and post-check finish, but the disk is still in every mergerfs branch list, SnapRAID layout and mount table (still no-create); unpooled once finishDiskRemoval's job has taken it out of every pool mount — still in snapraid.conf and mounted; unlisted once a sync has recorded it empty and it is out of snapraid.conf too — only its unmount and removal from the array are left. A disk that finished leaves the pool and the array altogether.

Possible values: [evacuating, evacuated, unpooled, unlisted]

finishConfirmationstring

The exact typed phrase finishDiskRemoval requires for this disk, set whenever removalState is set. Reading it here rather than from planDiskEvacuation is what lets Finish removal be retried once the disk has left the pool (unpooled/unlisted) — planDiskEvacuation itself refuses those states with disk_leaving_array, since evacuating a disk that has already left the pool makes no sense, but the confirmation phrase does not depend on evacuating it again.

PoolDiskEntry
{
"device": "string",
"mountPoint": "string",
"role": "data",
"state": "active",
"unraidStick": true,
"sizeBytes": 0,
"usedBytes": 0,
"freeBytes": 0,
"nearMinFreeSpace": true,
"removalState": "evacuating",
"finishConfirmation": "string"
}