You are on page 1of 58

Red Hat Enterprise Linux 5 Global File System

1

Red Hat Enterprise Linux 5
Global File System
Red Hat Global File System

Edition 4

2

Legal Notice

Legal Notice
Copyright © 2012 Red Hat, Inc. T he text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux® is the registered trademark of Linus T orvalds in the United States and other countries. Java® is a registered trademark of Oracle and/or its affiliates. XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries. All other trademarks are the property of their respective owners. 1801 Varsity Drive Raleigh, NC 27606-2072 USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701

Red Hat Enterprise Linux 5 Global File System

3

Abstract
T his book provides information about configuring, and maintaining Red Hat GFS (Red Hat Global File System) for Red Hat Enterprise Linux 5.

4

Table of Contents

Table of Contents
Introduction 1. Audience 2. Related Documentation 3. Document Conventions 3.1. T ypographic Conventions 3.2. Pull-quote Conventions 3.3. Notes and Warnings 4. Feedback 1. GFS Overview 1.1. New and Changed Features 1.2. Performance, Scalability, and Economy 1.2.1. Superior Performance and Scalability 1.2.2. Economy and Performance 1.3. GFS Software Components 1.4. Before Setting Up GFS 2. Getting Started 2.1. Prerequisite T asks 2.2. Initial Setup T asks 3. Managing GFS 3.1. Creating a File System 3.2. Mounting a File System 3.3. Unmounting a File System 3.4. Special Considerations when Mounting GFS File Systems 3.5. Displaying GFS T unable Parameters 3.6. GFS Quota Management 3.6.1. Setting Quotas 3.6.2. Displaying Quota Limits and Usage 3.6.3. Synchronizing Quotas 3.6.4. Disabling/Enabling Quota Enforcement 3.6.5. Disabling/Enabling Quota Accounting 3.7. Growing a File System 3.8. Adding Journals to a File System 3.9. Direct I/O 3.9.1. O_DIRECT 3.9.2. GFS File Attribute 3.9.3. GFS Directory Attribute 3.10. Data Journaling 3.11. Configuring atime Updates 3.11.1. Mount with noatime 3.11.2. T une GFS atime Quantum 3.12. Suspending Activity on a File System 3.13. Displaying Extended GFS Information and Statistics 3.13.1. Displaying GFS Space Usage 3.13.2. Displaying GFS Counters 3.13.3. Displaying Extended Status 3.14. Repairing a File System

Red Hat Enterprise Linux 5 Global File System

5

3.15. Context-Dependent Path Names 3.16. T he GFS Withdraw Function A. Revision History Index

Using GNBD with Global File System — Provides an overview on using Global Network Block Device (GNBD) with Red Hat GFS. Linux Virtual Server Administration — Provides information on configuring high-performance systems and services with the Linux Virtual Server (LVS). For information about Red Hat Cluster Suite refer to Red Hat Cluster Suite Overview and Configuring and Managing a Red Hat Cluster. Red Hat Enterprise Linux Deployment Guide — Provides information regarding the deployment. Global File System 2: Configuration and Administration — Provides information about installing. configuring and managing Red Hat Cluster components. 3. A GFS file system can be implemented in a standalone system or as part of a cluster configuration. configuration and administration of Red Hat Enterprise Linux 5. For more information about Red Hat Cluster Suite for Red Hat Enterprise Linux 5.html.redhat. Red Hat Cluster Suite documentation and other Red Hat documents are available in HT ML. refer to the following resources: Red Hat Cluster Suite Overview — Provides a high level overview of the Red Hat Cluster Suite. such as Fibre Channel SANs 2.com/docs/en-US/index. Configuring and Managing a Red Hat Cluster — Provides information about installing. Logical Volume Manager Administration — Provides a description of the Logical Volume Manager (LVM). and RPM versions on the Red Hat Enterprise Linux Documentation CD and online at http://www. Using Device-Mapper Multipath — Provides information about using the Device-Mapper Multipath feature of Red Hat Enterprise Linux 5. including kernel configuration Installation and configuration of shared storage networks. PDF. Audience T his book is intended primarily for Linux system administrators who are familiar with the following activities: Linux system administration procedures. refer to the following resources: Red Hat Enterprise Linux Installation Guide — Provides information regarding installation of Red Hat Enterprise Linux 5. 1.com/docs/. Red Hat Cluster Suite Release Notes — Provides information about the current release of Red Hat Cluster Suite. HT ML and PDF versions of all the official Red Hat Enterprise Linux manuals and release notes are available online at http://docs. Related Documentation For more information about using Red Hat Enterprise Linux. including information on running LVM in a clustered environment. and maintaining Red Hat GFS2 (Red Hat Global File System 2).redhat.6 Introduction Introduction T he Global File System Configuration and Administration document provides information about configuring and maintaining Red Hat GFS (Red Hat Global File System). Document Conventions . configuring.

For example: File-related classes include filesystem for file systems. Proportional Bold T his denotes words or phrases encountered on a system. T he first paragraph highlights the particular keycap to press. are as follows. Press Ctrl+Alt+F2 to switch to a virtual terminal.1. Double-click this highlighted character to place it in the T ext to copy field and then click the Copy button. functions. T he above includes a file name. For example: Press Enter to execute the command. Each class has its own associated set of permissions. menu titles and sub-menu titles. If not. Now switch back to your document and choose Edit → Paste from the gedit menu bar. alternative but equivalent typefaces are displayed. dialog box text. choose Applications → Accessories → Character Map from the main menu bar. class names. In the Buttons tab. . If source code is discussed. T he second highlights two key combinations (each a set of three keycaps with each set pressed simultaneously). including application names. file for files. Also used to highlight keycaps and key combinations.Red Hat Enterprise Linux 5 Global File System 7 T his manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information. this manual uses typefaces drawn from the Liberation Fonts set. in m ono-spaced bold. click the Left-handed m ouse check box and click Close to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand). T hese conventions. 3. and the circumstances they apply to. T he Liberation Fonts set is also used in HT ML editions if the set is installed on your system. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default. type the name of the character in the Search field and click Next. T o insert a special character into a gedit file. all presented in mono-spaced bold and all distinguishable thanks to context. choose Search → Find… from the Character Map menu bar. labeled buttons. Next. In PDF and paper editions. T he character you sought will be highlighted in the Character T able. enter the cat m y_next_bestselling_novel command at the shell prompt and press Enter to execute the command. file names and paths. check-box and radio button labels. Key combinations can be distinguished from keycaps by the plus sign that connects each part of a key combination. For example: T o see the contents of the file m y_next_bestselling_novel in your current working directory. variable names and returned values mentioned within a paragraph will be presented as above. T ypographic Conventions Four typographic conventions are used to call attention to specific words and phrases. and dir for directories. For example: Choose System → Preferences → Mouse from the main menu bar to launch Mouse Preferences. methods. Mono-spaced Bold Used to highlight system input. including shell commands. a shell command and a keycap.

naming.jboss. System. use the rpm -q package command. all presented in proportional bold and all distinguishable by context.echo("Hello")).println("Echo. domain. type ssh username@ domain. Object ref = iniCtx. file-system.out. system-wide menu names and items. Output sent to a terminal is set in m ono-spaced rom an and presented thus: books books_tests Desktop Desktop1 documentation downloads drafts images mss notes photos scripts stuff svgs svn Source-code listings are also set in m ono-spaced rom an but add syntax highlighting as follows: package org. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. import javax.lookup("EchoBean"). application-specific menu names. public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext().jca. version and release. If the remote machine is exam ple. It will return a result as follows: package-version-release.ex1.create().echo('Hello') = " + echo. } } .name. Mono-spaced Bold Italic or Proportional Bold Italic Whether mono-spaced bold or proportional bold.println("Created Echo"). 3. either for text you enter when issuing a command or for text displayed by the system. For example: Publican is a DocBook publishing system. T o see the version of a currently installed package. Note the words in bold italics above — username. type ssh john@ exam ple. the addition of italics indicates replaceable or variable text. the command is m ount -o rem ount /hom e. System. EchoHome home = (EchoHome) ref.InitialContext.name at a shell prompt. For example.out. For example: T o connect to a remote machine using ssh. Aside from standard usage for presenting the title of a work. package. italics denotes the first use of a new and important term.com . Pull-quote Conventions T erminal output and source code listings are set off visually from the surrounding text. to remount the /hom e file system. T he m ount -o rem ount file-system command remounts the named file system.2.com and your username on that machine is john.book. Each word is a placeholder. and buttons and text found within a GUI interface. Echo echo = home.8 Introduction T he above text includes application names.

