|| FreeBSD System Manager's Manual
expand an existing UFS file system
|| [ -Ny][ -s size] special | filesystem
utility makes it possible to expand an UFS file system. Before running
the partition or slice containing the file system must be extended using
. If you are using volumes you must enlarge them by using
utility extends the size of the file system on the specified special file. The following options are available:
“Test mode”. Causes the new file system parameters to be printed out without actually enlarging the file system.
“Expert mode”. Usually
growfs will ask you if you took a backup of your data before and will do some tests whether
special is currently mounted or whether there are any active snapshots on the file system specified. This will be suppressed. So use this option with great care!
size of the file system after enlarging in sectors.
Size is the number of 512 byte sectors unless suffixed with a
t which denotes byte, kilobyte, megabyte, gigabyte and terabyte respectively. This value defaults to the size of the raw partition specified in
special (in other words,
growfs will enlarge the file system to the size of the entire partition).
growfs -s 2G /dev/ada0p1
will enlarge /dev/ada0p1 up to 2GB if there is enough space in /dev/ada0p1.
growfs utility first appeared in
FreeBSD 4.4. The ability to resize mounted filesystems was added in
CAVEATS When expanding a file system mounted read-write, any writes to that file system will be temporarily suspended until the expansion is finished.
growfs writes cylinder group summary to disk and reads it again later for doing more updates. This read operation will provide unexpected data when using
-N. Therefore, this part cannot really be simulated and will be skipped in test mode.