Skip to content

Put Use the extra space back on every machine. - #1279

Open
calledtoconstruct wants to merge 1 commit into
MyOwnDataCenter:mainfrom
calledtoconstruct:fix/use-extra-space
Open

calledtoconstruct wants to merge 1 commit into
MyOwnDataCenter:mainfrom
calledtoconstruct:fix/use-extra-space

Conversation

@calledtoconstruct

@calledtoconstruct calledtoconstruct commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

Use the extra space is back on Storage. This server and a joined computer show it when that computer’s system drive has room to grow. It grows the last partition, its encryption (asking for the disk password), and the filesystem while the computer runs. It only grows, and nothing is erased.

How you tested it

  • npm run typecheck, npm run build and npm test pass
  • Tried on a real Omarchy machine or VM (say which), if it touches install.sh, the helper, apps, machines or storage

Targeted checks, not the full suite or the production build:

  • python3 connector/test_helper.py (50 tests, including grow-status and grow-system)
  • node --experimental-strip-types --import ./test/retry-rm.mjs --test --test-concurrency=1 --test-name-pattern 'storage and backups|swarm.storage.status|every procedure' test/storage-panel.test.mjs test/swarm-storage.test.mjs test/allowed.test.mjs
  • npx tsc --noEmit -p web

Anything to know

A joined computer needs its connector updated before the button can see that computer’s free space. Until then the card stays hidden.

This is the system drive only (the filesystem that holds the owner’s home). LVM, RAID, and a partition that is not last are refused, same as on this server. Pool drives and extra VM disks are left alone.

The README sentence overlaps with #1278. This one includes a joined computer. #1278’s note that the button was not carried over will be out of date once this lands.

Leave the version number and What's New to the maintainer.


Note

High Risk
Online partition, LUKS, and filesystem resize on the system drive is irreversible if something fails mid-operation; remote execution on swarm agents adds operational risk until connectors are updated.

Overview
Brings back the Use the extra space flow on Settings → Storage for both this server and joined Linux computers when the system drive has unused capacity after a resize.

On joined machines, the connector helper gains grow-status and grow-system: it detects unused space on the home disk, reports grow steps (partition, encryption, filesystem), and online-grows the last GPT partition, optional LUKS (disk password via stdin, not argv), then btrfs/ext/xfs. LVM/RAID and non-last partitions are refused. The agent and swarm.storage.growStatus / swarm.storage.growSystem RPCs wire this through omarchyd; the UI UnusedSpace card calls host storage.growSystem or the swarm equivalents.

README now describes this for server and joined computers. Tests cover helper grow behavior, swarm offline/password validation, and Storage panel wiring.

Reviewed by Cursor Bugbot for commit 2d5c8d6. Bugbot is set up for automated code reviews on this repo. Configure here.

Storage on this server and on a joined computer offers it when that computer's system drive has room to grow. It grows the last partition, its encryption, and the filesystem.

Co-Authored-By: Grok 4.7 <grok@x.ai>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2d5c8d6. Configure here.

Comment thread connector/helper.py
elif fstype == "xfs":
run("xfs_growfs", [target])
else:
fail("Growing a %s filesystem isn’t supported" % fstype)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filesystem checked after partition grows

Medium Severity

grow-system extends the partition and its encryption before it checks the filesystem type. On ZFS, F2FS, NTFS, or anything other than btrfs, ext3, ext4, and XFS, the partition table is already rewritten when the helper then fails, and a retry hits the same error.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2d5c8d6. Configure here.

<button type="button" className="btn primary small" disabled={busy || (asking && !password)} onClick={grow}>
{busy ? 'Growing…' : asking ? 'Unlock and grow' : 'Use the extra space'}
</button>
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grow offered for LVM and RAID

Medium Severity

grow-status still reports unused space and ordinary steps for LVM or RAID, so UnusedSpace shows Use the extra space whenever that partition is last. The card says the drive can be grown, and the action refuses only after the click.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2d5c8d6. Configure here.

setPassword('')
toast(`Done: the system now uses all ${bytes(d.size, 0)}`)
qc.invalidateQueries({queryKey: growKey})
onDone()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra-space card stays stale

Low Severity

After a successful grow on this server, UnusedSpace refetches system.diskUsage and still shows the old free space. That query returns the sampler’s last disk sample, which forgetDrive() does not drop, so the card and the success toast disagree until the next sample.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2d5c8d6. Configure here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant