Installation guide
Before creating the GFS2 file systems, first create an LVM logical volume for each of the file systems.
For information on creating LVM logical volumes, refer to Logical Volume Manager Administration. This
example uses the following logical volumes:
/d ev/csmb_vg /csmb_l v, which will hold the user data that will be exported via a Samba share
and should be sized accordingly. This example creates a logical volume that is 100GB in size.
/d ev/csmb_vg /ctd b_l v, which will store the shared CTDB state information and needs to be
1GB in size.
You create clustered volume groups and logical volumes on one node of the cluster only.
To create a GFS2 file system on a logical volume, run the mkfs.g fs2 command. You run this
command on one cluster node only.
To create the file system to host the Samba share on the logical volume /d ev/csmb_vg /csmb_l v,
execute the following command:
[root@ clusmb-01 ~]# mkfs. g fs2 -j3 -p l o ck_d l m -t csmb: g fs2
/d ev/csmb_vg /csmb_l v
The meaning of the parameters is as follows:
-j
Specifies the number of journals to create in the filesystem. This example uses a cluster with
three nodes, so we create one journal per node.
-p
Specifies the locking protocol. l o ck_d l m is the locking protocol GFS2 uses for inter-node
communication.
-t
Specifies the lock table name and is of the format cluster_name:fs_name. In this example, the
cluster name as specified in the cluster. co nf file is csmb, and we use g fs2 as the name
for the file system.
The output of this command appears as follows:
This will destroy any data on /dev/csmb_vg/csmb_lv.
It appears to contain a gfs2 filesystem.
Are you sure you want to proceed? [y/n] y
Device:
/dev/csmb_vg/csmb_lv
Blocksize: 4096
Device Size 100.00 GB (26214400 blocks)
Filesystem Size: 100.00 GB (26214398 blocks)
Journals: 3
Resource Groups: 400
Locking Protocol: "lock_dlm"
Lock Table: "csmb:gfs2"
UUID:
94297529-ABG3-7285-4B19-182F4F2DF2D7
Red Hat Ent erprise Linux 6 Clust er Administ rat ion
162