mkfs.ocfs2

Langue: en

Version: 174748 (fedora - 06/07/09)

Section: 8 (Commandes administrateur)

NAME

mkfs.ocfs2 - Creates an OCFS2 file system.

SYNOPSIS

mkfs.ocfs2 [-b block-size] [-C cluster-size] [-L volume-label] [-M mount-type] [-N number-of-nodes] [-J journal-options] [--fs-features=[no]sparse...] [--fs-feature-level=feature-level] [-T filesystem-type] [-FqvV] [--no-backup-super] device [blocks-count]  

DESCRIPTION

mkfs.ocfs2 is used to create an OCFS2 file system on a device, usually a partition on a shared disk. In order to prevent data loss, mkfs.ocfs2 will not format an existing OCFS2 volume if that volume is mounted on any node in the cluster. This tool requires the O2CB cluster service to be up.

OPTIONS

-b, --block-size block-size
Valid block size values are 512, 1K, 2K and 4K bytes per block. If omitted, a value will be hueristically determined based on the expected usage of the file system (see the -T option). A block size of 512 bytes is never recommended. Choose 1K, 2K or 4K.
-C, --cluster-size cluster-size
Valid cluster size values are 4K, 8K, 16K, 32K, 64K, 128K, 256K, 512K and 1M. If omitted, a value will be hueristically determined based on the expected usage of the file system (see the -T option). For volumes expected to store large files, like database files, a cluster-size of 128K or more is recommended. For others, 4K-16K.
-F, --force
For existing OCFS2 volumes, mkfs.ocfs2 ensures the volume is not mounted on any node in the cluster before formatting. For that to work, mkfs.ocfs2 expects the O2CB cluster service to be running. Specify this option to disable this check.
-J, --journal-options options
Create the journal using options specified on the command-line. Journal options are comma separated, and may take an argument using the equals ('=') sign. The following options are supported:
size=journal-size
Create a journal of size journal-size. Minimum size is 4M. If omitted, a value is heuristically determined by the file system size.
-L, --label volume-label
Set the volume label for the file system. This is useful for mounting-by-label. Limit the label to under 64 bytes.
-M, --mount mount-type
Valid types are local and cluster. Local mount allows users to mount the volume without the cluster overhead and works only with OCFS2 bundled with Linux kernels 2.6.20 or later. Defaults to cluster.
-N, --node-slots number-of-node-slots
Valid number ranges from 1 to 255. This number specifies the maximum number of nodes that can concurrently mount the partition. If omitted, the number defaults to 4. This number can be later increased using tunefs.ocfs2.
-T filesystem-type
Specify how the filesystem is going to be used, so that mkfs.ocfs2 can chose optimal filesystem parameters for that use. The supported filesystem types are:
mail
Appropriate for file systems which will have many meta data updates. Creates a larger journal.
datafiles
Appropriate for file systems which will host a relatively small number of very large files. A small journal is selected. Cluster size will be at least 128K.
--fs-features=[no]sparse...
Turn specific file system features on or off. A comma separated list of feature flags can be provided, and mkfs.ocfs2 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 no to the name. Choices here will override individual features set via the --fs-feature-level option. The following flags are supported:
local
Create the file system as a local mount, so that it can be mounted without a cluster stack. See the -M option for more information.
backup-super
Create backup super blocks for this volume.
sparse
Enable support for sparse files. With this, Ocfs2 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.
unwritten
Enable unwritten extents support. With this turned on, an application can request that a range of clusters be pre-allocated within a file. Ocfs2 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 sparse file support to be turned on.
--fs-feature-level=feature-level
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 --fs-features option. Currently, there are 3 types of feature levels:
max-compat
Chooses fewer features but ensures that the file system can be mounted from older versions of the Ocfs2 module.
default
The default feature set tries to strike a balance between providing new features and maintaining compatibility with relatively recent versions of Ocfs2.
max-features
Choose the maximum amount of features available. This will typically provide the best performance from Ocfs2 at the expense of creating a file system that is only compatible with very recent versions of the Ocfs2 kernel module.
--no-backup-super
mkfs.ocfs2, by default, makes upto 6 backup copies of the superblock at offsets 1G, 4G, 16G, 64G, 256G and 1T depending on the size of the volume. Use this option to make the volume with no backup superblocks.
-q, --quiet
Quiet mode.
-v, --verbose
Verbose mode.
-V, --version
Print version and exit.
blocks-count
Usually mkfs.ocfs2 automatically determines the size of the given device and creates a file system that uses all of the available space on the device. This optional argument specifies that the file system should only consume the given number of file system blocks (see -b) on the device.

SEE ALSO

debugfs.ocfs2(8) fsck.ocfs2(8) tunefs.ocfs2(8) mounted.ocfs2(8) ocfs2console(8) ocfs2cdsl(8)

AUTHORS

Oracle Corporation Copyright © 2004, 2007 Oracle. All rights reserved.