Skip to content

System > Storage: "X GB of your drive isn't in use yet" counts the other partitions and filesystem overhead as unused #653

Closed

Description

@nixfred

What happens

driveOf() in omarchyd/system.mjs (around line 100) computes the amount shown in the "isn't in use yet" notice as:

const notInUse = steps.length ? Math.max(0, Number(disk.size) - fsSize) : 0

fsSize is the size statfs reports for the system filesystem. Subtracting it from the whole disk size counts everything that is not that filesystem as free space: the EFI partition, /boot, a swap partition, any other partition on the disk, and the filesystem's own metadata (a filesystem reports less than the partition that holds it). After a disk is enlarged, the notice therefore overstates the new space. A closer figure is already computed a few lines above as partLag (disk size minus the sum of all partition sizes), plus, when the filesystem lags behind its own partition, the difference between the partition and the filesystem.

With a Windows or data partition next to the system partition and some unallocated space at the end, the number includes that whole other partition.

How to reproduce

Import diskUsage from omarchyd/system.mjs and call it with fake findmnt and lsblk first on PATH that describe one disk with partitions of 1 GiB (EFI), 8 GiB (swap) and a last root partition whose filesystem statfs reports as 23.5 GiB, with the disk 100 GiB larger than the sum of the three partitions:

const r = await diskUsage(dir)
console.log(r.drive.steps, r.drive.notInUse / 1024 ** 3)

Actual: [ 'partition', 'filesystem' ] and 109.47 GiB.
Expected: about 100 GiB (the unallocated space), because the EFI and swap partitions are in use.

The Storage card then reads "109 GB of your 133 GB drive isn't in use yet", which is more than growing the partition can add.

Suggested fix

Use the unallocated space after the partitions (partLag) plus any lag of the filesystem behind its own partition, instead of disk.size - fsSize.

Environment

Omarchy Server main (6aa7f7d, 0.9.52), Node 26.

Activity

  1. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    #163, #472, #797, #204, #205, #206, #207, #654, #806, #798, #264, #258, #238, and #360 share storage, setup, and new machines with this and will land in one pull request.

    🤖 Generated with Grok 4.7

  2. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Thanks @nixfred. Unused drive space no longer counts the other partitions as free room. This ships in #879.

    🤖 Generated with Grok 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions