[ Pobierz całość w formacie PDF ]

File System .
You can use either of the following formats to create a clustered GFS2 file system:
29
Red Hat Enterprise Linux 6 Global File System 2
mkfs.gfs2 -p lock_dlm -t ClusterName:FSName -j NumberJournals BlockDevice
mkfs -t gfs2 -p lock_dlm -t LockTableName -j NumberJournals BlockDevice
For more information on creating a GFS2 file system, see Section 4.1,  Making a File System .
3. At each node, mount the GFS2 file systems. For more information about mounting a GFS2 file
system, see Section 4.2,  Mounting a File System .
Command usage:
mount BlockDevice MountPoint
mount -o acl BlockDevice MountPoint
The -o acl mount option allows manipulating file ACLs. If a file system is mounted without the -o
acl mount option, users are allowed to view ACLs (with getfacl), but are not allowed to set
them (with setfacl).
Note
You can use init.d scripts included with the Red Hat High Availability Add-On to
automate mounting and unmounting GFS2 file systems.
30
Chapter 4. Managing GFS2
Chapter 4. Managing GFS2
This chapter describes the tasks and commands for managing GFS2 and consists of the following
sections:
Section 4.1,  Making a File System
Section 4.2,  Mounting a File System
Section 4.3,  Unmounting a File System
Section 4.5,  GFS2 Quota Management
Section 4.6,  Growing a File System
Section 4.7,  Adding Journals to a File System
Section 4.8,  Data Journaling
Section 4.9,  Configuring atime Updates
Section 4.10,  Suspending Activity on a File System
Section 4.11,  Repairing a File System
Section 4.12,  Bind Mounts and Context-Dependent Path Names
Section 4.13,  Bind Mounts and File System Mount Order
Section 4.14,  The GFS2 Withdraw Function
4.1. Making a File System
You create a GFS2 file system with the mkfs.gfs2 command. You can also use the mkfs command
with the -t gfs2 option specified. A file system is created on an activated LVM volume. The following
information is required to run the m kfs.gfs2 command:
Lock protocol/module name (the lock protocol for a cluster is lock_dlm)
Cluster name (when running as part of a cluster configuration)
Number of journals (one journal required for each node that may be mounting the file system)
When creating a GFS2 file system, you can use the mkfs.gfs2 command directly, or you can use the
mkfs command with the -t parameter specifying a file system of type gfs2, followed by the gfs2 file
system options.
Note
Once you have created a GFS2 file system with the mkfs.gfs2 command, you cannot decrease
the size of the file system. You can, however, increase the size of an existing file system with the
gfs2_grow command, as described in Section 4.6,  Growing a File System .
Usage
When creating a clustered GFS2 file system, you can use either of the following formats:
mkfs.gfs2 -p LockProtoName -t LockTableName -j NumberJournals BlockDevice
mkfs -t gfs2 -p LockProtoName -t LockTableName -j NumberJournals BlockDevice
When creating a local GFS2 file system, you can use either of the following formats:
31
Red Hat Enterprise Linux 6 Global File System 2
Note
For the Red Hat Enterprise Linux 6 release, Red Hat does not support the use of GFS2 as a
single-node file system.
mkfs.gfs2 -p LockProtoName -j NumberJournals BlockDevice
mkfs -t gfs2 -p LockProtoName -j NumberJournals 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 to use. The lock protocol for a cluster is lock_dlm.
LockTableName
This parameter is specified for GFS2 file system in a cluster configuration. It has two parts
separated by a colon (no spaces) as follows: ClusterName:FSName
ClusterName, the name of the cluster for which the GFS2 file system is being created.
FSName, the file system name, can be 1 to 16 characters long. The name must be unique for
all lock_dlm file systems over the cluster, and for all file systems (lock_dlm and
lock_nolock) on each local node.
Number
Specifies the number of journals to be created by the mkfs.gfs2 command. One journal is
required for each node that mounts the file system. For GFS2 file systems, more journals can
be added later without growing the file system, as described in Section 4.7,  Adding Journals to
a File System .
BlockDevice
Specifies a logical or physical volume.
Examples
In these example, lock_dlm is the locking protocol that the file system uses, since this is a clustered
file system. The cluster name is alpha, and the file system name is mydata1. The file system contains
eight journals and is created on /dev/vg01/lvol0.
mkfs.gfs2 -p lock_dlm -t alpha:mydata1 -j 8 /dev/vg01/lvol0
32
Complete Options
mkfs -t gfs2 -p lock_dlm -t alpha:mydata1 -j 8 /dev/vg01/lvol0
In these examples, a second lock_dlm file system is made, which can be used in cluster alpha. The
file system name is mydata2. The file system contains eight journals and is created on
/dev/vg01/lvol1.
mkfs.gfs2 -p lock_dlm -t alpha:mydata2 -j 8 /dev/vg01/lvol1
mkfs -t gfs2 -p lock_dlm -t alpha:mydata2 -j 8 /dev/vg01/lvol1
Complete Options
Table 4.1,  Command Options: mkfs.gfs2 describes the mkfs.gfs2 command options (flags and
parameters).
33
Red Hat Enterprise Linux 6 Global File System 2
Table 4 .1. Command Options: mkfs.gfs2
Flag Parameter Description
-c Megabytes Sets the initial size of each journal's quota change file
to Megabytes.
-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 8
megabytes. Larger journals improve performance,
although they use more memory than smaller journals.
-j Number Specifies the number of journals to be created by the
mkfs.gfs2 command. One journal is required for each
node that mounts the file system. If this option is not
specified, one journal will be created. For GFS2 file
systems, you can add additional journals at a later time
without growing the file system. [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • modologia.keep.pl