Blame gfs2/man/mkfs.gfs2.8

Packit Service 360c39
.TH mkfs.gfs2 8
Packit Service 360c39
Packit Service 360c39
.SH NAME
Packit Service 360c39
mkfs.gfs2 - create a gfs2 filesystem
Packit Service 360c39
Packit Service 360c39
.SH SYNOPSIS
Packit Service 360c39
.B mkfs.gfs2
Packit Service 360c39
[\fIoptions\fR] \fIdevice\fR \fI[block-count]\fR
Packit Service 360c39
Packit Service 360c39
.SH DESCRIPTION
Packit Service 360c39
mkfs.gfs2 is used to create a gfs2 file system.
Packit Service 360c39
Packit Service 360c39
.SH OPTIONS
Packit Service 360c39
The default values of the following options have been chosen for best results.
Packit Service 360c39
In most cases, there should be no need to choose different values. The
Packit Service 360c39
exceptions to this are the number of journals (\fB-j\fP) and the lock table
Packit Service 360c39
(\fB-t\fP), as these options will be specific to your cluster.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-b\fP \fIbytes\fR
Packit Service 360c39
Set the filesystem block size to \fIbytes\fR which must be a power of two. The
Packit Service 360c39
minimum block size is 512 and the block size cannot exceed the machine's memory
Packit Service 360c39
page size, which on most architectures is 4096 bytes.  The default block size
Packit Service 360c39
is 4096 bytes.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-c\fP \fImegabytes\fR
Packit Service 360c39
Initial size of each journal's quota change file. The default is 1MB.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-D\fP
Packit Service 360c39
Enable debugging output.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-h\fP
Packit Service 360c39
Print out a help message describing the available options, then exit.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-J\fP \fImegabytes\fR
Packit Service 360c39
The size of each journal. The minimum size is 8 megabytes and the maximum is
Packit Service 360c39
1024. If this is not specified, a value based on a sensible proportion of the
Packit Service 360c39
file system will be chosen.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-j\fP \fIjournals\fR
Packit Service 360c39
The number of journals for mkfs.gfs2 to create.  At least one journal is
Packit Service 360c39
required for each machine that will mount the filesystem concurrently.  If this
Packit Service 360c39
option is not specified, only one journal will be created. This number may be
Packit Service 360c39
used as an indicator of the number of nodes in the cluster in order to optimize
Packit Service 360c39
the layout of the filesystem. As such, it is best to set this option with the
Packit Service 360c39
maximum number of mounters in mind than to add more journals later.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-K\fP
Packit Service 360c39
Do not attempt to discard the block device contents. Issuing discards to the
Packit Service 360c39
device allows some solid state devices and sparse or thin-provisioned storage
Packit Service 360c39
devices to optimise free space. Other devices may emulate this behaviour by
Packit Service 360c39
zeroing the device contents, which can be a slow process.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-O\fP
Packit Service 360c39
Override. This option prevents mkfs.gfs2 from asking for confirmation before
Packit Service 360c39
writing the filesystem.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-o\fP
Packit Service 360c39
Specify extended options. Multiple options can be separated by commas. Valid
Packit Service 360c39
extended options are:
Packit Service 360c39
.RS 1.0i
Packit Service 360c39
.TP
Packit Service 360c39
.BI help
Packit Service 360c39
Display an extended options help summary, then exit.
Packit Service 360c39
.TP
Packit Service 360c39
.BI sunit= bytes
Packit Service 360c39
This is used to specify the stripe unit for a RAID device or striped logical
Packit Service 360c39
volume.  This option ensures that resource groups will be stripe unit aligned
Packit Service 360c39
and overrides the stripe unit value obtained by probing the device. This value
Packit Service 360c39
must be a multiple of the file system block size and must be specified with the
Packit Service 360c39
.I swidth
Packit Service 360c39
option.
Packit Service 360c39
.TP
Packit Service 360c39
.BI swidth= bytes
Packit Service 360c39
This is used to specify the stripe width for a RAID device or striped logical
Packit Service 360c39
volume.  This option ensures that resource groups will be stripe aligned and
Packit Service 360c39
overrides the stripe width value obtained by probing the device. This value
Packit Service 360c39
must be a multiple of the
Packit Service 360c39
.I sunit
Packit Service 360c39
option and must also be specified with it.
Packit Service 360c39
.TP
Packit Service 360c39
.BI align= [0|1]
Packit Service 360c39
Disable or enable the alignment of resource groups. The default behaviour is to
Packit Service 360c39
align resource groups to the stripe width and stripe unit values obtained from
Packit Service 360c39
probing the device or specified with the
Packit Service 360c39
.I swidth
Packit Service 360c39
and
Packit Service 360c39
.I sunit
Packit Service 360c39
extended options.
Packit Service 360c39
.RE
Packit Service 360c39
.TP
Packit Service 360c39
\fB-p\fP \fIprotocol\fR
Packit Service 360c39
Specify the locking protocol to use when no locking protocol is specified at
Packit Service 360c39
mount time. Valid locking protocols are:
Packit Service 360c39
.RS 1.0i
Packit Service 360c39
.TP
Packit Service 360c39
.BI lock_dlm
Packit Service 360c39
This is the default. It enables DLM-based locking for use in shared storage
Packit Service 360c39
configurations.
Packit Service 360c39
.TP
Packit Service 360c39
.BI lock_nolock
Packit Service 360c39
This enables single-node locking
Packit Service 360c39
.RE
Packit Service 360c39
.TP
Packit Service 360c39
\fB-q\fP
Packit Service 360c39
Quiet mode. Do not print anything.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-r\fP \fImegabytes\fR
Packit Service 360c39
mkfs.gfs2 will try to make resource groups approximately this large.  The
Packit Service 360c39
minimum resource group size is 32 MB and the maximum is 2048 MB.  A large
Packit Service 360c39
resource group size may increase performance on very large file systems.  If
Packit Service 360c39
not specified, mkfs.gfs2 will choose the resource group size based on the
Packit Service 360c39
size and alignment characteristics of the target device.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-t\fP \fIclustername:lockspace\fR
Packit Service 360c39
The "lock table" pair used to uniquely identify this filesystem in a cluster.
Packit Service 360c39
The cluster name segment (maximum 32 characters) must match the name given to
Packit Service 360c39
your cluster in its configuration; only members of this cluster are permitted
Packit Service 360c39
to use this file system.  The lockspace segment (maximum 30 characters) is a
Packit Service 360c39
unique file system name used to distinguish this gfs2 file system.  Valid
Packit Service 360c39
\fIclustername\fRs and \fIlockspace\fRs may only contain alphanumeric
Packit Service 360c39
characters, hyphens (-) and underscores (_).
Packit Service 360c39
.TP
Packit Service 360c39
\fB-V\fP
Packit Service 360c39
Print program version information, then exit.
Packit Service 360c39
.TP
Packit Service 360c39
\fIblock-count\fR
Packit Service 360c39
Use \fIblock-count\fR as the size of the filesystem instead of using the whole
Packit Service 360c39
device. \fIblock-count\fR is specified as a number of filesystem blocks.
Packit Service 360c39
.SH EXAMPLE
Packit Service 360c39
.nf
Packit Service 360c39
.RS
Packit Service 360c39
# mkfs.gfs2 -t mycluster:mygfs2 -p lock_dlm -j 2 /dev/vg0/lv_gfs2
Packit Service 360c39
.PP
Packit Service 360c39
This will create a gfs2 filesystem on the block device /dev/vg0/lv_gfs2.  It
Packit Service 360c39
will belong to a cluster named "mycluster" and use the "mygfs2" lock space.  It
Packit Service 360c39
will use DLM for locking and create journals for a two-node cluster.
Packit Service 360c39
.PP
Packit Service 360c39
# mkfs.gfs2 -t mycluster:mygfs2 -p lock_nolock -j 3 /dev/vg0/lv_gfs2
Packit Service 360c39
.PP
Packit Service 360c39
This will create a filesystem on the block device /dev/vg0/lv_gfs2.  It
Packit Service 360c39
will belong to a cluster named "mycluster" and use the "mygfs2" lockspace, but
Packit Service 360c39
it will have no cluster locking by default as lock_nolock is used.  It will
Packit Service 360c39
have journals for a three-node cluster.
Packit Service 360c39
.RE
Packit Service 360c39
.fi
Packit Service 360c39
.SH SEE ALSO
Packit Service 360c39
.BR gfs2 (5),
Packit Service 360c39
.BR gfs2_jadd (8),
Packit Service 360c39
.BR gfs2_grow (8)