~wb-munzinger/+junk/ocfs2-tools

« back to all changes in this revision

Viewing changes to mkfs.ocfs2/mkfs.ocfs2.8

  • Committer: David Weber
  • Date: 2012-01-30 08:42:00 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: wb@munzinger.de-20120130084200-c8cy478mu9fk7tkf
Import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "mkfs.ocfs2" "8" "September 2010" "Version 1.6.3" "OCFS2 Manual Pages"
2
 
.SH "NAME"
3
 
mkfs.ocfs2 \- Creates an \fIOCFS2\fR file system.
4
 
.SH "SYNOPSIS"
5
 
\fBmkfs.ocfs2\fR [\fB\-b\fR \fIblock\-size\fR] [\fB\-C\fR \fIcluster\-size\fR] [\fB\-L\fR \fIvolume\-label\fR] [\fB\-M\fR \fImount-type\fR] [\fB\-N\fR \fInumber\-of\-nodes\fR] [\fB\-J\fR \fIjournal\-options\fR] [\fB\-\-fs\-features=\fR\fI[no]sparse...\fR] [\fB\-\-fs\-feature\-level=\fR\fIfeature\-level\fR] [\fB\-T\fR \fIfilesystem\-type\fR] [\fB\-FqvV\fR] \fIdevice\fR [\fIblocks-count\fI]
6
 
.SH "DESCRIPTION"
7
 
.PP
8
 
\fBmkfs.ocfs2\fR is used to create an \fIOCFS2\fR file system on a \fIdevice\fR,
9
 
usually a partition on a shared disk. In order to prevent data loss,
10
 
\fBmkfs.ocfs2\fR will not format an existing \fIOCFS2\fR volume if it
11
 
detects that it is mounted on another node in the cluster. This tool
12
 
requires the cluster service to be online.
13
 
 
14
 
.SH "OPTIONS"
15
 
.TP
16
 
\fB\-b, \-\-block\-size\fR \fIblock\-size\fR
17
 
Valid block size values are 512, 1K, 2K and 4K bytes per block. If
18
 
omitted, a value will be heuristically determined based on the
19
 
expected usage of the file system (see the \fB\-T\fR option). A block
20
 
size of 512 bytes is never recommended. Choose 1K, 2K or 4K.
21
 
 
22
 
.TP
23
 
\fB\-C, \-\-cluster\-size\fR \fIcluster\-size\fR
24
 
Valid cluster size values are 4K, 8K, 16K, 32K, 64K, 128K, 256K, 512K
25
 
and 1M. If omitted, a value will be heuristically determined based on
26
 
the expected usage of the file system (see the \fB\-T\fR option). For
27
 
volumes expected to store large files, like database files, while a
28
 
cluster size of 128K or more is recommended, one can opt for a smaller
29
 
size as long as that value is not smaller than the database block size.
30
 
For others, use 4K.
31
 
 
32
 
.TP
33
 
\fB\-F, \-\-force\fR
34
 
For existing \fIOCFS2\fR volumes, \fImkfs.ocfs2\fR ensures the volume
35
 
is not mounted on any node in the cluster before formatting. For that to
36
 
work, \fImkfs.ocfs2\fR expects the cluster service to be online.
37
 
Specify this option to disable this check.
38
 
 
39
 
.TP
40
 
\fB\-J, \-\-journal-options\fR \fIoptions\fR
41
 
Create the journal using options specified on the command\-line. Journal
42
 
options are comma separated, and may take an argument using the equals
43
 
('=') sign. The following options are supported:
44
 
.RS 1.2i
45
 
.TP
46
 
\fBsize\fR=\fIjournal\-size\fR
47
 
Create a journal of size \fIjournal\-size\fR. Minimum size is 4M.
48
 
If omitted, a value is heuristically determined based upon the file system size.
49
 
.RE
50
 
.RS 1.2i
51
 
.TP
52
 
