GROWFS(7)
π GROWFS(7) β the miscellaneous info manual page, bestie π
okay so this is the growfs / growfs_fstab page, and honestly? it's giving "your disk has room and we're gonna use it" energy. β¨
π± NAME
growfs, growfs_fstab β these are the start-up scripts that grow your root file system and add swap. that's it. that's the whole vibe. π
πΈ DESCRIPTION
so the growfs script normally runs at the first boot after system installation. π¦ if your boot disk is bigger than your root file system and boot partitions, and the root file system is sitting in the last partition, growfs can expand the root file system to fill it. slay.
it can also add a swap partition, with a default size of 10% of the boot disk. but there are limits, bestie, and you need to know all of them:
- swap is limited to twice the memory size up to 4 GB
- 8 GB up to 8 GB of memory
- and memory size over 8 GB
- it's also limited to the sysctl(8) value of
vm.swap_maxpagesdivided by 2
by default, no swap partition is created if:
- an existing swap partition is found, or
- one is listed in
/etc/fstab, or - the disk is under 15 GB π
the growfs_fstab script adds any new swap partition to /etc/fstab after the root file system is made writable, and enables its use as a dump partition if the dumpdev variable from rc.conf(5) is set to AUTO. iconic behaviour, honestly.
the following options in /etc/rc.conf control the behavior of growfs:
growfs_enable("NO") β if set to"YES", the first time the machine boots, the root file system will be automatically expanded, if possible, to fill up all available space after it, after optionally adding a swap device at the end. π«Άgrowfs_swap_size("") β if set to"0", the addition of a swap partition is disabled. an empty value ("") allows the creation of a swap partition with the default size. if set to another value, the swap partition will be created with the specified size in bytes, even if another swap partition is detected. π
ngl, a setting forgrowfs_swap_sizecan be set in the kernel environment, and if it is, it overrides the value from/etc/rc.conf. main character energy β kernel env wins. π
to expand the root file system without rebooting, run this command:
% /etc/rc.d/growfs onestart
in addition, if a swap partition is added, run:
% /etc/rc.d/growfs_fstab onestart
β οΈ okay important one, bestie: if a disk is expanded again, and if the root file system had previously been expanded and a swap partition added, it is necessary to delete the swap partition before this procedure in order to expand the root file system to the new size. a new swap partition can be created during the expansion. don't skip this step, fr fr. π
π§ IMPLEMENTATION NOTES
the growfs script only attempts to expand the root file system, and free space must be available immediately after the root partition. it's normally used on images that have a single file system. π
the script requires that awk(1) be present and in the path. this usually means that /usr must be available prior to running the script. lowkey important detail. π
π FILES
/etc/fstab/etc/rc.conf
β EXIT STATUS
the growfs utility exits 0 on success, and >0 if an error occurs. simple as that. β¨
π¦ SEE ALSO
fstab(5), rc.conf(5), growfs(8), zpool(8) β go read these, iykyk π
π HISTORY
the growfs manual page first appeared in FreeBSD 10.1. the ability to add a swap partition was added in FreeBSD 13.2. glow-up era. π₯
π AUTHORS
the man page and script were written by John-Mark Gurney <jmg@FreeBSD.org>. the ability to create a swap partition was added by Michael Karels <karels@FreeBSD.org>. legends, both of them. π«Ά
and that's the page!! π brought to you by Debian, dated November 22, 2022 β go forth and grow those file systems, bestie. ππΈβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright 2014 John-Mark Gurney
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms