NAME
growfs_postboot – automatically grow file systems during runtime
DESCRIPTION
The growfs_postboot script expands filesystems automatically. Typically it is run via devd(8) in response to a SIZECHANGE notification. It will enlarge the final partition of a partitioned disk; expand a UFS file system; or expand a zpool device, as appropriate.
The following option in /etc/rc.conf controls the behavior of growfs_postboot:
- growfs_postboot_enable
-
(“NO”) If set to “YES”, the script will enlarge partitions and file systems when disks expand.
Note that the growfs(7) startup script will normally place a swap partition at the end of the disk containing the root file system, which will prevent the file system growing further; as such, in most cases it will be advisable to set growfs_swap_size to “0” in virtual machine images if growfs_postboot is being enabled. If the system has already booted without that setting, a swap partition may have already been created, in which case it must be removed before this script can grow the root file system.
FILES
- /etc/rc.conf
EXIT STATUS
The growfs_postboot utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
HISTORY
The growfs_postboot script first appeared in FreeBSD 16.0.
AUTHORS
Colin Percival ⟨[email protected]⟩
CAVEATS
I/O may be paused while file systems grow, so this functionality should be used with care on systems with strict latency requirements.