\fBblock32\fR
53
 
Use a standard 32bit journal.  The journal will be able to access up to
54
 
2^32-1 blocks.  This is the default.  It has been the journal format for
55
 
\fIOCFS2\fR volumes since the beginning.  The journal is compatible with
56
 
all versions of \fIOCFS2\fR.  Prepending \fBno\fR is equivalent to the
57
 
\fBblock64\fR journal option.
58
 
.RE
59
 
.RS 1.2i
60
 
.TP
61
 
\fBblock64\fR
62
 
Use a 64bit journal.  The journal will be able to access up to 2^64-1
63
 
blocks.  This allows large filesystems that can extend to the
64
 
theoretical limits of \fIOCFS2\fR.  It requires a new-enough filesystem
65
 
driver that uses the new journalled block device, \fBJBD2\fR. Prepending
66
 
\fBno\fR is equivalent to the \fBblock32\fR journal option.
67
 
.RE
68
 
 
69
 
.TP
70
 
\fB\-L, \-\-label\fR \fIvolume\-label\fR
71
 
Set the volume label for the file system. This is
72
 
useful for mounting\-by\-label. Limit the label to under 64 bytes.
73
 
 
74
 
.TP
75
 
\fB\-M, \-\-mount\fR \fImount\-type\fR
76
 
Valid types are \fIlocal\fR and \fIcluster\fR. Local mount allows users
77
 
to mount the volume without the cluster overhead and works only with \fIOCFS2\fR
78
 
bundled with Linux kernels 2.6.20 or later. Defaults to \fIcluster\fR.
79
 
 
80
 
.TP
81
 
\fB\-N, \-\-node\-slots\fR \fInumber\-of\-node\-slots\fR
82
 
Valid number ranges from 1 to 255. This number specifies the maximum
83
 
number of nodes that can concurrently mount the partition. If omitted,
84
 
the number defaults to 8. The number of slots can be later tuned up or
85
 
down using \fItunefs.ocfs2\fR.
86
 
 
87
 
.TP
88
 
\fB\-T\fR \fIfilesystem\-type\fR
89
 
Specify how the filesystem is going to be used, so that \fImkfs.ocfs2\fR can
90
 
chose optimal filesystem parameters for that use. The supported
91
 
filesystem types are:
92
 
.RS 1.2i
93
 
.TP
94
 
\fBmail\fR
95
 
Appropriate for file systems that will host lots of small files.
96
 
.RE
97
 
.RS 1.2i
98
 
.TP
99
 
\fBdatafiles\fR
100
 
Appropriate for file systems that will host a relatively small number
101
 
of very large files.
102
 
.RE
103
 
.RS 1.2i
104
 
.TP
105
 
\fBvmstore\fR
106
 
Appropriate for file systems that will host Virtual machine images.
107
 
.RE
108
 
 
109
 
.TP
110
 
\fB\-\-fs\-features=\fR\fR\fI[no]sparse...\fR
111
 
Turn specific file system features on or off. A comma separated list of feature flags can be provided, and \fImkfs.ocfs2\fR will try to create the file system with those features set according to the list. To turn a feature on, include it in the list. To turn a feature off, prepend \fBno\fR to the name. Choices here will override individual features set via the \fB\-\-fs\-feature\-level\fR option. \fBRefer to the section titled feature compatibility before selecting specific features.\fR The following flags are supported:
112
 
.RS 1.2i
113
 
.TP
114
 
\fBbackup-super\fR
115
 
\fImkfs.ocfs2\fR, by default, makes up to 6 backup copies of the super block at offsets 1G, 4G, 16G, 64G, 256G and 1T depending on the size of the volume.  This can be useful in disaster recovery. This feature is fully compatible with all versions of the file system and generally should not be disabled.
116
 
.RE
117
 
.RS 1.2i
118
 
.TP
119
 
\fBlocal\fR
120
 
