This chapter describes the tasks and commands for managing GFS and consists of the following sections:
Making a GFS file system is one of the final tasks in the process of configuring and setting up a GFS cluster. (Refer to Chapter 4 Initial Configuration for more information.) Once a cluster is set up and running, additional GFS file systems can be made and mounted without additional cluster-configuration steps.
A file system is created on a block device, which is usually an activated Pool volume. (Refer to Chapter 5 Using the Pool Volume Manager for further details.) The following information is required to run the gfs_mkfs command:
Lock protocol/module name (for example, lock_gulm)
Cluster name (from cluster.ccs)
Number of nodes that may be mounting the file system
gfs_mkfs -p LockProtoName -t LockTableName -j Number BlockDevice
Make sure that you are very familiar with using the LockProtoName and LockTableName parameters. Improper use of the LockProtoName and LockTableName parameters may cause file system or lock space corruption.
Specifies the name of the locking protocol (typically lock_gulm) to use.
This parameter has two parts separated by a colon (no spaces) as follows: ClusterName:FSName
ClusterName, the cluster name, is set in the cluster.ccs file (cluster.ccs:cluster/name).
FSName, the file system name, can be 1 to 16 characters long, and the name must be unique among all file systems in the cluster.
Specifies the number of journals to be created by the gfs_mkfs command. One journal is required for each node that mounts the file system. (More journals can be specified to allow for easier, future expansion.)
Usually specifies a pool volume, but any block device can be specified.
In this example, lock_gulm is the locking protocol that the file system uses. The cluster name is alpha, and the file system name is gfs1. The file system contains eight journals and is created on the pool0 block device.
gfs_mkfs -p lock_gulm -t alpha:gfs1 -j 8 /dev/pool/pool0
In this example, a second lock_gulm file system is made, which can be used in cluster alpha. The file system name is gfs2. The file system contains eight journals and is created on the pool1 block device.
gfs_mkfs -p lock_gulm -t alpha:gfs2 -j 8 /dev/pool/pool1
Table 9-1 describes the gfs_mkfs command options (flags and parameters).
|-b||BlockSize||Sets the file system block size to BlockSize. Default block size is 4096 bytes.|
|-D||Enables debugging output.|
|-h||Help. Displays available options, then exits.|
|-J||MegaBytes||Specifies the size of the journal in megabytes. Default journal size is 128 megabytes. The minimum size is 32 megabytes.|
|-P||Tells the gfs_mkfs command that the underlying device is a pool. The gfs_mkfs command then asks the pool about its layout. The -p flag overrides the -j and -J flags.|
|-O||Prevents the gfs_mkfs command from asking for confirmation before writing the file system.|
|-q||Quiet. Do not display anything.|
|-r||MegaBytes||Specifies the size of the resource groups in megabytes. Default resource group size is 256 megabytes.|
|-s||Blocks||Specifies the journal-segment size in file system blocks.|
|-V||Displays command version information, then exits.|
Table 9-1. Command Options: gfs_mkfs