xref: /freebsd/share/man/man7/growfs_postboot.7 (revision 5a31987d4c395ec4d3ed303cbc2e1d12ea54a039)
1.\"
2.\" Copyright 2026 Colin Percival
3.\"
4.\" SPDX-License-Identifier: BSD-2-Clause
5.\"
6.Dd July 31, 2026
7.Dt GROWFS_POSTBOOT 7
8.Os
9.Sh NAME
10.Nm growfs_postboot
11.Nd automatically grow file systems during runtime
12.Sh DESCRIPTION
13The
14.Nm
15script expands filesystems automatically.
16Typically it is run via
17.Xr devd 8
18in response to a SIZECHANGE notification.
19It will enlarge the final partition of a partitioned disk; expand a UFS
20file system; or expand a zpool device, as appropriate.
21.Pp
22The following option in
23.Pa /etc/rc.conf
24controls the behavior of
25.Nm :
26.Bl -tag -width "growfs_postboot_enable" -offset indent
27.It Va growfs_postboot_enable
28.Pq Dq Li NO
29If set to
30.Dq Li YES ,
31the script will enlarge partitions and file systems when disks expand.
32.El
33.Pp
34Note that the
35.Xr growfs 7
36startup script will normally place a swap partition at the end of the disk
37containing the root file system, which will prevent the file system growing
38further; as such, in most cases it will be advisable to set
39.Va growfs_swap_size
40to
41.Dq Li 0
42in virtual machine images if
43.Nm
44is being enabled.
45If the system has already booted without that setting, a swap partition may
46have already been created, in which case it must be removed before this script
47can grow the root file system.
48.Sh FILES
49.Bl -tag -compact -width Pa
50.It Pa /etc/rc.conf
51.El
52.Sh EXIT STATUS
53.Ex -std
54.Sh SEE ALSO
55.Xr rc.conf 5 ,
56.Xr growfs 7 ,
57.Xr devd 8 ,
58.Xr growfs 8 ,
59.Xr zpool 8
60.Sh HISTORY
61The
62.Nm
63script first appeared in
64.Fx 16.0 .
65.Sh AUTHORS
66.An Colin Percival Aq Mt cperciva@FreeBSD.org
67.Sh CAVEATS
68I/O may be paused while file systems grow, so this functionality should be used
69with care on systems with strict latency requirements.
70