Create the file system as a local mount, so that it can be mounted without a cluster stack.
121
 
.RE
122
 
.RS 1.2i
123
 
.TP
124
 
\fBsparse\fR
125
 
Enable support for sparse files. With this, \fIOCFS2\fR can avoid allocating (and zeroing) data to fill holes. Turn this feature on if you can, otherwise extends and some writes might be less performant.
126
 
.RE
127
 
.RS 1.2i
128
 
.TP
129
 
\fBunwritten\fR
130
 
Enable unwritten extents support. With this turned on, an application can request that a range of clusters be pre-allocated within a file. \fIOCFS2\fR will mark those extents with a special flag so that expensive data zeroing doesn't have to be performed. Reads and writes to a pre-allocated region act as reads and writes to a hole, except a write will not fail due to lack of data allocation. This feature requires \fBsparse\fR file support to be turned on.
131
 
.RE
132
 
.RS 1.2i
133
 
.TP
134
 
\fBinline-data\fR
135
 
Enable inline-data support. If this feature is turned on, \fIOCFS2\fR will store small files and directories inside the inode block. Data is transparently moved out to an extent when it no longer fits inside the inode block. In some cases, this can also make a positive impact on cold-cache directory and file operations.
136
 
.RE
137
 
.RS 1.2i
138
 
.TP
139
 
\fBextended-slotmap\fR
140
 
The slot-map is a hidden file on an \fIOCFS2\fR fs which is used to map mounted nodes to system file resources. The extended slot map allows a larger range of possible node numbers, which is useful for userspace cluster stacks. This feature is automatically turned on when needed, thus users have no need to turn this on manually.
141
 
.RE
142
 
.RS 1.2i
143
 
.TP
144
 
\fBmetaecc\fR
145
 
Enables metadata checksums. With this enabled, the file system computes and stores the checksums in all metadata blocks. It also computes and stores an error correction code capable of fixing single bit errors.
146
 
.RE
147
 
.RS 1.2i
148
 
.TP
149
 
\fBrefcount\fR
150
 
Enables creation of reference counted trees. With this enabled, the file system allows users to create inode-based snapshots and clones known as \fBreflinks\fR.
151
 
.RE
152
 
.RS 1.2i
153
 
.TP
154
 
\fBxattr\fR
155
 
Enable extended attributes support. With this enabled, users can attach name:value pairs to objects
156
 
within the file system. In \fIOCFS2\fR, the names can be upto 255 bytes in length, terminated by the first
157
 
NUL byte. While it is not required, printable names (ASCII) are recommended. The values can be upto 64KB of
158
 
arbitrary binary data. Attributes can be attached to all types of inodes: regular files, directories,
159
 
symbolic links, device nodes, etc. This feature is required for users wanting to use extended security
160
 
facilities like POSIX ACLs or SELinux.
161
 
.RE
162
 
.RS 1.2i
163
 
.TP
164
 
\fBusrquota\fR
165
 
Enable user quota support. With this feature enabled, filesystem will track amount of space
166
 
and number of inodes (files, directories, symbolic links) each user owns. It is then possible
167
 
to limit the maximum amount of space or inodes user can have. See a documentation of
168
 
quota-tools package for more details.
169
 
.RE
170
 
.RS 1.2i
171
 
.TP
172
 
\fBgrpquota\fR
173
 
Enable group quota support. With this feature enabled, filesystem will track amount of space
174
 
and number of inodes (files, directories, symbolic links) each group owns. It is then possible
175
 
to limit the maximum amount of space or inodes user can have. See a documentation of
176
 
quota-tools package for more details.
177
 
.RE
178
 
.RS 1.2i
179
 
.TP
180
 
\fBindexed-dirs\fR
181
 
Enable directory indexing support. With this feature enabled, the file system creates indexed tree for non-inline directory entries. For large scale directories, directory entry lookup perfromance from the indexed tree is faster then from the legacy directory blocks.
182
 
