1mkfs.gfs2(8)                System Manager's Manual               mkfs.gfs2(8)
2
3
4

NAME

6       mkfs.gfs2 - Make a GFS2 filesystem
7
8

SYNOPSIS

10       mkfs.gfs2 [OPTION]... DEVICE [ block-count ]
11
12

DESCRIPTION

14       mkfs.gfs2 is used to create a Global File System.
15
16

OPTIONS

18       -b BlockSize
19              Set  the  filesystem block size to BlockSize (must be a power of
20              two).  The minimum block size is 512.  The FS block size  cannot
21              exceed  the  machine's  memory page size.  On the most architec‐
22              tures (i386, x86_64, s390, s390x), the memory page size is  4096
23              bytes.   On  other  architectures it may be bigger.  The default
24              block size is 4096 bytes.  In general, GFS2  filesystems  should
25              not deviate from the default value.
26
27       -c MegaBytes
28              Initial size of each journal's quota change file
29
30       -D     Enable debugging output.
31
32       -h     Print   out   a   help   message  describing  available options,
33              then exit.
34
35       -J MegaBytes
36              The size of the journals in Megabytes. The default journal  size
37              is 128 megabytes.  The minimum size is 8 megabytes.
38
39       -j Number
40              The  number  of  journals  for gfs2_mkfs to create.  You need at
41              least one journal per machine that will  mount  the  filesystem.
42              If this option is not specified, one journal will be created.
43
44       -K     Keep,  do not attempt to discard blocks at mkfs time (discarding
45              blocks initially is useful on solid state devices and  sparse  /
46              thin-provisioned storage).
47
48       -O     This  option  prevents  gfs2_mkfs  from  asking for confirmation
49              before writing the filesystem.
50
51       -p LockProtoName
52              LockProtoName is the name of  the   locking   protocol  to  use.
53              Acceptable  locking  protocols are lock_dlm (for shared storage)
54              or if you are using GFS2 as a local filesystem  (1  node  only),
55              you can specify the lock_nolock protocol.  If this option is not
56              specified, lock_dlm protocol will be assumed.
57
58       -q     Be quiet.  Don't print anything.
59
60       -r MegaBytes
61              gfs2_mkfs will try to make Resource Groups about this big.  Min‐
62              imum  RG size is 32 MB.  Maximum RG size is 2048 MB.  A large RG
63              size may increase performance on very large  file  systems.   If
64              not  specified,  mkfs.gfs2  will choose the RG size based on the
65              size of the file system: average size file systems will have 256
66              MB  RGs, and bigger file systems will have bigger RGs for better
67              performance.
68
69       -t LockTableName
70              The lock table field  appropriate  to  the  lock  module  you're
71              using.   It  is clustername:fsname.  Clustername must match that
72              in cluster.conf; only members of this cluster are  permitted  to
73              use  this file system.  Fsname is a unique file system name used
74              to distinguish this GFS2 file system from others created  (1  to
75              16 characters).  Lock_nolock doesn't use this field.
76
77       -u MegaBytes
78              Initial size of each journal's unlinked tag file
79
80       -V     Print program version information, then exit.
81
82
83       [ block-count ]
84              Make  the  file  system this many blocks in size.  If not speci‐
85              fied, the entire length of the specified device is used.
86
87

EXAMPLE

89       gfs2_mkfs -t mycluster:mygfs2 -p lock_dlm -j 2 /dev/vg0/mygfs2
90              This will  make  a  Global  File  System  on  the  block  device
91              "/dev/vg0/mygfs2".   It  will belong to "mycluster" and register
92              itself as wanting locking for "mygfs2".  It  will  use  DLM  for
93              locking and make two journals.
94
95       gfs2_mkfs -t mycluster:mygfs2 -p lock_nolock -j 3 /dev/vg0/mygfs2
96              This  will  make  a  Global  File  System  on  the  block device
97              "/dev/vg0/mygfs2".  It will belong to "mycluster" and  but  have
98              no cluster locking.  It will have three journals.
99
100
101
102                                                                  mkfs.gfs2(8)
Impressum