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