.RE
183
 
.RS 1.2i
184
 
.TP
185
 
\fBdiscontig-bg\fR
186
 
Enables discontiguous block groups. With this feature enabled, the file system is able to grow
187
 
the inode and the extent allocators even when there is no contiguous free chunk available. It
188
 
allows the file system to grow the allocators in smaller (discontiguous) chunks.
189
 
.RE
190
 
 
191
 
.TP
192
 
\fB\-\-fs\-feature\-level=\fR\fR\fIfeature\-level\fR
193
 
Choose from a set of pre-determined file-system features. This option is designed to allow users to conveniently choose a set of file system features which fits their needs. There is no downside to trying a set of features which your module might not support - if it won't mount the new file system simply reformat at a lower level. Feature levels can be fine-tuned via the \fB\-\-fs\-features\fR option. Currently, there are 3 types of feature levels:
194
 
.RS 1.2i
195
 
.TP
196
 
\fBmax-compat\fR
197
 
Chooses fewer features but ensures that the file system can be mounted from older versions of the \fIOCFS2\fR module.
198
 
.RE
199
 
.RS 1.2i
200
 
.TP
201
 
\fBdefault\fR
202
 
The default feature set tries to strike a balance between providing new features and maintaining compatibility with relatively recent versions of \fIOCFS2\fR. It currently enables \fBsparse\fR, \fBunwritten\fR \fBinline-data\fR and \fBxattr\fR. It also enables \fBrefcount\fR for the \fIvmstore\fR volumes.
203
 
.RE
204
 
.RS 1.2i
205
 
.TP
206
 
\fBmax-features\fR
207
 
Choose the maximum amount of features available. This will typically provide the best performance from \fIOCFS2\fR at the expense of creating a file system that is only compatible with very recent versions of the \fIOCFS2\fR kernel module.
208
 
.RE
209
 
 
210
 
.TP
211
 
\fB\-\-no-backup-super\fR
212
 
This option is deprecated, please use \fB--fs-features=nobackup-super\fR instead.
213
 
 
214
 
.TP
215
 
\fB\-n, --dry-run\fR
216
 
Display the heuristically determined values without overwriting the existing file system.
217
 
 
218
 
.TP
219
 
\fB\-q, \-\-quiet\fR
220
 
Quiet mode.
221
 
 
222
 
.TP
223
 
\fB\-v, \-\-verbose\fR
224
 
Verbose mode.
225
 
 
226
 
.TP
227
 
\fB\-V, \-\-version\fR
228
 
Print version and exit.
229
 
 
230
 
.TP
231
 
\fIblocks-count\fR
232
 
Usually \fBmkfs.ocfs2\fR automatically determines the size of the given device
233
 
and creates a file system that uses all of the available space on the
234
 
device.  This optional argument specifies that the file system should only
235
 
consume the given number of file system blocks (see \fB-b\fR) on the device.
236
 
 
237
 
.SH "FEATURE COMPATIBILITY"
238
 
This section lists the file system features that have been added to the \fIOCFS2\fR
239
 
file system and the version that it first appeared in. The table below lists the versions
240
 
of the mainline Linux kernel and that of the file system for the Enterprise Linux
241
 
Distributions. Users should use this information to enable only those features that
242
 
are available in the file system that they are using. Before enabling new features,
243
 
users are advised to review to the section titled \fBfeature values\fR.
244
 
 
245
 
.TS
246
 
CENTER ALLBOX;
247
 
LI LI LI
248
 
LB C C.
249
 
Feature Mainline Kernel Version Enterprise OCFS2 Version
250
 
local   Linux 2.6.20    OCFS2 1.2
251
 
sparse  Linux 2.6.22    OCFS2 1.4
252
 
unwritten       Linux 2.6.23    OCFS2 1.4
253
 
inline-data     Linux 2.6.24    OCFS2 1.4
254
 
