5 Creating a Local OCFS2 File System
You can create an OCFS2 file system that you can mount locally, which isn't associated with a cluster. Use the following command syntax:
sudo mkfs.ocfs2 -M local --fs-features=local -N 1 [options] device
The following example creates a locally mountable OCFS2 volume on /dev/sdc1
,
with one node slot and the label localvol
:
sudo mkfs.ocfs2 -M local --fs-features=local -N 1 -L "localvol" /dev/sdc1
To convert a local OCFS2 file system for use in a cluster, use the tunefs.ocfs2 utility as follows:
sudo umount /dev/sdc1
sudo tunefs.ocfs2 -M cluster --fs-features=clusterinfo -N 8 /dev/sdc1
This example also increases the number of node slots from 1 to 8, letting up to eight nodes mount the file system.