Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 4. Managing GFS

download PDF
This chapter describes the tasks and commands for managing GFS and consists of the following sections:

4.1. Making a File System

Once a cluster is set up and running, you can create a GFS file system with the gfs_mkfs command. A file system is created on an activated CLVM volume.The following information is required to run the gfs_mkfs command:
  • Lock protocol/module name (for example, lock_dlm)
  • Cluster name
  • Number of journals (one journal required for each node that may be mounting the file system)

Usage

gfs_mkfs -p LockProtoName -t LockTableName -j Number BlockDevice

Warning

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.
LockProtoName
Specifies the name of the locking protocol (for example, lock_dlm) to use.
LockTableName
This parameter has two parts separated by a colon (no spaces) as follows: ClusterName:FSName
  • ClusterName, the name of the Red Hat cluster for which the GFS file system is being created.
  • 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.
Number
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 than are needed can be specified at creation time to allow for future expansion.)
BlockDevice
Specifies a volume.

Examples

In this example, lock_dlm 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 /dev/vg01/lvol0.
gfs_mkfs -p lock_dlm -t alpha:gfs1 -j 8 /dev/vg01/lvol0
In this example, a second lock_dlm 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 /dev/vg01/lvol1.
gfs_mkfs -p lock_dlm -t alpha:gfs2 -j 8 /dev/vg01/lvol1

Complete Options

Table 4.1, “Command Options: gfs_mkfs describes the gfs_mkfs command options (flags and parameters).
Table 4.1. Command Options: gfs_mkfs
Flag Parameter Description
-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.
-J MegaBytes Specifies the size of the journal in megabytes. Default journal size is 128 megabytes. The minimum size is 32 megabytes.
-j Number
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.
Note: More journals than are needed can be specified at creation time to allow for future expansion.
-p LockProtoName
Specifies the name of the locking protocol to use. Recognized cluster-locking protocols include:
lock_dlm — The standard locking module.
lock_gulm — The locking module compatible with earlier versions of GFS.
lock_nolock — May be used when GFS is acting as a local file system (one node only).
-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.
-t LockTableName
This parameter has two parts separated by a colon (no spaces) as follows: ClusterName:FSName.
ClusterName is the name of the Red Hat cluster for which the GFS file system is being created. The cluster name is set in the /etc/cluster/cluster.conf file via the Cluster Configuration Tool and displayed at the Cluster Status Tool in the Red Hat Cluster Suite cluster management GUI.
FSName, the file-system name, can be 1 to 16 characters in length, and the name must be unique among all file systems in the cluster.
-V Displays command version information.
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.