4 Working With OCFS2 Volumes
Use the mkfs.ocfs2
command to configure OCFS2 volumes. The command accepts
different options and arguments which let you control how how volumes are created, including
the following:
-
-b blocksize, --block-size blocksize
-
Specifies the unit size for I/O transactions to and from the file system, and the size of inode and extent blocks. Available block sizes are 512 (512 bytes), 1K, 2K, and 4K. The default and recommended block size is 4K (4 kilobytes).
-
-C clustersize, --cluster-size clustersize
-
Specifies the unit size for space used to allocate file data. The available cluster sizes are 4K, 8K, 16K, 32K, 64K, 128K, 256K, 512K, and 1M (1 megabyte). The default cluster size is 4K (4 kilobytes).
-
--fs-feature-level=feature-level
-
Lets you select a set of file system features from the following choices:
-
default
: Lets you use sparse files, unwritten extents, and inline data features. -
max-compat
: Only makes available features that are understood by older versions of OCFS2. -
max-features
: Makes all features of OCFS2 available.
-
-
--fs_features=feature
-
Lets you enable or disable individual features such as sparse files, unwritten extents, and backup superblocks. For more information, see the
mkfs.ocfs2(8)
manual page. -
-J journalsize, --journal-size journalsize
-
Specifies the size of the write-ahead journal. If not specified, the size is calculated from the file system usage type that you specify using the -T option, and, otherwise, from the volume size. The default size of the journal is 64M (64 MB) for
datafiles
, 256M (256 MB) formail
, and 128M (128 MB) forvmstore
. -
-L label, --label label
-
Specifies a descriptive name for the volume that lets you identify it easily on different cluster nodes.
-
-N number-of-slots, --node-slots number-of-slots
-
Specifies the maximum number of nodes that can concurrently access a volume, which is limited by the number of node slots for system files such as the file system journal. For best performance, set the number of node slots to at least twice the number of nodes. If you later increase the number of node slots, performance can suffer because the journal is no longer contiguously laid out on the outer edge of the disk platter.
-
-T file-system-usage-type
-
Specifies the usage type of the file system, which is one of the following three options:
-
datafiles
: Database files are typically few in number, fully allocated, and relatively large. Such files require few metadata changes, and don't benefit from having a large journal. -
mail
: Mail server files are typically many in number, and relatively small. Such files require many metadata changes, and benefit from having a large journal. -
vmstore
: Virtual machine image files are typically few in number, sparsely allocated, and relatively large. Such files require a moderate number of metadata changes and a medium sized journal.
-