1.\" Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz 2.\" Copyright (c) 1980, 1989, 1993 The Regents of the University of California. 3.\" All rights reserved. 4.\" 5.\" This code is derived from software contributed to Berkeley by 6.\" Christoph Herrmann and Thomas-Henning von Kamptz, Munich and Frankfurt. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. All advertising materials mentioning features or use of this software 17.\" must display the following acknowledgment: 18.\" This product includes software developed by the University of 19.\" California, Berkeley and its contributors, as well as Christoph 20.\" Herrmann and Thomas-Henning von Kamptz. 21.\" 4. Neither the name of the University nor the names of its contributors 22.\" may be used to endorse or promote products derived from this software 23.\" without specific prior written permission. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 26.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 29.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35.\" SUCH DAMAGE. 36.\" 37.\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ 38.\" 39.Dd January 23, 2025 40.Dt GROWFS 8 41.Os 42.Sh NAME 43.Nm growfs 44.Nd expand an existing UFS file system 45.Sh SYNOPSIS 46.Nm 47.Op Fl Ny 48.Op Fl s Ar size 49.Ar special | filesystem 50.Sh DESCRIPTION 51The 52.Nm 53utility makes it possible to expand an UFS file system. 54Before running 55.Nm 56the partition or slice containing the file system must be extended using 57.Xr gpart 8 . 58The 59.Nm 60utility extends the size of the file system on the specified special file. 61The following options are available: 62.Bl -tag -width "-s size" 63.It Fl N 64.Dq Test mode . 65Causes the new file system parameters to be printed out without actually 66enlarging the file system. 67.It Fl s Ar size 68Determines the 69.Ar size 70of the file system after enlarging in sectors. 71.Ar Size 72is the number of 512 byte sectors unless suffixed with a 73.Cm b , k , m , g , 74or 75.Cm t 76which 77denotes byte, kilobyte, megabyte, gigabyte and terabyte respectively. 78This value defaults to the size of the raw partition specified in 79.Ar special 80(in other words, 81.Nm 82will enlarge the file system to the size of the entire partition). 83.It Fl y 84Causes 85.Nm 86to assume yes 87as the answer to all operator questions. 88.El 89.Sh EXIT STATUS 90Exit status is 0 on success, and >= 1 on errors. 91Errors recoverable by user action are indicated by 2. 92OS errors, which are usually not recoverable, are indicated by 3 or greater. 93.Sh EXAMPLES 94Expand root file system to fill up available space: 95.Dl growfs / 96.Pp 97Refresh the LUN size, resize the partition to use all available 98capacity, and expand the filesystem accordingly: 99.Dl camcontrol reprobe da0 100.Dl gpart recover da0 101.Dl gpart resize -i 1 da0 102.Dl growfs /dev/da0p1 103.Sh SEE ALSO 104.Xr growfs 7 , 105.Xr camcontrol 8 , 106.Xr fsck 8 , 107.Xr gpart 8 , 108.Xr newfs 8 , 109.Xr tunefs 8 110.Sh HISTORY 111The 112.Nm 113utility first appeared in 114.Fx 4.4 . 115The ability to resize mounted file systems was added in 116.Fx 10.0 . 117.Sh AUTHORS 118.An Christoph Herrmann Aq Mt chm@FreeBSD.org 119.An Thomas-Henning von Kamptz Aq Mt tomsoft@FreeBSD.org 120.An The GROWFS team Aq Mt growfs@Tomsoft.COM 121.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org 122.Sh CAVEATS 123When expanding a file system mounted read-write, any writes to that file system 124will be temporarily suspended until the expansion is finished. 125.Sh BUGS 126Normally 127.Nm 128writes cylinder group summary to disk and reads it again later for doing more 129updates. 130This read operation will provide unexpected data when using 131.Fl N . 132Therefore, this part cannot really be simulated and will be skipped in test 133mode. 134