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