please include the section number and some of the surrounding text so we can find it easily. Note Notes are tips. Be sure to mention the manual's identifier: Bugzilla component: Documentation-cluster Book identifier: Global_File_System(EN)-5 (2012-2-20T15:10) By mentioning this manual's identifier. Ignoring warnings will most likely cause data loss. shortcuts or alternative approaches to the task at hand. we use three visual styles to draw attention to information that might otherwise be overlooked. Please submit a report in Bugzilla (http://bugzilla. Warning Warnings should not be ignored. . try to be as specific as possible. we know exactly which version of the guide you have.3. If you have found an error.com/bugzilla/) against the component Documentation-cluster.Red Hat Enterprise Linux 5 Global File System 9 3.redhat. Ignoring a box labeled 'Important' will not cause data loss but may cause irritation and frustration. Notes and Warnings Finally. Feedback If you spot a typo. but you might miss out on a trick that makes your life easier. If you have a suggestion for improving the documentation. Ignoring a note should have no negative consequences. Important Important boxes detail things that are easily missed: configuration changes that only apply to the current session. we would love to hear from you. or services that need restarting before an update will apply. 4. or if you have thought of a way to make this manual better.

Asymmetric cluster configurations in which some nodes have access to the file system and others do not are not supported. consistent view of the file system name space across the GFS nodes. T his allows processes on different nodes to share GFS files in the same way that processes on the same node can share files on a local file system. However. CLVM is a cluster-wide implementation of LVM. If your system requires larger GFS file systems. for the Red Hat Enterprise Linux 5. GFS Overview T he Red Hat GFS file system is a native file system that interfaces directly with the Linux kernel file system interface (VFS layer). which can theoretically accommodate an 8 EB file system.10 Chapter 1. see Logical Volume Manager Administration Note When you configure a GFS file system as a cluster file system. For information on the LVM volume manager. contact your Red Hat service representative. For information on the amount of memory the gfs_fsck command requires. When implemented as a cluster file system. Red Hat supports the use of GFS file systems only as implemented in Red Hat Cluster Suite. with a single. recovery time is limited by the speed of your backup media. in the event of a disk or disk-subsytem failure. GFS Overview Chapter 1. GFS employs distributed metadata and multiple journals. see Section 3. you must ensure that all nodes in the cluster have access to the shared file system. While a GFS file system may be used outside of LVM.5 release and later Red Hat does not support the use of GFS as a single-node file system. “Repairing a File System”. Note Red Hat does not support using GFS for cluster file system deployments greater than 16 nodes. T he current supported maximum size of a GFS file system for 32-bit hardware is 16 T B. When configured in a Red Hat Cluster Suite. For information about Red Hat Cluster Suite refer to Configuring and Managing a Red Hat Cluster. T he daemon makes it possible to use LVM2 to manage logical volumes across a cluster. allowing all nodes in the cluster to share the logical volumes. When determining the size of your file system. with no discernible difference. Red Hat recommends using these file systems in preference to GFS in cases where only a single node needs to mount the file system.14. Note Although a GFS file system can be implemented in a standalone system or as part of a cluster configuration. Red Hat will continue to support single-node GFS file systems for existing customers. Additionally. GFS is based on a 64-bit architecture. Red Hat GFS then provides data sharing among GFS nodes in a Red Hat cluster. Red Hat supports only GFS file systems that are created on a CLVM logical volume. Running the gfs_fsck command on a very large file system can take a long time and consume a large amount of memory. you should consider your recovery needs. . Red Hat does support a number of highperformance single node file systems which are optimized for single node and thus have generally lower overhead than a cluster filesystem. Red Hat GFS nodes can be configured and managed with Red Hat Cluster Suite configuration and management tools. enabled by the CLVM daemon clvm d. the current supported maximum size of a GFS file system for 64-bit hardware is 100 T B. which manages LVM logical volumes in a Red Hat Cluster Suite cluster.

GULM (Grand Unified Lock Manager) is not supported in Red Hat Enterprise Linux 5.2.2. you can deploy GFS in a cluster that is connected to a LAN with servers that use GNBD (Global Network Block Device). .Red Hat Enterprise Linux 5 Global File System 11 T his chapter provides some basic. “GFS with a SAN” provides superior file performance for shared files and file systems. Performance. “GFS Software Components” Section 1. convert your GFS file systems to use the DLM lock manager. 1. For more economical needs. Documentation for Red Hat Cluster Suite for Red Hat Enterprise Linux 5 has been expanded and reorganized. and Economy You can deploy GFS in a variety of configurations to suit your needs for performance. “New and Changed Features” Section 1. While running Red Hat Enterprise Linux 4. and economy. T he GFS SAN configuration in Figure 1. Without file protocols or storage servers to slow data access. If your GFS file systems use the GULM lock manager. “Economy and Performance” Note T he deployment examples in this chapter reflect basic configurations.1. Upgrade your operating system to Red Hat Enterprise Linux 5.2.4. your needs might require a combination of configurations shown in the examples. It contains the following sections: Section 1. and economy: Section 1. you can deploy GFS in a cluster that is connected directly to a SAN. each GFS application node has equal access to all data files. performance is similar to individual Linux servers with directly connected storage. yet.1. see Section 2. Scalability. 1. “Before Setting Up GFS” 1. “Performance. For information on upgrading to Red Hat Enterprise Linux 5 and converting GFS file systems to use the DLM lock manager. converting the lock manager to DLM when you do. New and Changed Features T his section lists new and changed features included with the initial release of Red Hat Enterprise Linux 5. Linux applications run directly on GFS nodes.1. scalability. abbreviated information as background to help you understand GFS. T he following sections provide examples of how GFS can be deployed to suit your needs for performance. “Related Documentation”. “Superior Performance and Scalability” Section 1. Scalability. Superior Performance and Scalability You can obtain the highest shared-file performance when applications access storage directly. GFS supports up to 125 GFS nodes. For information on the available documents. T his is a two-part process. you must convert the file systems to use the DLM lock manager. For superior performance and scalability.1.2.2. see Configuring and Managing a Red Hat Cluster. scalability.2. and Economy” Section 1.3.1.

12 Chapter 1.3. “GFS and GNBD with Directly Connected Storage” shows how Linux client applications can . File locking and sharing functions are handled by GFS for each network client. Stored data is actually on the SAN. storage is accessed as if it were directly attached to the server in which the application is running.2. From the perspective of a client application. GFS Overview Figure 1.1.2. Economy and Performance Multiple Linux client applications on a LAN can share the same SAN-based data as shown in Figure 1. Note Clients implementing ext2 and ext3 file systems can be configured to access their own dedicated slice of SAN storage. Storage devices and data can be equally shared by network client applications. “GFS and GNBD with a SAN”. Figure 1.2. SAN block storage is presented to network clients as block storage devices by GNBD servers.2. GFS with a SAN 1. GFS and GNBD with a SAN Figure 1.

A lock module for use when GFS is used as a local file system only. GFS Software Subsystem Components Software Component gfs.1.ko and provides local locking.ko 1.ko lock_dlm .) .Red Hat Enterprise Linux 5 Global File System 13 take advantage of an existing Ethernet topology to gain shared access to all block storage devices. lock_nolock. A lock module that implements DLM locking for GFS. Before Setting Up GFS Before you install and set up GFS. Application failover can be fully automated with Red Hat Cluster Suite. GFS and GNBD with Directly Connected Storage 1. lock_harness. note the following key characteristics of your GFS file systems: GFS nodes Determine which nodes in the Red Hat Cluster Suite will mount the GFS file systems. Client data files and file systems can be shared with GFS on each client. lock_harness. It plugs into the lock harness. (More file systems can be added later. T able 1.ko and communicates with the DLM lock manager in Red Hat Cluster Suite.4.1.3. Number of file systems Determine how many GFS file systems to create initially. Figure 1. “GFS Software Subsystem Components” summarizes the GFS software components.ko Description Kernel module that implements the GFS file system and is loaded on GFS cluster nodes. GFS Software Components T able 1.3. It plugs into the lock harness.

Journals Determine the number of journals for your GFS file systems. Note the hostname and IP address of each GNBD server node for setting up GNBD clients later. Make sure to account for additional journals needed for future expansion. For information on using GNBD with GFS. One journal is required for each node that mounts a GFS file system. contact your Red Hat service representative. Running the gfs_fsck command on a very large file system can take a long time and consume a large amount of memory. For example.14 Chapter 1. File system size GFS is based on a 64-bit architecture. which can theoretically accommodate an 8 EB file system. When determining the size of your file system. you should consider your recovery needs. in the event of a disk or disk-subsytem failure. see Section 3. Storage devices and partitions Determine the storage devices and partitions to be used for creating logical volumes (via CLVM) in the file systems. see the Using GNBD with Global File System document. you should localize file creation and deletions by a node to directories specific to that node as much as possible. However. this book uses file system names m ydata1 and m ydata2 in some example procedures. “Repairing a File System”.14. GNBD server nodes If you are using GNBD. Each file system name is required in the form of a parameter variable. as you cannot add journals dynamically to a GFS file system. Note You may see performance problems with GFS when many create and delete operations are issued from more than one node in the same directory at the same time. determine how many GNBD server nodes are needed. the current supported maximum size of a GFS file system for 64-bit hardware is 100 T B. Additionally. recovery time is limited by the speed of your backup media. For information on the amount of memory the gfs_fsck command requires. If this causes performance problems in your system. T he current supported maximum size of a GFS file system for 32-bit hardware is 16 T B. GFS Overview File system name Determine a unique name for each file system. . If your system requires larger GFS file systems.

2. Using LVM.2. For more information about init. Note You can use init. including the clvm d daemon. You can use either of the following formats to create a clustered GFS file system: . Choose a unique name for each file system. Note T he system clocks in GFS nodes must be within a few minutes of each other to prevent unnecessary inode time-stamp updating. refer to Configuring and Managing a Red Hat Cluster.Red Hat Enterprise Linux 5 Global File System 15 Chapter 2. a set of clustering extensions to the LVM Logical Volume Manager. refer to Section 3.1.d scripts included with Red Hat Cluster Suite to automate activating and deactivating logical volumes. the Red Hat Cluster Suite software. Mounting file systems Follow these steps to set up GFS initially. Unnecessary inode time-stamp updating severely impacts cluster performance. create a logical volume for each Red Hat GFS file system. you must configure your system to use the Clustered Logical Volume Manager (CLVM).1. It is recommended that you use the Network T ime Protocol (NT P) software provided with your Red Hat Enterprise Linux distribution. “Creating a File System”. Prerequisite Tasks You should complete the following tasks before setting up Red Hat GFS: Make sure that you have noted the key characteristics of the GFS nodes (refer to Section 1. see Logical Volume Manager Administration. Initial Setup Tasks Initial GFS setup consists of the following tasks: 1. Make sure that the clocks on the GFS nodes are synchronized. In order to use CLVM. Create GFS file systems on logical volumes created in Step 1. “Before Setting Up GFS”). “Initial Setup T asks” 2. Setting up logical volumes 2. “Prerequisite T asks” Section 2.1. For information on installing and administering Red Hat Cluster Suite. must be running. Getting Started T his chapter describes procedures for initial setup of GFS and contains the following sections: Section 2. In order to use GFS in a clustered environment. For information on using CLVM. Making a GFS files system 3. see Cluster Administration. 1. 2.4.d scripts.2. For more information about creating a GFS file system.

see Section 3. but are not allowed to set them (with setfacl).16 Chapter 2. If a file system is mounted without the -o acl mount option. 3. refer to Configuring and Managing a Red Hat Cluster. see Section 3. mount the GFS file systems.d scripts included with Red Hat Cluster Suite to automate mounting and unmounting GFS file systems. Command usage: m ount BlockDevice MountPoint m ount -o acl BlockDevice MountPoint T he -o acl mount option allows manipulating file ACLs. For more information about init. Getting Started gfs_mkfs -p lock_dlm -t ClusterName:FSName -j NumberJournals BlockDevice mkfs -t gfs -p lock_dlm -t LockTableName -j NumberJournals BlockDevice You can use either of the following formats to create a local GFS file system: gfs_mkfs -p lock_nolock -j NumberJournals BlockDevice mkfs -t gfs -p lock_nolock -j NumberJournals BlockDevice For more information on creating a GFS file system.2. For more information about mounting a GFS file system. .1. “Creating a File System”. At each node. “Mounting a File System”.d scripts. users are allowed to view ACLs (with getfacl). Note You can use init.

“Context-Dependent Path Names” Section 3.13.16. Usage When creating a clustered GFS file system. T he lock protocol when GFS is acting as a local file system (one node only) is lock_nolock. “Special Considerations when Mounting GFS File Systems” Section 3.1. you can use the gfs_m kfs directly.14. “Adding Journals to a File System” Section 3.) Make sure to account for additional journals needed for future expansion. “T he GFS Withdraw Function” 3.8.5.1.6.3. T he following information is required to execute the gfs_m kfs command: Lock protocol/module name.7. “Direct I/O” Section 3. “Mounting a File System” Section 3. “Configuring atim e Updates” Section 3. “Unmounting a File System” Section 3. as described in Section 3. Managing GFS T his chapter describes the tasks and commands for managing GFS and consists of the following sections: Section 3. increase the size of an existing file system with the gfs_grow command. You can. Creating a File System You can create a GFS file system with the gfs_m kfs command. Cluster name (when running as part of a cluster configuration). followed by the gfs file system options.11. you cannot decrease the size of the file system. “Displaying Extended GFS Information and Statistics” Section 3. “Data Journaling” Section 3.7. as you cannot add journals dynamically to a GFS file system. “Repairing a File System” Section 3.4. “Growing a File System” Section 3. “Creating a File System” Section 3.9. however.12. you can use either of the following formats: . “GFS Quota Management” Section 3. Number of journals (one journal required for each node that may be mounting the file systema. When creating a GFS file system. or you can use the m kfs command with the -t parameter specifying a file system of type gfs. “Growing a File System”.15. T he lock protocol for a cluster is lock_dlm .Red Hat Enterprise Linux 5 Global File System 17 Chapter 3.2. “Displaying GFS T unable Parameters” Section 3.10. A file system is created on an activated LVM volume. Note Once you have created a GFS file system with the gfs_m kfs command. “Suspending Activity on a File System” Section 3.

Improper use of the LockProtoName and LockTableName parameters may cause file system or lock space corruption. you can use either of the following formats: Note For the Red Hat Enterprise Linux 5. One journal is required for each node that mounts the file system. LockProtoName Specifies the name of the locking protocol to use.5 release and later Red Hat does not support the use of GFS as a single-node file system. It has two parts separated by a colon (no spaces) as follows: ClusterName:FSName ClusterName. FSName. (More journals than are needed can be specified at creation time to allow for future expansion.) BlockDevice Specifies a volume. Examples . T he lock protocol when GFS is acting as a local file system (one node only) is lock_nolock. LockTableName T his parameter is specified for GFS file system in a cluster configuration. gfs_mkfs -p LockProtoName -j NumberJournals BlockDevice mkfs -t gfs -p LockProtoName -j NumberJournals BlockDevice Warning Make sure that you are very familiar with using the LockProtoName and LockTableName parameters. and the name must be unique among all file systems in the cluster. NumberJournals Specifies the number of journals to be created by the gfs_m kfs command. the file system name.18 Examples gfs_mkfs -p LockProtoName -t LockTableName -j NumberJournals BlockDevice mkfs -t gfs -p LockProtoName -t LockTableName -j NumberJournals BlockDevice When creating a local file system. T he lock protocol for a cluster is lock_dlm . the name of the Red Hat cluster for which the GFS file system is being created. Red Hat will continue to support single-node GFS file systems for existing customers. can be 1 to 16 characters long.

lock_dlm is the locking protocol that the file system uses. T he file system contains eight journals and is created on /dev/vg01/lvol0..Red Hat Enterprise Linux 5 Global File System 19 In these examples. “Command Options: gfs_m kfs” describes the gfs_m kfs command options. and the file system name is m ydata1. [root@ask-07 ~]# gfs_mkfs -p lock_dlm -t alpha:mydata1 -j 8 /dev/vg01/lvol0 This will destroy any data on /dev/vg01/lvol0. Are you sure you want to proceed? [y/n] y Device: Blocksize: Filesystem Size: Journals: Resource Groups: Locking Protocol: Lock Table: Syncing. . gfs_mkfs -p lock_dlm -t alpha:mydata2 -j 8 /dev/vg01/lvol1 mkfs -t gfs -p lock_dlm -t alpha:mydata2 -j 8 /dev/vg01/lvol1 Complete Options T able 3. since this is a clustered file system.. which can be used in cluster alpha. All Done [root@ask-07 ~]# mkfs -t gfs -p lock_dlm -t alpha:mydata1 -j 8 /dev/vg01/lvol0 This will destroy any data on /dev/vg01/lvol0. T he file system name is m ydata2. Are you sure you want to proceed? [y/n] y Device: Blocksize: Filesystem Size: Journals: Resource Groups: Locking Protocol: Lock Table: Syncing. a second lock_dlm file system is made. All Done /dev/vg01/lvol0 4096 136380192 8 2082 lock_dlm alpha:mydata1 /dev/vg01/lvol0 4096 136380192 8 2082 lock_dlm alpha:mydata1 In these examples...1. T he cluster name is alpha. T he file system contains eight journals and is created on /dev/vg01/lvol1.

Default journal size is 128 megabytes. Specifies the size of the journal in megabytes. Command Options: gfs_m kfs Flag -b -D -h -J MegaBytes Parameter BlockSize Description Sets the file system block size to BlockSize. -V Displays command version information. One journal is required for each node that mounts the file system. “Creating a File System”). the file system must exist (refer to Section 3. Mounting a File System Before you can mount a GFS file system. T he minimum size is 32 megabytes. and the supporting clustering and locking systems must be started (refer to Chapter 2. the file system name. Note: More journals than are needed can be specified at creation time to allow for future expansion.1. Specifies the journal-segment size in file system blocks. T his parameter has two parts separated by a colon (no spaces) as follows: ClusterName:FSName. Help. ClusterName is the name of the Red Hat cluster for which the GFS file system is being created. can be 1 to 16 characters in length. FSName. Default block size is 4096 bytes. required for a clustered file system.conf file via the Cluster Configuration T ool and displayed at the Cluster Status T ool in the Red Hat Cluster Suite cluster management GUI. Do not display anything. Enables debugging output. Specifies the size of the resource groups in megabytes. Displays available options. Specifies the number of journals to be created by the gfs_m kfs command. lock_nolock — Used when GFS is acting as a local file system (one node only). -O -q -r -s -t MegaBytes Blocks LockTableName Prevents the gfs_m kfs command from asking for confirmation before writing the file system.2. -j Number 3. T he cluster name is set in the /etc/cluster/cluster. -p LockProtoName Specifies the name of the locking protocol to use. Recognized locking protocols include: lock_dlm — T he standard locking module. Getting Started and Configuring and Managing a . Default resource group size is 256 megabytes.1. and the name must be unique among all file systems in the cluster. Used in a clustered file system.20 Complete Options T able 3. the volume where the file system exists must be activated. Quiet.

you can mount the GFS file system as you would any Linux file system. you can use other. BlockDevice Specifies the block device where the GFS file system resides. Example In this example. If a file system is mounted without the -o acl mount option. standard. “GFS-Specific Mount Options”) or acceptable standard Linux m ount -o options. Usage Mounting Without ACL Manipulation mount BlockDevice MountPoint Mounting With ACL Manipulation mount -o acl BlockDevice MountPoint -o acl GFS-specific option to allow manipulating file ACLs. see the Linux m ount man page. you must mount the file system with the -o acl mount option. but are not allowed to set them (with setfacl). T o manipulate file ACLs. m ount command options (for example. r). the GFS file system on /dev/vg01/lvol0 is mounted on the /m ydata1 directory. users are allowed to view ACLs (with getfacl). Multiple option parameters are separated by a comma and no spaces.2. T able 3. mount /dev/vg01/lvol0 /mydata1 Complete Usage mount BlockDevice MountPoint -o option T he -o option argument consists of GFS-specific options (refer to T able 3. or a combination of both. For information about other Linux m ount command options.2.Red Hat Enterprise Linux 5 Global File System 21 Red Hat Cluster. MountPoint Specifies the directory where the GFS file system should be mounted. Note T he m ount command is a Linux system command. After those requirements have been met. In addition to using GFS-specific options described in this section. “GFS-Specific Mount Options” describes the available GFS-specific -o option values that .

22 Usage can be passed to GFS at mount time.5 release and later Red Hat does not support the use of GFS as a singlenode file system. Red Hat will continue to support single-node GFS file systems for existing customers. . Note T his table includes descriptions of options that are used with local file systems only For the Red Hat Enterprise Linux 5.

T ells GFS that it is running as a local file system. the locking protocol name is read from the file system superblock. F_SET LK. Use this locktable=LockTableName oopses_ok . Note that the localflocks mount option affects only advisory fcntl()/POSIX locks and flock locks that are issued by applications. GFS-Specific Mount Options Option acl Description Allows manipulating file ACLs. T here may be circumstances where you do not want to use this option — for example.) A GFS node not panicking when an oops occurs minimizes the failure on other GFS nodes using the file system that the failed node is using.2. a GFS node panics when an oops occurs. By default. ignore_local_fs Caution: T his option should not be used when GFS file systems are shared. GFS can then turn on selected optimization capabilities that are not available when running in cluster mode. users are allowed to view ACLs (with getfacl). If a file system is mounted without the acl mount option. Look for fcntl calls that have F_GET LK. If you are unsure whether an application uses fcntl()/POSIX locks and thus requires that you mount your file system with the localflocks. (By default. using lock_nolock automatically turns on the localcaching and localflocks flags. causing the file system used by that node to stall for other GFS nodes. If LockModuleName is not specified. Forces GFS to treat the file system as a multihost file system. you can use the strace utility to print out the system calls that are made during a test run of the application. when you need more detailed troubleshooting information. T he localflocks flag is automatically turned on by lock_nolock. T he internal locking that ensures coherency of data across the cluster by means of GFS's glock abstraction is separate from and not affected by the localflocks setting.Red Hat Enterprise Linux 5 Global File System 23 T able 3. but are not allowed to set them (with setfacl). localcaching Caution: T his option should not be used when GFS file systems are shared. or F_SET LKW as the cm d argument. T ells GFS to let the VFS (virtual file system) layer do all flock and fcntl. T his option allows a GFS node to not panic when an oops occurs. allows the user to specify which locking table to use with the file system. T he localcaching flag is automatically turned on by lock_nolock. Note that GFS does not currently support either leases or mandatory locking. For a clustered file system. localflocks Caution: T his option should not be used when GFS file systems are shared. lockproto=LockModuleName Allows the user to specify which locking protocol to use with the file system.

the GFS script will not unmount the GFS file system. Usage umount MountPoint MountPoint Specifies the directory where the GFS file system should be mounted. T he default behavior. For information on the GFS withdraw function.4. and tries to unmount the file system. T o prevent the system from hanging when the GFS file systems are unmounted. including the cluster infrastructure. be sure to unmount the . is for the system to withdraw from the file system and make it inaccessible until the next reboot. As a result. Note: T his option is turned on automatically if lock_nolock locking is specified. which is the same as specifying errors=withdraw.3. you can override it by using the ignore_local_fs option. “T he GFS Withdraw Function”.24 Usage option with care. you should do one of the following: Always use an entry in the fstab file to mount the GFS file system.16. When errors=panic is specified. 3. file system errors will cause a kernel panic. Note T he um ount command is a Linux system command. however. T his unmount will fail without the cluster infrastructure and the system will hang. Unmounting a File System T he GFS file system can be unmounted the same way as any Linux file system — by using the um ount command. If a GFS file system has been mounted manually with the m ount command. in some cases the system may remain running. Information about this command can be found in the Linux um ount command man pages. see Section 3. upgrade errors=panic|withdraw Upgrade the on-disk format of the file system so that it can be used by newer versions of GFS. the standard shutdown process kills off all remaining user processes. 3. Special Considerations when Mounting GFS File Systems GFS file systems that have been mounted manually rather than automatically through an entry in the fstab file will not be known to the system when file systems are unmounted at system shutdown. After the GFS shutdown script is run.

T he gfs_tool gettune command displays a listing of the current values of the GFS tunable parameters. perform a hardware reboot.Red Hat Enterprise Linux 5 Global File System 25 file system manually with the um ount command before rebooting or shutting down the system. Displaying GFS Tunable Parameters T here are a variety of parameters associated with a GFS file system that you can modify with the gfs_tool settune command. If your file system hangs while it is being unmounted during system shutdown under these circumstances. T hey are intended for development purposes only and should not be changed.5. 3. It is unlikely that any data will be lost since the file system is synced earlier in the shutdown process. “GFS Quota Management”. T hese parameters are described in Section 3. and atim e_quantum . Some of these parameters are used to administer GFS quotas: quota_quantum .6. quota_account. Usage Display T unable Parameters gfs_tool gettune MountPoint MountPoint Specifies the directory where the GFS file system is mounted. along with examples of how to modify them. Note T he majority of the tunable parameters are internal parameters. all GFS tunable parameters for the file system on the mount point /m nt/gfs are displayed. Examples In this example. T hese parameters are not persistent across mounts. . quota_enforce. Parameters that you set with the gfs_tool settune command must be set on each node each time the file system is mounted.

a GFS node synchronizes updates to the quota file only periodically. 3.1.26 Usage [root@tng3-1]# gfs_tool gettune /mnt/gfs ilimit1 = 100 ilimit1_tries = 3 ilimit1_min = 1 ilimit2 = 500 ilimit2_tries = 10 ilimit2_min = 3 demote_secs = 300 incore_log_blocks = 1024 jindex_refresh_secs = 60 depend_secs = 60 scand_secs = 5 recoverd_secs = 60 logd_secs = 1 quotad_secs = 5 inoded_secs = 15 glock_purge = 0 quota_simul_sync = 64 quota_warn_period = 10 atime_quantum = 3600 quota_quantum = 60 quota_scale = 1. A user or group does not have a quota limit until one is set. Setting Quotas . GFS keeps track of the space used by each user and group even when there are no limits in place. GFS dynamically reduces the synchronization period as a "hard" quota limit is approached. T o minimize this. Other Linux quota facilities cannot be used with GFS.6. GFS updates quota information in a transactional way so system crashes do not require quota usages to be reconstructed. GFS Quota Management File-system quotas are used to limit the amount of file system space a user or group can use.0000 (1. 1) quota_enforce = 1 quota_account = 1 new_files_jdata = 0 new_files_directio = 0 max_atomic_write = 4194304 max_readahead = 262144 lockdump_size = 131072 stall_secs = 600 complain_secs = 10 reclaim_limit = 5000 entries_per_readdir = 32 prefetch_secs = 10 statfs_slots = 64 max_mhc = 10000 greedy_default = 100 greedy_quantum = 25 greedy_max = 250 rgrp_try_threshold = 100 statfs_fast = 0 3.6. T he "fuzzy" quota accounting can allow users or groups to slightly exceed the set limit. T o prevent a performance slowdown. GFS uses its gfs_quota command to manage quotas.

sectors. gfs_quota limit -u Bert -l 1024 -f /gfs T his example sets the warn limit for group ID 21 to 50 kilobytes on file system /gfs. -s and -b flags change the units to kilobytes. It can be either a user name from the password file or the UID number. Warn Limit gfs_quota warn -u User -l Size -f MountPoint gfs_quota warn -g Group -l Size -f MountPoint User A user ID to limit or warn. Examples T his example sets the hard limit for user Bert to 1024 megabytes (1 gigabyte) on file system /gfs. the value is in units of megabytes. respectively. MountPoint Specifies the GFS file system to which the actions apply. A hard limit value of zero means that no limit is enforced. T he file system will not let the user or group use more than that amount of disk space. . T he command only needs to be run on a single node where GFS is mounted. It can be either a group name from the group file or the GID number. A warn limit is usually a value less than the hard limit. Group A group ID to limit or warn. Limits are set using the gfs_quota command. and file system blocks. T he additional -k. T he file system will notify the user or group when the warn limit is reached to warn them of the amount of space they are using. Hard Limit gfs_quota limit -u User -l Size -f MountPoint gfs_quota limit -g Group -l Size -f MountPoint Setting Quotas. By default.Red Hat Enterprise Linux 5 Global File System 27 T wo quota settings are available for each user ID (UID) or group ID (GID): a hard limit and a warn limit. Usage Setting Quotas. A hard limit is the amount of space that can be used. A warn limit value of zero means that no limit is enforced. Size Specifies the new value to limit or warn.

WarnSize. Group A group ID to display information about a specific group.28 Usage gfs_quota warn -g 21 -l 50 -k -f /gfs 3. -s. Command Output GFS quota information from the gfs_quota command is displayed as follows: user User: limit:LimitSize warn:WarnSize value:Value group Group: limit:LimitSize warn:WarnSize value:Value T he LimitSize. or -b flags to the command line change the units to kilobytes. T he entire contents of the quota file can also be displayed using the gfs_quota list command. warn limit. Usage Displaying Quota Limits for a User gfs_quota get -u User -f MountPoint Displaying Quota Limits for a Group gfs_quota get -g Group -f MountPoint Displaying Entire Quota File gfs_quota list -f MountPoint User A user ID to display information about a specific user.2. and Value numbers (values) are in units of megabytes by default. . Displaying Quota Limits and Usage Quota limits and current usage can be displayed for a specific user or group using the gfs_quota get command. or file system blocks. MountPoint Specifies the GFS file system to which the actions apply. It can be either a group name from the group file or the GID number. User A user name or ID to which the data is associated. or value are listed. in which case all IDs with a non-zero hard limit. respectively. Adding the -k. It can be either a user name from the password file or the UID number. sectors.6.

Examples T his example displays quota information for all users and groups that have a limit set or are using any disk space on file system /gfs. Space allocated to GFS's hidden files can be left out of displayed values for the root UID and GID by adding the -d option to the command line. as described in Section 3.0 warn: user moe: limit: 1024.0 warn: group root: limit: 0. which would cause a slowdown in performance. GFS dynamically reduces the time between its quota-file updates to prevent the limit from being exceeded.Red Hat Enterprise Linux 5 Global File System 29 Group A group name or ID to which the data is associated. As a user or group approaches their quota limit.0 0.) T o see the current values of the GFS tunable parameters. Value T he actual amount of disk space used by the user or group. [root@ask-07 ~]# gfs_quota get -g users -f /gfs -s group users: limit: 0 warn: 96 value: 0 3. [root@ask-07 ~]# gfs_quota list -f /gfs user root: limit: 0. the quota_quantum parameter must be set on each node and each time the file system is mounted. “Displaying GFS T unable Parameters”. T his is necessary to avoid contention among nodes writing to the quota file. . LimitSize T he hard limit set for the user or group.0 0. A GFS node does not update this quota file for every file system write.0 warn: 0. including quota_quantum . Synchronizing Quotas GFS stores all quota information in its own internal file on disk. you can use the gfs_tool gettune.5. it updates the quota file once every 60 seconds.2 0.0 T his example displays quota information in sectors for group users on file system /gfs. the time period is 60 seconds.0 warn: group stooges: limit: 0.0 0. the gfs_quota command does not resolve UIDs and GIDs into names if the -n option is added to the command line. T his value is zero if no limit has been set. quota_quantum .0 value: value: value: value: 0.0 0. By default. Also. T he normal time period between quota synchronizations is a tunable parameter.2 0. rather.6.3. and can be changed using the gfs_tool command. Comments When displaying quota information. T his is useful when trying to match the numbers from gfs_quota with the results of a du command. (Changes to the quota_quantum parameter are not persistent across unmounts.

4 .) T o see the current values of the GFS tunable parameters. Examples T his example synchronizes the quota information from the node it is run on to file system /gfs. as described in Section 3. with the gfs_tool command. Seconds Specifies the new time period between regular quota-file synchronizations by GFS. (Disabling is not persistent across unmounts. quota_enforce. Disabling and enabling of quota enforcement is done by changing a tunable parameter.6. including quota_enforce. “Displaying GFS T unable Parameters”. enforcement is enabled by default. T he quota_enforce parameter must be disabled or enabled on each node where quota enforcement should be disabled/enabled. Usage . you can use the gfs_tool gettune. T uning the T ime Between Synchronizations gfs_tool settune MountPoint quota_quantum Seconds MountPoint Specifies the GFS file system to which the actions apply. gfs_tool settune /gfs quota_quantum 3600 3.30 Usage You can use the gfs_quota sync command to synchronize the quota information from a node to the on-disk quota file between the automatic updates performed by GFS. Enforcement can also be enabled. Each time the file system is mounted. Disabling/Enabling Quota Enforcement Enforcement of quotas can be disabled for a file system without clearing the limits set for all users and groups. gfs_quota sync -f /gfs T his example changes the default time period between regular quota-file updates to one hour (3600 seconds) for file system /gfs on a single node.5. Smaller values may increase contention and slow down performance. Usage Synchronizing Quota Information gfs_quota sync -f MountPoint MountPoint Specifies the GFS file system to which the actions apply.

GFS keeps track of disk usage for every user and group even when no quota limits have been set. it still keeps track of the file system usage for all users and groups so that quota-usage information does not require rebuilding after re-enabling quotas. quota_enforce {0|1} 0 = disabled 1 = enabled Comments A value of 0 disables enforcement. You can disable quota accounting completely by setting the quota_account tunable parameter to 0. gfs_tool settune /gfs quota_enforce 0 T his example enables quota enforcement on file system /gfs. gfs_tool settune /gfs quota_enforce 1 3. Quota accounting incurs unnecessary overhead if quotas are not used. “Displaying GFS T unable Parameters”. Usage gfs_tool settune MountPoint quota_account {0|1} MountPoint Specifies the GFS file system to which the actions apply.Red Hat Enterprise Linux 5 Global File System 31 gfs_tool settune MountPoint quota_enforce {0|1} MountPoint Specifies the GFS file system to which the actions apply. quota_account {0|1} 0 = disabled . quota accounting is enabled.5. Enforcement can be enabled by running the command with a value of 1 (instead of 0) as the final command line parameter. you can use the gfs_tool gettune. Disabling/Enabling Quota Accounting By default. therefore.) Quota accounting can be enabled by setting the quota_account tunable parameter to 1. Even when GFS is not enforcing quotas. Examples T his example disables quota enforcement on file system /gfs.5. T o see the current values of the GFS tunable parameters. (T he 0 setting is not persistent across unmounts. including quota_account.6. as described in Section 3. T his must be done on each node and after each mount.

Growing a File System T he gfs_grow command is used to expand a GFS file system after the device where the file system resides has been expanded. Note Initializing the quota file requires scanning the entire file system and may take a long time. “Displaying GFS T unable Parameters”. Running a gfs_grow command on an existing GFS file system fills all spare space between the current end of the file system and the end of the device with a newly initialized GFS file system extension. gfs_tool settune /gfs quota_account 0 T his example enables quota accounting on file system /gfs on a single node and initializes the quota file. as described in Section 3. Running the command with those flags displays the current state of the mounted GFS file system. Usage . Note Once you have created a GFS file system with the gfs_m kfs command.5. # gfs_tool settune /gfs quota_account 1 # gfs_quota init -f /gfs 3.32 Comments 1 = enabled Comments T o enable quota accounting on a file system. T o see the current values of the GFS tunable parameters. but only needs to be run on one node in a cluster. When the fill operation is completed. use the gfs_grow command with the -T (test) and -v (verbose) flags. the resource index for the file system is updated. you can use the gfs_tool gettune. you cannot decrease the size of the file system. All the other nodes sense that the expansion has occurred and automatically start using the new space. All nodes in the cluster can then use the extra storage space that has been added. T he gfs_grow command must be run on a mounted file system.7. T he quota file is initialized by running: gfs_quota init -f MountPoint. T o verify that the changes were successful. the quota_account parameter must be set back to 1. including quota_account. Examples T his example disables quota accounting on file system /gfs on a single node. the GFS quota file must be initialized to account for all current disk usage for users and groups on the file system. Afterward.

Done.. Examples In this example.Red Hat Enterprise Linux 5 Global File System 33 gfs_grow MountPoint MountPoint Specifies the GFS file system to which the actions apply. see Logical Volume Manager Administration. Expand the underlying cluster volume with LVM. After running the gfs_grow command.00 GB Logical volume gfslv successfully resized [root@tng3-1 ~]# gfs_grow /mnt/gfs FS: Mount Point: /mnt/gfs FS: Device: /dev/mapper/gfsvg-gfslv FS: Options: rw. [root@tng3-1 ~]# lvextend -L35G /dev/gfsvg/gfslv Extending logical volume gfslv to 35. Complete Usage gfs_grow [Options] {MountPoint | Device} [MountPoint | Device] MountPoint Specifies the directory where the GFS file system is mounted. Using this command with the -v provides additional information. the underlying logical volume for the file system file system on the /m nt/gfs directory is extended. . T he gfs_grow command provides a -T (test) option that allows you to see the results of executing the command without actually expanding the file system. Device Specifies the device node of the file system. Comments Before running the gfs_grow command: Back up important data on the file system.. Display the volume that is used by the file system to be expanded by running a df MountPoint command. you can run a df MountPoint command on the file system to check that the new space is now available in the file system. For information on administering LVM volumes.hostdata=jid=0:id=196609:first=1 FS: Size: 5341168 DEV: Size: 9175040 Preparing to write new FS information. and then the file system is expanded.

Displays command version information. Do all calculations. Usage gfs_jadd -j Number MountPoint Number Specifies the number of new journals to be added. For information on administering LVM volumes. Adding Journals to a File System T he gfs_jadd command is used to add journals to a GFS file system after the device where the file system resides has been expanded. T est. When the fill operation is completed.3. but it only needs to be run on one node in the cluster.8. Run a df MountPoint command to display the volume used by the file system where journals will be added. T urns up the verbosity of messages. but do not write any data to the disk and do not expand the file system. Expand the underlying cluster volume with LVM. GFS-specific Options Available While Expanding A File System Option -h -q -T -V -v Description Help. use the gfs_jadd command with the -T (test) and -v (verbose) flags.3. Displays a short usage message. T able 3. T o verify that the changes were successful. Running the command with those flags displays the current state of the mounted GFS file system. Quiet. “GFS-specific Options Available While Expanding A File System” describes the GFS-specific options that can be used while expanding a GFS file system. Running a gfs_jadd command on a GFS file system uses space between the current end of the file system and the end of the device where the file system resides. All the other nodes sense that the expansion has occurred. see the LVM Administrator's Guide You can find out how many journals are currently used by the file system with the gfs_tool df . 3. MountPoint Specifies the directory where the GFS file system is mounted. Comments Before running the gfs_jadd command: Back up important data on the file system. the journal index is updated.34 Usage T able 3. T he gfs_jadd command must be run on mounted file system. T urns down the verbosity level.

Examples In this example.hostdata=jid=0:id=196609:first=1 FS: Size: 5275632 DEV: Size: 9175040 Preparing to write new FS information. two journals are added to the file system on the /m nt/gfs directory. T he underlying logical volume for this file system is extended before the journal can be added. Done. In this example. the file system mounted at /m nt/gfs uses 8 journals..Red Hat Enterprise Linux 5 Global File System 35 MountPoint command.. In the following example. [root@tng3-1 gfs]# gfs_tool df /mnt/gfs /mnt/gfs: SB lock proto = "lock_dlm" SB lock table = "tng3-cluster:mydata1" SB ondisk format = 1309 SB multihost format = 1401 Block size = 4096 Journals = 8 Resource Groups = 76 Mounted lock proto = "lock_dlm" Mounted lock table = "tng3-cluster:mydata1" Mounted host data = "jid=0:id=196609:first=1" Journal number = 0 Lock module flags = 0 Local flocks = FALSE Local caching = FALSE Oopses OK = FALSE Type Total Used Free use% -----------------------------------------------------------------------inodes 33 33 0 100% metadata 38 2 36 5% data 4980077 178 4979899 0% After running the gfs_jadd command.hostdata=jid=0:id=196609:first=1 FS: Size: 5242877 DEV: Size: 9175040 Preparing to write new FS information. Done. one journal is added to the file system that is mounted at the /m nt/gfs directory.00 GB Logical volume gfslv successfully resized [root@tng3-1 ~]# gfs_jadd -j1 /mnt/gfs FS: Mount Point: /mnt/gfs FS: Device: /dev/mapper/gfsvg-gfslv FS: Options: rw. [root@tng3-1 ~]# lvextend -L35G /dev/gfsvg/gfslv Extending logical volume gfslv to 35. Complete Usage .. [root@tng3-1 ~]# gfs_jadd -j2 /mnt/gfs FS: Mount Point: /mnt/gfs FS: Device: /dev/mapper/gfsvg-gfslv FS: Options: rw. you can run the gfs_tool df MountPoint command again to check that the new journals have been added to the file system..

Displays short usage message. bypassing the operating system read and write caches. Direct I/O Direct I/O is a feature of the file system whereby file reads and writes go directly from the applications to the storage device.36 Examples gfs_jadd [Options] {MountPoint | Device} [MountPoint | Device] MountPoint Specifies the directory where the GFS file system is mounted. or when a GFS direct I/O attribute is attached to a file. T he size specified is rounded down so that it is a multiple of the journal-segment size that was specified when the file system was created. Do all calculations. T est. . all I/O operations must be done in block-size multiples of 512 bytes. Direct I/O is used only by applications (such as databases) that manage their own caches. T urns up the verbosity of messages. Enabling this flag helps discover what the gfs_jadd command would have done if it were run without this flag. T o add journals of different sizes to the file system. An application invokes direct I/O by opening a file with the O_DIRECT flag. Specifies the size of the new journals in megabytes. “GFS-specific Options Available When Adding Journals” describes the GFS-specific options that can be used when adding journals to a GFS file system. Using the -v flag with the -T flag turns up the verbosity level to display more information. Specifies the number of new journals to be added by the gfs_jadd command. Alternatively. T able 3. T able 3. GFS-specific Options Available When Adding Journals Flag -h -J MegaBytes Parameter Description Help. T urns down the verbosity level. T he default value is 1. Device Specifies the device node of the file system. but do not write any data to the disk and do not add journals to the file system. T he memory being read from or written to must also be 512-byte aligned. T he minimum size is 32 megabytes. in which case direct I/O is used regardless of how the file is opened.9. GFS can attach a direct I/O attribute to a file. When a file is opened with O_DIRECT .4 . Default journal size is 128 megabytes. Displays command version information. Quiet. -j -T Number -q -V -v 3.4. the gfs_jadd command must be run for each size journal.

. and to the same file at the same point in time. define _GNU_SOURCE at the beginning of a source file before any includes.9. writing to a file that is memory mapped will succeed. T he output for this command includes a Flags: at the end of the display followed by a listing of the flags that are set for the indicated file. T he m m ap system call on its own is safe when direct I/O is in use. O_DIRECT If an application uses the O_DIRECT flag on an open() system call. page faults) and direct I/O do not occur simultaneously on the same file. does not memory map the files to which it uses direct I/O and thus is unaffected. 3. GFS File Attribute T he gfs_tool command can be used to assign (set) a direct I/O attribute flag.9. . T he directio flag can also be cleared. unless there are page faults in flight at that point in time. to a GFS file.2. direct I/O is used for the opened file. Usage Setting the directio Flag gfs_tool setflag directio File Clearing the directio Flag gfs_tool clearflag directio File File Specifies the file where the directio flag is assigned.e. T he Oracle database. T his is a problem only when the memory mapped I/O and the direct I/O are both performed on the same node as each other. T o cause the O_DIRECT flag to be defined with recent glibc libraries.1. A workaround is to use file locking to ensure that memory mapped (i. directio.Red Hat Enterprise Linux 5 Global File System 37 Note Performing I/O through a memory mapping and also via direct I/O to the same file at the same time may result in the direct I/O being failed with an I/O error. You can use the gfs_tool stat filename to check what flags have been set for a GFS file. One of the following methods can be used to enable direct I/O on a file: O_DIRECT GFS file attribute GFS directory attribute 3. In addition. or define it on the cc line when compiling. which is one of the main direct I/O using applications. T his occurs because the page invalidation required for the direct I/O can race with a page fault generated through the mapping. as expected.

[root@tng3-1 gfs]# gfs_tool stat /mnt/gfs/datafile mh_magic = 0x01161970 . the inherit_directio flag is inherited by any new subdirectories created in the directory. the command sets the inherit_directio flag on the directory named /m nt/gfs/data. Enabling the inherit_directio flag on a directory causes all newly created regular files in that directory to automatically inherit the directio flag.9.. Also.. [root@tng3-1 gfs]# gfs_tool stat /mnt/gfs/data .38 Example Example In this example. Usage Setting the inherit_directio flag gfs_tool setflag inherit_directio Directory Clearing the inherit_directio flag gfs_tool clearflag inherit_directio Directory Directory Specifies the directory where the inherit_directio flag is set. GFS Directory Attribute T he gfs_tool command can be used to assign (set) a direct I/O attribute flag.. T he full output has been truncated. gfs_tool setflag directio /mnt/gfs/datafile T he following command checks whether the directio flag is set for /m nt/gfs/datafile.3. T he inherit_directio flag can also be cleared. the command sets the directio flag on the file named datafile in directory /m nt/gfs. inherit_directio. Example In this example. Flags: directio 3. Flags: inherit_directio . to a GFS directory.. T he output has been elided to show only the relevant information. gfs_tool setflag inherit_directio /mnt/gfs/data T his command displays the flags that have been set for the /m nt/gfs/data directory.

the output has been elided to show only the relevant information. data journaling is enabled on a directory (and all its subdirectories) or on a zero-length file by setting the inherit_jdata or jdata attribute flags to the directory or file. An fsync() call on a file causes the file's data to be written to disk immediately. T his example also shows the gfs_tool stat command you can use to verify what flags are set for a directory. Data Journaling Ordinarily.. GFS writes only metadata to its journal. T he call returns when the disk reports that all data is safely written. Usage Setting and Clearing the inherit_jdata Flag gfs_tool setflag inherit_jdata Directory gfs_tool clearflag inherit_jdata Directory Setting and Clearing the jdata Flag gfs_tool setflag jdata File gfs_tool clearflag jdata File Directory Specifies the directory where the flag is set or cleared. Existing files with zero length can also have data journaling turned on or off. An fsync() returns as soon as the data is written to the journal. Flags: inherit_jdata . Examples T his example shows setting the inherit_jdata flag on a directory. especially for small files. Any data written to the files will be journaled. [root@tng3-1]# gfs_tool setflag inherit_jdata /mnt/gfs/data [root@tng3-1]# gfs_tool stat /mnt/gfs/data . Applications that rely on fsync() to sync file data may see improved performance by using data journaling. All files created in the directory or any of its subdirectories will have the jdata flag assigned automatically. Data journaling can result in a reduced fsync() time. Data journaling can be enabled automatically for any GFS files created in a flagged directory (and all its subdirectories). T he directory and file attribute flags can also be cleared. File Specifies the zero-length file where the flag is set or cleared. because the file data is written to the journal in addition to the metadata. Using the gfs_tool command.10.Red Hat Enterprise Linux 5 Global File System 39 3. which can be substantially faster than the time it takes to write the file data to the main file system. File contents are subsequently written to disk by the kernel's periodic sync that flushes file system buffers.. respectively.

can be specified when the file system is mounted. . Any data written to the file will be journaled. T he file must have a size of zero when you set this flag.40 Usage T his example shows setting the jdata flag on a file. Because few applications use the information provided by atim e.. Configuring atime Updates Each file inode and directory inode has three time stamps associated with it: ctim e — T he last time the inode status was changed m tim e — T he last time the file (or directory) data was modified atim e — T he last time the file (or directory) data was accessed If atim e updates are enabled as they are by default on GFS and other Linux file systems then every time a file is read. which disables atim e updates on that file system.1. therefore. those updates can require a significant amount of unnecessary write traffic and file-locking traffic. it may be preferable to turn off atim e updates. the output has been elided to show only the relevant information. Mount with noatim e A standard Linux mount option. T wo methods of reducing the effects of atim e updating are available: Mount with noatim e T une GFS atim e quantum 3. its inode needs to be updated. [root@tng3-1]# gfs_tool setflag jdata /mnt/gfs/datafile [root@tng3-1]# gfs_tool stat /mnt/gfs/datafile . the GFS file system resides on the /dev/vg01/lvol0 and is mounted on directory /gfs with atime updates turned off. T hat traffic can degrade performance. Flags: jdata 3.11. noatim e. Usage mount BlockDevice MountPoint -o noatime BlockDevice Specifies the block device where the GFS file system resides.11. Example In this example. T his example also shows the gfs_tool stat command you can use to verify what flags are set for a file. MountPoint Specifies the directory where the GFS file system should be mounted..

2. Example In this example. Usage Start Suspension . atim e_quantum . T he setting is not persistent across unmounts. then atim e updates are written more frequently. including atim e_quantum . Seconds Specifies the update period in seconds. If a node's system time is out of synchronization by a significant fraction of the tunable parameter. Suspending Activity on a File System You can suspend write activity to a file system by using the gfs_tool freeze command. Usage Changing the atim e_quantum Parameter Value gfs_tool settune MountPoint atime_quantum Seconds MountPoint Specifies the directory where the GFS file system is mounted. gfs_tool settune /gfs atime_quantum 86400 3. T he time quantum is a tunable parameter that can be adjusted using the gfs_tool command. the atim e update period is set to once a day (86. T he gfs_tool unfreeze command ends the suspension. T une GFS atim e Quantum When atim e updates are enabled. Increasing the frequency of atim e updates may cause performance degradation in clusters with heavy work loads.11. T o see the current values of the GFS tunable parameters. It must be set on each node and each time the file system is mounted. you can use the gfs_tool gettune. “Displaying GFS T unable Parameters”. T he default value for atim e_quantum is 3600 seconds.Red Hat Enterprise Linux 5 Global File System 41 mount /dev/vg01/lvol0 /gfs -o noatime 3. Suspending write activity allows hardware-based device snapshots to be used to capture the file system in a consistent state. Each GFS node updates the access time based on the difference between its system time and the time recorded in the inode. GFS (by default) only updates them once an hour. It is required that system clocks of all GFS nodes in a cluster be synchronized.5. as described in Section 3.400 seconds) for the GFS file system on mount point /gfs. T he gfs_tool settune command is used to change the atim e_quantum parameter value.12.

13. Displaying Extended GFS Information and Statistics You can use the gfs_tool command to gather a variety of details about GFS.42 Examples gfs_tool freeze MountPoint End Suspension gfs_tool unfreeze MountPoint MountPoint Specifies the file system. Example T his example reports extended file system usage about file system /m nt/gfs. T he information is more detailed than a standard df. gfs_tool unfreeze /gfs 3. T his section describes typical use of the gfs_tool command for displaying space usage. For more information about other gfs_tool flags. gfs_tool freeze /gfs T his example ends suspension of writes to file system /gfs. refer to the gfs_tool man page. Examples T his example suspends writes to file system /gfs. . and extended status. Usage gfs_tool df MountPoint MountPoint Specifies the file system to which the action applies. Displaying GFS Space Usage You can use the df flag of the gfs_tool to display a space-usage summary of a given file system. 3. T he gfs_tool command provides additional action flags (options) not listed in this section. statistics.13.1.

Note T he majority of the GFS counters reflect the internal operation of the GFS file system and are for development purposes only. Each gfs_tool unfreeze command decrements this count. Each gfs_tool freeze command increments this count. If the -c option is used. T he gfs_tool counters command displays the following statistics. .13. freeze count A freeze count greater than 0 means the file system is frozen. incore inodes T he number of gfs_inode structures that currently exist in gfs. locks T he number of gfs_glock structures that currently exist in gfs.Red Hat Enterprise Linux 5 Global File System 43 [root@ask-07 ~]# gfs_tool df /mnt/gfs /gfs: SB lock proto = "lock_dlm" SB lock table = "ask_cluster:mydata1" SB ondisk format = 1309 SB multihost format = 1401 Block size = 4096 Journals = 8 Resource Groups = 605 Mounted lock proto = "lock_dlm" Mounted lock table = "ask_cluster:mydata1" Mounted host data = "jid=0:id=786433:first=1" Journal number = 0 Lock module flags = 0 Local flocks = FALSE Local caching = FALSE Oopses OK = FALSE Type Total Used Free use% -----------------------------------------------------------------------inodes 5 5 0 100% metadata 78 15 63 19% data 41924125 0 41924125 0% 3. the gfs_tool command continues to run. Displaying GFS Counters You can use the counters flag of the gfs_tool to display statistics about a file system. A freeze count of 0 means the file system is not frozen.2. locks held T he number of existing gfs_glock structures that are not in the UNLOCKED state. displaying statistics once per second.

unlinked inodes T he gfs_inoded daemon links deleted inodes to a global list and cleans them up every 15 seconds (a period that is tunable). .44 Examples m etadata buffers T he number of gfs_bufdata structures that currently exist in gfs. log wraps T he number of times journal has wrapped around. glock dependencies T he number of gfs_depend structures that currently exist in gfs. It is related to the number of gfs_unlinked structures currently in gfs. before they are flushed to disk. outstanding LM calls obsolete outstanding BIO calls obsolete fh2dentry m isses T he number of times an NFS call could not find a dentry structure in the cache. quota IDs T he number of gfs_quota_data structures that currently exist in gfs. incore log buffers T he number of buffers in in-memory journal log (incore log). T his number is the list length. log space used T he the percentage of journal space used. m eta header cache entries T he number of gfs_m eta_header_cache structures that currently exist in gfs. glocks on reclaim list T he number of glocks on the reclaim list.

delete. export operations T he number of times a seek operation has been performed on the nfs dentry structure. lm callbacks T he number of times the lock manager has been contacted to change a lock state. lm _unlock calls T he number of times the lock manager has been contacted to release a lock. lm _lock calls T he number of times the lock manager has been contacted to obtain a lock. glock prefetch calls T he number of glock prefetch calls. directIO.). glock dq calls T he number of glocks released since the file system was mounted. prepare_write. file operations T he number of file operations that have been invoked (read. write. super operations T he number of super block operations. seek. symlink.Red Hat Enterprise Linux 5 Global File System 45 glocks reclaim ed T he number of glocks which have been reclaimed. inode operations T he number of inode operations that have been invoked (create. vm operations . writepage. and com m it_write) dentry operations T he number of times a seek operation has been performed on the vfs dentry structure. etc. etc). address operations T he number of address space call operations (readpage.

46 Usage T he number of times the m m ap function has been called. mmap call count block I/O reads obsolete block I/O writes obsolete Usage gfs_tool counters MountPoint MountPoint Specifies the file system to which the action applies. . Example T his example reports statistics about the file system mounted at /m nt/gfs.

05% meta header cache entries 5 glock dependencies 5 glocks on reclaim list 0 log wraps 0 outstanding LM calls 0 outstanding BIO calls 0 fh2dentry misses 0 glocks reclaimed 345 glock nq calls 11632 glock dq calls 11596 glock prefetch calls 84 lm_lock calls 545 lm_unlock calls 237 lm callbacks 782 address operations 1075 dentry operations 374 export operations 0 file operations 1428 inode operations 1451 super operations 21239 vm operations 0 block I/O reads 0 block I/O writes 0 3. T his information is intended for development purposes only.3.13. Example T his example reports extended file status about file /gfs/datafile. Note T he information that the gfs_tool stat command displays reflects internal file system information.Red Hat Enterprise Linux 5 Global File System 47 [root@tng3-1 gfs]# gfs_tool counters /mnt/gfs locks 165 locks held 133 freeze count 0 incore inodes 34 metadata buffers 5 unlinked inodes 0 quota IDs 0 incore log buffers 0 log space used 0. Usage gfs_tool stat File File Specifies the file from which to get information. Displaying Extended Status You can use the stat flag of the gfs_tool to display extended status information about a GFS file. .

if a storage device loses power or is physically disconnected.48 Usage [root@tng3-1 gfs]# gfs_tool stat mh_magic = 0x01161970 mh_type = 4 mh_generation = 3 mh_format = 400 mh_incarn = 1 no_formal_ino = 66 no_addr = 66 di_mode = 0600 di_uid = 0 di_gid = 0 di_nlink = 1 di_size = 503156 di_blocks = 124 di_atime = 1207672023 di_mtime = 1207672023 di_ctime = 1207672023 di_major = 0 di_minor = 0 di_rgrp = 17 di_goal_rgrp = 17 di_goal_dblk = 371 di_goal_mblk = 44 di_flags = 0x00000000 di_payload_format = 0 di_type = 1 di_height = 1 di_incarn = 0 di_pad = 0 di_depth = 0 di_entries = 0 no_formal_ino = 0 no_addr = 0 di_eattr = 0 di_reserved = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 /gfs/datafile 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3. Repairing a File System When nodes fail with the file system mounted. file system journaling allows fast recovery. you can recover the GFS file system by using the gfs_fsck command.14. However. .) When that type of corruption occurs. (Journaling cannot be used to recover from storage subsystem failures. file system corruption may occur. Important T he gfs_fsck command must be run only on a file system that is unmounted from all nodes.

nodiratime. Note that if the block size was 1K. For example.noatime. Adding a second -q flag decreases the level again. Adding a second -v flag increases the level again. Running the gfs_fsck command requires system memory above and beyond the memory used for the operating system and kernel. Usage gfs_fsck -y BlockDevice -y T he -y flag causes all questions to be answered with yes. or continue processing. modify the /etc/fstab file so that the final two columns for a GFS file system mount point show "0 0" rather than "1 1" (or any other numbers). T he gfs_fsck command can not determine at boot time whether the file system is mounted by another node in the cluster.Red Hat Enterprise Linux 5 Global File System 49 Important You should not check a GFS file system at boot time with the gfs_fsck command. the gfs_fsck command does not prompt you for an answer before making changes. You can increase the level of verbosity by using the -v flag. divide the file system size (in bytes) by the block size. running the gfs_fsck command would require four times the memory. or 16GB. Refer to the gfs_fsck man page.noquota 0 0 Note T he gfs_fsck command has changed from previous releases of Red Hat GFS in the following ways: Pressing Ctrl+C while running the gfs_fsck interrupts processing and displays a prompt asking whether you would like to abort the command. T he option provides a way of trying the command to reveal errors without actually allowing the gfs_fsck command to take effect. gfs_fsck(8). So to estimate the amount of memory you will need to run the gfs_fsck command on your file system. Each block of memory in the file system itself requires approximately one byte of additional memory. With the -y flag specified. divide 16T B by 4K: 17592186044416 / 4096 = 4294967296 T his file system requires approximately 4GB of free memory to run the gfs_fsck command. T he -n option opens a file system as read-only and answers no to any queries automatically. skip the rest of the current pass. as in the following example: /dev/VG12/lv_svr_home /svr_home gfs defaults. T o ensure that the gfs_fsck command does not run on a GFS file system at boot time. You can decrease the level of verbosity by using the -q flag. . for additional information about other command options. You should run the gfs_fsck command manually only after the system boots. for a GFS file system that is 16T B with a block size of 4K.

Initializing special inodes. Pass3 complete Starting pass4 Checking inode reference counts.. Pass1c complete Starting pass2 Checking directory inodes.50 Example BlockDevice Specifies the block device where the GFS file system resides. (passed) Setting block ranges.. Starting pass1 Checking metadata in Resource Group 0 Checking metadata in Resource Group 1 . Creating a block list of size 9175040. the sample output is extensive and repetitive lines have been elided....... No duplicate blocks found Pass1b complete Starting pass1c Looking for inodes containing ea blocks. Level 1 check. Pass4 complete Starting pass5 .. Pass2 complete Starting pass3 Marking root inode connected Checking directory linkage. Clearing journals (this may take a while)Clearing journal 0 Clearing journal 1 Clearing journal 2 ..... [root@tng3-1]# gfs_fsck -v -y /dev/gfsvg/gfslv Initializing fsck Initializing lists. Clearing journal 10 Journals cleared.. Validating Resource Group index. Freeing buffers. Because this example uses the -v (verbose) option.. Checking metadata in Resource Group 91 Pass1 complete Starting pass1b Looking for duplicate blocks.. All queries to repair are automatically answered with yes.. Example In this example.. Updating Resource Group 92 Pass5 complete Writing changes to disk Syncing the device. the GFS file system residing on block device /dev/gfsvg/gfslv is repaired. . 92 resource groups found.

T his string is not the name of an actual file or directory itself. .15. Context-Dependent Path Names Context-Dependent Path Names (CDPNs) allow symbolic links to be created that point to variable destination files or directories. T he CDPN variable must be used alone as one segment of a complete path.Red Hat Enterprise Linux 5 Global File System 51 3. CDPN variables can be used in any path name. When LinkName is followed. the destination depends on the type of variable and the node or user doing the following. “CDPN Variable Values”) to represent one of multiple existing files or directories. the CDPN variable name cannot be combined with other characters to form an actual directory or file name.) LinkName Specifies a name that will be seen and used by applications and will be followed to get to one of the multiple real files or directories. T he variables are resolved to real files or directories each time an application follows the link. However. Usage For a Normal Symbolic Link ln -s Target LinkName Target Specifies an existing file or directory on a file system. not just with symbolic links. T he resolved value of the link depends on the node or user following the link. (T he real files or directories must be created in a separate step using names that correlate with the type of variable used.5. For a Variable Symbolic Link ln -s Variable LinkName Variable Specifies a special reserved name from a list of values (refer to T able 3. LinkName Specifies a name to represent the real file or directory on the other end of the link.

CDPN Variable Values Variable @ hostnam e Description T his variable resolves to a real file or directory named with the hostname string produced by the output of the following command: echo `unam e -n` T his variable resolves to a real file or directory name with the machinetype string produced by the output of the following command: echo `unam e -m ` T his variable resolves to a real file or directory named with the operating-system name string produced by the output of the following command: echo `unam e -s` T his variable resolves to a real file or directory named with the combined machine type and OS release strings produced by the output of the following command: echo `unam e -m `_`unam e -s` T his variable resolves to a real file or directory named with the user ID string produced by the output of the following command: echo `id u` T his variable resolves to a real file or directory named with the group ID string produced by the output of the following command: echo `id g` @ m ach @ os @ sys @ uid @ gid Example In this example. The GFS Withdraw Function T he GFS withdraw function is a data integrity feature of GFS file systems in a cluster. instead.52 Example T able 3. Individual directories /gfs/n01/. If the GFS kernel . T o do this. and /gfs/n03/ are created that will be the actual directories used when each node references /gfs/log/. no actual log directory is created. but the administrator wants these directories to be separate for each node. an @ hostnam e CDPN link is created with the name log. n01# cd /gfs n01# mkdir n01 n02 n03 n01# ln -s @hostname log n01# ls -l lrwxrwxrwx drwxr-xr-x drwxr-xr-x drwxr-xr-x /gfs 1 root 2 root 2 root 2 root root root root root 9 Apr 25 3864 Apr 3864 Apr 3864 Apr 14:04 log -> @hostname/ 25 14:05 n01/ 25 14:06 n02/ 25 14:06 n03/ n01# touch /gfs/log/fileA n02# touch /gfs/log/fileB n03# touch /gfs/log/fileC n01# ls /gfs/log/ fileA n02# ls /gfs/log/ fileB n03# ls /gfs/log/ fileC 3. /gfs/n02/.5. Applications on each node uses directory /gfs/log/.16. there are three nodes with hostnames n01. n02 and n03.

it checks the block count. . If the problem persists. T his is the reason for the GFS2 support requirement to always use a CLVM device under GFS2. It is highly recommended to check the logs to see if that is the case if a withdraw occurs. after which you can reboot and remount the GFS file system to replay the journals. since otherwise it is not possible to insert a device mapper target. when the withdraw occurs.Red Hat Enterprise Linux 5 Global File System 53 module detects an inconsistency in a GFS file system following an I/O operation. T he purpose of the device mapper error target is to ensure that all future I/O operations will result in an I/O error that will allow the filesystem to be unmounted in an orderly fashion. Sometimes the withdraw function can be triggered by device I/O errors relating to the underlying block device. Internally. the GFS2 withdraw function works by having the kernel send a message to the gfs_controld daemon requesting withdraw. you can unmount the file system from all nodes in the cluster and perform file system recovery with the gfs_fsck command. When this option is specified. that indicates a file system inconsistency since the block count did not match the list of blocks found. T he GFS withdraw function is less severe than a kernel panic. When it is done. When this occurs. An example of an inconsistency that would yield a GFS withdraw is an incorrect block count. the withdraw may fail if it is not possible for the dm setup program to insert the error target as requested. the file system becomes unavailable to the cluster. it is normal to see a number of I/O errors from the device mapper device reported in the system logs. T he I/O operation stops and the system waits for further I/O operations to stop with an error. Occasionally. You can override the GFS withdraw function by mounting the file system with the -o errors=panic option specified. you can stop any other services or applications manually. It then tells the kernel that this has been completed. preventing further damage. When the GFS kernel module deletes a file from a file system. which causes the node to be fenced. As a result. T his can happen if there is a shortage of memory at the point of the withdraw and memory cannot be reclaimed due to the problem that triggered the withdraw in the first place. If the block count is not one (meaning all that is left is the disk inode itself). any errors that would normally cause the system to withdraw cause the system to panic instead. which would cause another node to fence the node. A withdraw does not always mean that there is an error in GFS2. T his stops the node's cluster communications. T he gfs_controld daemon runs the dm setup program to place the device mapper error target underneath the filesystem preventing further access to the block device. it systematically removes all the data and metadata blocks associated with that file.

Revision 3.0-1 T hu Jul 21 2011 Steven Levine Resolves: #458880 Adds note about using file locking to ensure that memory mapped and direct I/O do not occur simultaneously on the same file. Steven Levine Resolves: #667552 Adds note to overview about issuing operations on one directory from more than one node at the same time. Resolves: #515348 Documents new -o errors mount option.8 Revision 6. Resolves: #676133 Clarifies section on the withdraw function. Resolves: #573750 Documents memory requirements for gfs_fsck. Steven Levine Steven Levine Steven Levine Revision 5.8 Revision 6. Revision 3.54 Revision History Revision History Revision 4 -31.0-1 T hu Dec 23 2010 Resolves: #661520 Updates information about maximum file system size. Resolves: #574462 Steven Levine .0-2 T hu Dec 15 2011 Beta release of Red Hat Enterprise Linux 5. Resolves: #736157 Adds note warning not to check a GFS file system at boot time.33 Rebuild for Publican 3.0-1 T hu Nov 10 2011 Resolves: #758843 Notes CLVM requirement for clustered environment. Revision 4 . Resolves: #562199 Adds note clarifying 16-node limitation.0-2 T ue Aug 3 2010 Steven Levine Resolves: #562251 Adds information about the localflocks mount option and when it may be required.0-3 Mon Feb 20 2012 Release for GA of Red Hat Enterprise Linux 5.0 2012-07-18 Anthony T owns Revision 6.0-1 T hu Mar 18 2010 Resolves: #568179 Adds note clarifying support policy for single-node system.

configuring updates. Direct I/O . Before Setting Up GFS configuration.0-1 T ue Aug 18 2009 Steven Levine Resolves: #515807 Adds note clarifying that you cannot reduce the size of an existing file system. T une GFS atime Quantum audience. Getting Started . Usage configuration. Revision 2. Displaying GFS Counters displaying GFS extended status. GFS File Attribute . GFS Directory Attribute . Data Journaling direct I/O. Audience C CDPN variable values table. O_DIRECT displaying extended GFS information and statistics. Creating a File System D data journaling.directory attribute. Configuring atime Updates . Adding Journals to a File System atime. before. Revision 1.Red Hat Enterprise Linux 5 Global File System 55 Clarifies issue of gfs requiring CLVM for Red Hat support.file attribute.0-1 T hu Jan 29 2009 Index A adding journals to a file system.tuning atime quantum. initial.prerequisite tasks.mounting with noatime . Displaying Extended Status displaying GFS space usage. Resolves: #458604 Adds section on GFS withdraw function. Resolves: #480002 Adds caveat about unmounting a file system manually if you mounted it manually. Displaying Extended GFS Information and Statistics displaying GFS counters. Mount with noatime . New and Changed Features .O_DIRECT . Prerequisite T asks creating a file system. Displaying GFS Space Usage DLM (Distributed Lock Manager).

Disabling/Enabling Quota Enforcement . configuring updates.displaying counters. Mount with noatime . Displaying GFS Space Usage . Displaying Extended Status . Context-Dependent Path Names creating.directory attribute. configuring updates. Mounting a File System. Special Considerations when Mounting GFS File Systems G GFS . Managing GFS . Adding Journals to a File System . O_DIRECT . Mount with noatime . Direct I/O .tuning atime quantum. Special Considerations when Mounting GFS File Systems . GFS Directory Attribute . new and changed. Configuring atime Updates .disabling/enabling quota accounting.file attribute. T une GFS atime Quantum context-dependent path names (CDPNs). Repairing a File System .mounting with noatime . Displaying GFS Counters .quota management. Creating a File System data journaling. Unmounting a File System.setting quotas.managing. Disabling/Enabling Quota Accounting . New and Changed Features feedback.suspending activity.displaying extended information and statistics. Feedback file system . Suspending Activity on a File System .atime. Displaying Quota Limits and Usage .disabling/enabling quota enforcement. Synchronizing Quotas .file attribute.atime.directory attribute. GFS File Attribute . Setting Quotas . Configuring atime Updates .repairing. Growing a File System . T une GFS atime Quantum .56 Index F features. GFS Quota Management . Displaying Extended GFS Information and Statistics .adding journals. GFS Directory Attribute . Data Journaling direct I/O.O_DIRECT .growing.synchronizing quotas.mounting with noatime . O_DIRECT .tuning atime quantum.displaying space usage.direct I/O.O_DIRECT .mounting.unmounting.displaying extended status. GFS File Attribute .displaying quota limits. Direct I/O .

GFS Software Components .withdraw function. and Economy P parameters. Displaying GFS T unable Parameters path names. Displaying Quota Limits and Usage .economy. New and Changed Features . Setting Quotas . before.displaying quota limits.Red Hat Enterprise Linux 5 Global File System 57 . Initial Setup T asks introduction. GFS Overview. Complete Usage GFS-specific options for expanding file systems table. Before Setting Up GFS mount table.audience. GFS Overview. Performance. Mounting a File System. GFS Software Components GFS software components table. Complete Usage gfs_mkfs command options table.disabling/enabling quota enforcement. GFS file system. Performance. Managing GFS maximum size. Before Setting Up GFS GFS software components. Synchronizing Quotas . Audience M managing GFS. New and Changed Features I initial tasks . Scalability. GFS Software Components GFS-specific options for adding journals table. Scalability.setup. context-dependent (CDPNs).quota management. and Economy . GFS Quota Management . Disabling/Enabling Quota Accounting . Scalability. GFS tunable. Growing a File System GULM (Grand Unified Lock Manager).configuration. Disabling/Enabling Quota Enforcement . Complete Usage mounting a file system.features. Performance. Before Setting Up GFS .synchronizing quotas.GFS software components. new and changed. Introduction .performance. and Economy . Complete Options growing a file system. initial.scalability.setting quotas. Context-Dependent Path Names .disabling/enabling quota accounting. T he GFS Withdraw Function GFS file system maximum size. Special Considerations when Mounting GFS File Systems O overview. GFS Overview .

Setting Quotas .58 Index path names. GFS. Disabling/Enabling Quota Enforcement . Special Considerations when Mounting GFS File Systems unmounting a file system. Displaying Quota Limits and Usage . Suspending Activity on a File System system hang at unmount. Synchronizing Quotas R repairing a file system. context-dependent (CDPNs). Disabling/Enabling Quota Accounting . system hang.disabling/enabling quota accounting. initial . Complete Usage gfs_mkfs command options. Usage GFS software components. Displaying GFS T unable Parameters U unmount. Initial Setup T asks suspending activity on a file system. GFS. Prerequisite T asks Q quota management. Complete Options mount options.configuration. Complete Usage GFS-specific options for expanding file systems. Special Considerations when Mounting GFS File Systems T tables CDPN variable values.synchronizing quotas. Special Considerations when Mounting GFS File Systems W withdraw function.initial tasks. Repairing a File System S setup. Unmounting a File System.disabling/enabling quota enforcement. GFS Software Components GFS-specific options for adding journals. T he GFS Withdraw Function . initial.setting quotas. GFS Quota Management . Context-Dependent Path Names preface (see introduction) prerequisite tasks .displaying quota limits. Complete Usage tunable parameters.