Skip to content

feat(base): grow every managed filesystem, online and on xfs - #48

Merged
gmelikov merged 3 commits into
masterfrom
xfs_root_autoresize
Jul 31, 2026
Merged

feat(base): grow every managed filesystem, online and on xfs #48
gmelikov merged 3 commits into
masterfrom
xfs_root_autoresize

Conversation

@gmelikov

Copy link
Copy Markdown
Member

No description provided.

gmelikov added 2 commits July 31, 2026 08:17
root_autoresize.sh called resize2fs unconditionally, so an xfs root was
never grown after growpart. Detect the root filesystem type and dispatch
to resize2fs (ext2/3/4) or xfs_growfs (xfs); fail loudly on anything else.
The autoresize service only handled the root partition, only at boot and
only with resize2fs, so an xfs root failed the unit and secondary disks
were never grown at all. Once prepare_persistent_disk formats a data disk
its size was fixed forever, because the bootstrap unit runs once per
machine.

Generalise the script to walk mounted partitions, pick resize2fs or
xfs_growfs by the actual filesystem, and skip what cannot be grown (an
EFI system partition is mounted in every image). Add a udev rule on the
RESIZE=1 change uevent so a disk enlarged under a running machine is
picked up without a reboot, and keep a boot time sweep for disks that
grew while the machine was off.
@gmelikov
gmelikov requested a review from a team as a code owner July 31, 2026 10:41
Comment thread exordos/images/exordos_base/exordos_autoresize.sh

@phantomii phantomii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes requested: the XFS autoresize path is not deployable until the image installs xfsprogs and the path is covered by a test. See the inline comment.

The base image happens to ship mkfs.xfs and xfs_growfs today, so the xfs
paths in prepare_persistent_disk and exordos_autoresize.sh work by
accident. Depend on them explicitly so a future base image change cannot
silently take them away.

@phantomii phantomii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved: xfsprogs is now declared explicitly in the image build, which resolves the XFS runtime dependency.

@gmelikov
gmelikov merged commit 953ac78 into master Jul 31, 2026
1 check passed
@gmelikov
gmelikov deleted the xfs_root_autoresize branch July 31, 2026 12:53
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.

2 participants