Changeset View
Changeset View
Standalone View
Standalone View
share/man/man7/growfs.7
Show All 18 Lines | |||||||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||||||
.\" | .\" | ||||||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||||||
.\" | .\" | ||||||||
.Dd May 3, 2020 | .Dd November 22, 2022 | ||||||||
.Dt GROWFS 7 | .Dt GROWFS 7 | ||||||||
.Os | .Os | ||||||||
.Sh NAME | .Sh NAME | ||||||||
.Nm growfs | .Nm growfs , | ||||||||
.Nd start up script to grow the root file-system | .Nm growfs_fstab | ||||||||
.Nd start up scripts to grow the root file system and add swap | |||||||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||||||
The | |||||||||
.Nm | |||||||||
script normally runs at the first boot after system installation. | |||||||||
If the boot disk is larger than the root file system and boot partitions, | |||||||||
.Nm | |||||||||
can expand the root file system. | |||||||||
It can also add a swap partition, with a default size of 10% of the boot disk, | |||||||||
but no more than double the memory size. | |||||||||
The | |||||||||
.Nm growfs_fstab | |||||||||
pauamma_gundo.comUnsubmitted Not Done Inline Actions
pauamma_gundo.com: | |||||||||
Done Inline ActionsOops, thanks for catching that. karels: Oops, thanks for catching that. | |||||||||
script adds any new swap partition to | |||||||||
.Pa /etc/fstab | |||||||||
after the root file system is made writable, | |||||||||
and enables its use as a dump partition. | |||||||||
.Pp | |||||||||
The following options in | The following options in | ||||||||
.Pa /etc/rc.conf | .Pa /etc/rc.conf | ||||||||
control the behavior of | control the behavior of | ||||||||
.Nm : | .Nm : | ||||||||
.Bl -tag -width ".Va growfs_enable" -offset indent | .Bl -tag -width ".Va growfs_swap_size" -offset indent | ||||||||
.It Va growfs_enable | .It Va growfs_enable | ||||||||
.Pq Dq Li NO | .Pq Dq Li NO | ||||||||
If set to | If set to | ||||||||
.Dq Li YES , | .Dq Li YES , | ||||||||
the first time the machine boots, the root file-system will be automatically | the first time the machine boots, the root file system will be automatically | ||||||||
expanded, if possible, to fill up all available space after it. | expanded, if possible, to fill up all available space after it, | ||||||||
after optionally adding a swap device at the end. | |||||||||
.It Va growfs_swap_size | |||||||||
.Pq Dq Li \& | |||||||||
If set to | |||||||||
.Dq Li 0 , | |||||||||
the addition of a swap partition is disabled. | |||||||||
An empty value | |||||||||
.Pq Dq Li \& | |||||||||
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. | |||||||||
Not Done Inline ActionsShould that be "the next time"? (That is, the first time after it's set to YES.) pauamma_gundo.com: Should that be "the next time"? (That is, the first time after it's set to YES.) | |||||||||
Done Inline ActionsNo, the script runs only on the first boot (unless it is run manually with "onestart" as described below). karels: No, the script runs only on the first boot (unless it is run manually with "onestart" as… | |||||||||
.El | .El | ||||||||
.Pp | .Pp | ||||||||
To expand the root file-system with-out rebooting, run the following command: | A setting for | ||||||||
.Va growfs_swap_size | |||||||||
can be set in the kernel environment, in which case it overrides | |||||||||
the value from | |||||||||
.Pa /etc/rc.conf . | |||||||||
.Pp | |||||||||
To expand the root file system without rebooting, run the following command: | |||||||||
.Dl % /etc/rc.d/growfs onestart | .Dl % /etc/rc.d/growfs onestart | ||||||||
In addition, if a swap partition is added, run the command: | |||||||||
.Dl % /etc/rc.d/growfs_fstab onestart | |||||||||
Note that 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. | |||||||||
.Sh IMPLEMENTATION NOTES | .Sh IMPLEMENTATION NOTES | ||||||||
The script requires that | The script requires that | ||||||||
.Pa awk | .Pa awk | ||||||||
be present and on the path. | be present and in the path. | ||||||||
Not Done Inline Actions
While here. pauamma_gundo.com: While here. | |||||||||
Done Inline ActionsChanged in my copy, will push it soon with any other changes. karels: Changed in my copy, will push it soon with any other changes. | |||||||||
This usually means that | This usually means that | ||||||||
.Pa /usr | .Pa /usr | ||||||||
should be mounted prior to running the script. | should be mounted prior to running the script. | ||||||||
.Sh FILES | .Sh FILES | ||||||||
.Pa /etc/rc.conf | .Bl -tag -compact -width Pa | ||||||||
.It Pa /etc/fstab | |||||||||
.It Pa /etc/rc.conf | |||||||||
.El | |||||||||
.Sh EXIT STATUS | .Sh EXIT STATUS | ||||||||
.Ex -std | .Ex -std | ||||||||
.Sh SEE ALSO | |||||||||
.Xr fstab 5 , | |||||||||
.Xr rc.conf 5 | |||||||||
.Sh HISTORY | .Sh HISTORY | ||||||||
The | The | ||||||||
.Nm | .Nm | ||||||||
manual page first appeared in | manual page first appeared in | ||||||||
.Fx 10.1 . | .Fx 10.1 . | ||||||||
.Sh SEE ALSO | The ability to add a swap partition was added in | ||||||||
.Xr rc.conf 5 | .Fx 14.0 . | ||||||||
.Sh AUTHORS | .Sh AUTHORS | ||||||||
The man page and script were written by | The man page and script were written by | ||||||||
.An John-Mark Gurney Aq Mt jmg@FreeBSD.org . | .An John-Mark Gurney Aq Mt jmg@FreeBSD.org . | ||||||||
The ability to create a swap partition was added by | |||||||||
.An Michael Karels Aq Mt karels@FreeBSD.org . |