Page MenuHomeFreeBSD

rc+devd: Add growfs_postboot
Needs ReviewPublic

Authored by cperciva on Sat, Aug 1, 12:03 AM.
Tags
None
Referenced Files
F164715603: D58582.diff
Mon, Aug 3, 7:59 AM
F164703578: D58582.diff
Mon, Aug 3, 6:38 AM
F164688324: D58582.id183191.diff
Mon, Aug 3, 4:43 AM
Unknown Object (File)
Sat, Aug 1, 11:00 AM
Subscribers

Details

Reviewers
imp
jmg
ziaee
Summary

In VM and cloud environments it is often possible to enlarge virtual
disks; this can be useful, for example, if a system is launched with a
small root disk and it later becomes clear that more space is needed.

On kernels which support run-time resizing of disks (for NVMe, this was
added in November 2025; some other disk types have supported this for
longer) a SIZECHANGE notification is sent to userland via devd.

Add a "nostart" rc.d script (runnable manually but not automatically at
boot time) and a devd script which invokes it when a notification
arrives. The rc.d script enlarges the "final partition" on partitioned
geoms, or the UFS filesystem or zpool device when triggered on a disk
containing either of those.

MFC after: 2 weeks
Relnotes: Disk partitions and filesystems can be enlarged

		automatically when disks grow by setting
		growfs_postboot_enable=YES in /etc/rc.conf.

Sponsored by: Amazon

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75326
Build 72209: arc lint + arc unit