blob: e23d30e28a8d53ac89f4a6db42e429cbbcd5b221 [file] [log] [blame]
.\" Verbatim blocks taken from openssl req manpage content
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.TH xfs_growfs 8
.SH NAME
xfs_growfs, xfs_info \- expand an XFS filesystem
.SH SYNOPSIS
.B xfs_growfs
[
.B \-dilnrx
] [
.B \-D
.I size
] [
.B \-e
.I rtextsize
] [
.B \-L
.I size
] [
.B \-m
.I maxpct
] [
.B \-t
.I mtab
] [
.B \-R
.I size
]
.I mount-point
.br
.B xfs_growfs \-V
.PP
.br
.B xfs_info
[
.B \-t
.I mtab
]
.I mount-point
.br
.B xfs_info \-V
.SH DESCRIPTION
.B xfs_growfs
expands an existing XFS filesystem (see
.BR xfs (5)).
The
.I mount-point
argument is the pathname of the directory where the filesystem
is mounted. The filesystem must be mounted to be grown (see
.BR mount (8)).
The existing contents of the filesystem are undisturbed, and the added space
becomes available for additional file storage.
.PP
.B xfs_info
is equivalent to invoking
.B xfs_growfs
with the
.B \-n
option (see discussion below).
.SH OPTIONS
.TP
.BI "\-d | \-D " size
Specifies that the data section of the filesystem should be grown. If the
.B \-D
.I size
option is given, the data section is grown to that
.IR size ,
otherwise the data section is grown to the largest size possible with the
.B \-d
option. The size is expressed in filesystem blocks.
.TP
.B \-e
Allows the real-time extent size to be specified. In
.BR mkfs.xfs (8)
this is specified with
.B \-r extsize=\c
.IR nnnn .
.TP
.B \-i
The new log is an internal log (inside the data section).
.B [NOTE: This option is not implemented]
.TP
.BI "\-l | \-L " size
Specifies that the log section of the filesystem should be grown,
shrunk, or moved. If the
.B \-L
.I size
option is given, the log section is changed to be that
.IR size ,
if possible. The size is expressed in filesystem blocks.
The size of an internal log must be smaller than the size
of an allocation group (this value is printed at
.BR mkfs (8)
time). If neither
.B \-i
nor
.B \-x
is given with
.BR \-l ,
the log continues to be internal or external as it was before.
.B [NOTE: These options are not implemented]
.TP
.B \-m
Specify a new value for the maximum percentage
of space in the filesystem that can be allocated as inodes. In
.BR mkfs.xfs (8)
this is specified with
.B -i maxpct=\c
.IR nn .
.TP
.B \-n
Specifies that no change to the filesystem is to be made.
The filesystem geometry is printed, and argument checking is performed,
but no growth occurs.
.B See output examples below.
.TP
.BI "\-r | \-R " size
Specifies that the real-time section of the filesystem should be grown. If the
.B \-R
.I size
option is given, the real-time section is grown to that size, otherwise
the real-time section is grown to the largest size possible with the
.B \-r
option. The size is expressed in filesystem blocks.
The filesystem does not need to have contained a real-time section before
the
.B xfs_growfs
operation.
.TP
.B \-t
Specifies an alternate mount table file (default is
.I /proc/mounts
if it exists, else
.IR /etc/mtab ).
This is used when working with filesystems mounted without writing to
.I /etc/mtab
file - refer to
.BR mount (8)
for further details.
.TP
.B \-V
Prints the version number and exits. The
.I mount-point
argument is not required with
.BR \-V .
.PP
.B xfs_growfs
is most often used in conjunction with
logical volumes
(see
.BR md (4)
and
.BR lvm (8)
on Linux).
However, it can also be used on a regular disk partition, for example if a
partition has been enlarged while retaining the same starting block.
.SH PRACTICAL USE
Filesystems normally occupy all of the space on the device where they
reside. In order to grow a filesystem, it is necessary to provide added
space for it to occupy. Therefore there must be at least one spare new
disk partition available. Adding the space is often done through the use
of a logical volume manager.
.SH "EXAMPLES"
Understanding xfs_info output.
.PP
Suppose one has the following "xfs_info /dev/sda" output:
.PP
.RS 2
.Vb
\&meta-data=/dev/sda isize=256 agcount=32, agsize=16777184 blks
\& = sectsz=512 attr=2
\&data = bsize=4096 blocks=536869888, imaxpct=5
\& = sunit=32 swidth=128 blks
\&naming =version 2 bsize=4096
\&log =internal bsize=4096 blocks=32768, version=2
\& = sectsz=512 sunit=32 blks, lazy-count=1
\&realtime =none extsz=524288 blocks=0, rtextents=0
.Ve
.RE
.PP
Here, the data section of the output indicates "bsize=4096",
meaning the data block size for this filesystem is 4096 bytes.
This section also shows "sunit=32 swidth=128 blks", which means
the stripe unit is 32*4096 bytes = 128 kibibytes and the stripe
width is 128*4096 bytes = 512 kibibytes.
A single stripe of this filesystem therefore consists
of four stripe units (128 blocks / 32 blocks per unit).
.SH SEE ALSO
.BR mkfs.xfs (8),
.BR md (4),
.BR lvm (8),
.BR mount (8).