extended-slotmap        Linux 2.6.27    OCFS2 1.6
255
 
metaecc Linux 2.6.29    OCFS2 1.6
256
 
grpquota        Linux 2.6.29    OCFS2 1.6
257
 
usrquota        Linux 2.6.29    OCFS2 1.6
258
 
xattr   Linux 2.6.29    OCFS2 1.6
259
 
indexed-dirs    Linux 2.6.30    OCFS2 1.6
260
 
refcount        Linux 2.6.32    OCFS2 1.6
261
 
discontig-bg    Linux 2.6.35    OCFS2 1.6
262
 
.TE
263
 
 
264
 
.TS
265
 
;
266
 
L.
267
 
Users can query the features enabled in the file system as follows:
268
 
.TE
269
 
 
270
 
.TS
271
 
;
272
 
L.
273
 
[root@node1 ~]# tunefs.ocfs2 -Q "Label: %V\\nFeatures: %H %O\\n" /dev/sdg1
274
 
Label: apache_files_10
275
 
Features: sparse inline-data unwritten
276
 
.TE
277
 
 
278
 
.SH "FEATURE VALUES"
279
 
This section lists the hex values that are associated with the file system features.
280
 
This information is useful when debugging mount failures that are due to feature
281
 
incompatibility. When a user attempts to mount an \fBOCFS2\fR volume that has features
282
 
enabled that are not supported by the running file system software, it will fail
283
 
with an error like:
284
 
 
285
 
\fBERROR: couldn't mount because of unsupported optional features (200).\fR
286
 
 
287
 
By referring to the table below, it becomes apparent that the user attempted to mount
288
 
a volume with the \fIxattr\fR (extended attributes) feature enabled with a version of
289
 
the file system software that did not support it. At this stage, the user has the option
290
 
of either upgrading the file system software, or, disabling that on-disk feature using
291
 
\fBtunefs.ocfs2\fR.
292
 
 
293
 
Some features allow the file system to be mounted with an older version of the software
294
 
provided the mount is read-only. If a user attempts to mount such a volume in a read-write
295
 
mode, it will fail with an error like:
296
 
 
297
 
\fBERROR: couldn't mount RDWR because of unsupported optional features (1).\fR
298
 
 
299
 
This error indicates that the volume had the \fIunwritten\fR RO compat feature enabled.
300
 
This volume can be mounted by an older file system software only in the read-only mode.
301
 
In this case, the user has the option of either mounting the volume with the \fIro\fR
302
 
mount option, or, disabling that on-disk feature using \fBtunefs.ocfs2\fR.
303
 
 
304
 
.TS
305
 
CENTER ALLBOX;
306
 
LI LI LI
307
 
LB C C.
308
 
Feature Category        Hex value
309
 
local   Incompat        8
310
 
sparse  Incompat        10
311
 
inline-data     Incompat        40
312
 
extended-slotmap        Incompat        100
313
 
xattr   Incompat        200
314
 
indexed-dirs    Incompat        400
315
 
metaecc Incompat        800
316
 
refcount        Incompat        1000
317
 
discontig-bg    Incompat        2000
318
 
unwritten       RO Compat       1
319
 
usrquota        RO Compat       2
320
 
grpquota        RO Compat       4
321
 
.TE
322
 
 
323
 
 
324
 
.SH "SEE ALSO"
325
 
.BR debugfs.ocfs2(8)
326
 
.BR fsck.ocfs2(8)
327
 
.BR tunefs.ocfs2(8)
328
 
.BR mounted.ocfs2(8)
329
 
.BR ocfs2console(8)
330
 
.BR o2cb(7)
331
 
 
332
 
.SH "AUTHORS"
333
 
Oracle Corporation
334
 
 
335
 
.SH "COPYRIGHT"
336
 
Copyright \(co 2004, 2010 Oracle. All rights reserved.