Red Hat GLOBAL FILE SYSTEM 4.5 Manual

Hide thumbs Also See for GLOBAL FILE SYSTEM 4.5:
Table of Contents

Advertisement

Global File System
4.5
Red Hat Global File
System
ISBN: N/A
Publication date:

Advertisement

Table of Contents
loading

Summary of Contents for Red Hat GLOBAL FILE SYSTEM 4.5

  • Page 1 Global File System Red Hat Global File System ISBN: N/A Publication date:...
  • Page 2 Global File System This book provides information about installing, configuring, and maintaining Red Hat GFS (Red Hat Global File System).
  • Page 3 All other trademarks referenced herein are the property of their respective owners. The GPG fingerprint of the security@redhat.com key is: CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E...
  • Page 4 Global File System...
  • Page 5: Table Of Contents

    Introduction ......................vii 1. Audience ...................... vii 2. Related Documentation ................. vii 3. Document Conventions ................viii 4. Send in Your Feedback .................. ix 5. Recommended References ................x 1. GFS Overview ....................... 1 1. New and Changed Features ................1 2.
  • Page 6 Global File System 9.2. Tune GFS Quantum ..............36 atime 10. Suspending Activity on a File System ............37 11. Displaying Extended GFS Information and Statistics ........38 12. Repairing a File System ................39 13. Context-Dependent Path Names ..............41 A. Upgrading GFS ....................45 Index ........................49...
  • Page 7: Introduction

    Configuring and Managing a Red Hat Cluster. HTML and PDF versions of all the official Red Hat Enterprise Linux manuals and release notes are available online at http://www.redhat.com/docs/. 1. Audience This book is intended primarily for Linux system administrators who are familiar with the following activities: •...
  • Page 8: Document Conventions

    Red Hat Cluster Suite documentation and other Red Hat documents are available in HTML and PDF versions online at the following location: http://www.redhat.com/docs 3. Document Conventions Certain words in this manual are represented in different fonts, styles, and weights. This highlighting indicates that the word is part of a specific category.
  • Page 9: Send In Your Feedback

    Send in Your Feedback /bin/ bold font Bold font represents application programs and text found on a graphical interface. When shown like this: OK , it indicates a button on a graphical application interface. Additionally, the manual uses different strategies to draw your attention to pieces of information. In order of how critical the information is to you, these items are marked as follows: Note A note is typically information that you need to understand the behavior of the...
  • Page 10: Recommended References

    Introduction have thought of a way to make this manual better, we would love to hear from you! Please submit a report in Bugzilla (http://www.redhat.com/bugzilla) against the component rh-gfsg. Be sure to mention the manual's identifier: rh-gfsg If you mention this manual's identifier, we will know exactly which version of the guide you have.
  • Page 11: Recommended References Table

    Recommended References Table 1. Recommended References Table...
  • Page 13: Gfs Overview

    Chapter 1. GFS Overview Red Hat GFS is a cluster file system that is available with Red Hat Cluster Suite. Red Hat GFS nodes are configured and managed with Red Hat Cluster Suite configuration and management tools. Red Hat GFS provides data sharing among GFS nodes in a Red Hat cluster. GFS provides a single, consistent view of the file-system name space across the GFS nodes in a Red Hat cluster.
  • Page 14: Performance, Scalability, And Economy

    Chapter 1. GFS Overview “Related Documentation”. 2. Performance, Scalability, and Economy You can deploy GFS in a variety of configurations to suit your needs for performance, scalability, and economy. For superior performance and scalability, you can deploy GFS in a cluster that is connected directly to a SAN.
  • Page 15: Performance, Scalability, Moderate Price

    Performance, Scalability, Moderate Price Figure 1.1. GFS with a SAN 2.2. Performance, Scalability, Moderate Price Multiple Linux client applications on a LAN can share the same SAN-based data as shown in Figure 1.2, “GFS and GNBD with a SAN”. SAN block storage is presented to network clients as block storage devices by GNBD servers.
  • Page 16: Economy And Performance

    Chapter 1. GFS Overview Figure 1.2. GFS and GNBD with a SAN 2.3. Economy and Performance Figure 1.3, “GFS and GNBD with Directly Connected Storage” shows how Linux client applications can take advantage of an existing Ethernet topology to gain shared access to all block storage devices.
  • Page 17: Gfs Functions

    GFS Functions Figure 1.3. GFS and GNBD with Directly Connected Storage 3. GFS Functions GFS is a native file system that interfaces directly with the VFS layer of the Linux kernel file-system interface. GFS is a cluster file system that employs distributed metadata and multiple journals for optimal operation in a cluster.
  • Page 18: Gfs Software Subsystems

    Chapter 1. GFS Overview • Making a File System • Mounting a File System • Unmounting a File System • GFS Quota Management • Growing a File System • Adding Journals to a File System • Direct I/O • Data Journaling •...
  • Page 19: Before Setting Up Gfs

    Before Setting Up GFS Software Subsystem Components Description file system. Implements a pluggable lock module lock_harness.ko interface for GFS that allows for a variety of locking mechanisms to be used (for example, the DLM lock module, lock_dlm.ko A lock module that implements DLM lock_dlm.ko locking for GFS.
  • Page 20 Chapter 1. GFS Overview GFS nodes Determine which nodes in the Red Hat Cluster Suite will mount the GFS file systems. GNBD server nodes If you are using GNBD, determine how many GNBD server nodes are needed. Note the hostname and IP address of each GNBD server node for setting up GNBD clients later. For information on using GNBD with GFS, see the Using GNBD with Global File System document.
  • Page 21: System Requirements

    Chapter 2. System Requirements This chapter describes the system requirements for Red Hat GFS with Red Hat Enterprise Linux 5 and consists of the following sections: • Section 1, “Platform Requirements” • Section 2, “Red Hat Cluster Suite” • Section 3, “Fencing” •...
  • Page 22: Fibre Channel Storage Network

    Chapter 2. System Requirements You must configure each GFS node in your Red Hat cluster for at least one form of fencing. Fencing is configured and managed in Red Hat Cluster Suite. For more information about fencing options, refer to Configuring and Managing a Red Hat Cluster. 4.
  • Page 23: Network Power Switches

    Network Power Switches Requirement Description When determining the size of your file system, you should consider your recovery needs. Running the fsck command on the file system can take a long time and consume a large amount of memory. Additionally, in the event of a disk or disk-subsytem failure, recovery time is limited by the speed of your backup media.
  • Page 25: Getting Started

    Chapter 3. Getting Started This chapter describes procedures for initial setup of GFS and contains the following sections: • Section 1, “Prerequisite Tasks” • Section 2, “Initial Setup Tasks” 1. Prerequisite Tasks Before setting up Red Hat GFS, make sure that you have noted the key characteristics of the GFS nodes (refer to Section 5, “Before Setting Up GFS”) and have loaded the GFS modules...
  • Page 26 Chapter 3. Getting Started Note You can use scripts included with Red Hat Cluster Suite to automate init.d activating and deactivating logical volumes. For more information about init.d scripts, refer to Configuring and Managing a Red Hat Cluster. 2. Create GFS file systems on logical volumes created in Step 1. Choose a unique name for each file system.
  • Page 27: Managing Gfs

    Chapter 4. Managing GFS This chapter describes the tasks and commands for managing GFS and consists of the following sections: • Section 1, “Making a File System” • Section 2, “Mounting a File System” • Section 3, “Unmounting a File System” •...
  • Page 28 Chapter 4. Managing GFS Warning Make sure that you are very familiar with using the LockProtoName parameters. Improper use of the LockTableName LockProtoName parameters may cause file system or lock space corruption. LockTableName LockProtoName Specifies the name of the locking protocol (for example, ) to use.
  • Page 29 Complete Options Complete Options Table 4.1, “Command Options: ” describes the command options (flags and gfs_mkfs gfs_mkfs parameters). Flag Parameter Description Sets the file-system block size to BlockSize BlockSize Default block size is 4096 bytes. Enables debugging output. Help. Displays available options. Specifies the size of the journal in megabytes.
  • Page 30: Mounting A File System

    Chapter 4. Managing GFS Flag Parameter Description management GUI. , the file-system name, can be 1 to 16 FSName characters in length, and the name must be unique among all file systems in the cluster. Displays command version information. Table 4.1. Command Options: gfs_mkfs 2.
  • Page 31: Mount Options

    Complete Usage In this example, the GFS file system on is mounted on the directory. /dev/vg01/lvol0 /gfs1 mount -t gfs /dev/vg01/lvol0 /gfs1 Complete Usage mount -t gfs BlockDevice MountPoint -o option argument consists of GFS-specific options (refer to Table 4.2, “GFS-Specific -o option Mount Options”) or acceptable standard Linux...
  • Page 32: Unmounting A File System

    Chapter 4. Managing GFS Option Description GFS can then turn on selected optimization localcaching capabilities that are not available when running in Caution: This option should not be used cluster mode. The flag is localcaching when GFS file systems are shared. automatically turned on by lock_nolock Tells GFS to let the VFS (virtual file system) layer...
  • Page 33: Gfs Quota Management

    Usage Note command is a Linux system command. Information about this umount command can be found in the Linux command man pages. umount Usage umount MountPoint MountPoint Specifies the directory where the GFS file system should be mounted. 4. GFS Quota Management File-system quotas are used to limit the amount of file-system space a user or group can use.
  • Page 34 Chapter 4. Managing GFS Usage Setting Quotas, Hard Limit gfs_quota limit -u User -l Size -f MountPoint gfs_quota limit -g Group -l Size -f MountPoint Setting Quotas, 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.
  • Page 35: Displaying Quota Limits And Usage

    Displaying Quota Limits and Usage gfs_quota warn -g 21 -l 50 -k -f /gfs 4.2. Displaying Quota Limits and Usage Quota limits and current usage can be displayed for a specific user or group using the command. The entire contents of the quota file can also be displayed using the gfs_quota get command, in which case all IDs with a non-zero hard limit, warn limit, or value gfs_quota list...
  • Page 36: Synchronizing Quotas

    Chapter 4. Managing GFS group Group: limit:LimitSize warn:WarnSize value:Value , and numbers (values) are in units of megabytes by default. LimitSize WarnSize Value Adding the , or flags to the command line change the units to kilobytes, sectors, or file-system blocks, respectively. User A user name or ID to which the data is associated.
  • Page 37 Synchronizing Quotas This is necessary to avoid contention among nodes writing to the quota file, which would cause a slowdown in performance. As a user or group approaches their quota limit, GFS dynamically reduces the time between its quota-file updates to prevent the limit from being exceeded. The normal time period between quota synchronizations is a tunable parameter, , and can be changed using the quota_quantum...
  • Page 38: Disabling/Enabling Quota Enforcement

    Chapter 4. Managing GFS (3600 seconds) for file system on a single node. /gfs gfs_tool settune /gfs quota_quantum 3600 4.4. Disabling/Enabling Quota Enforcement Enforcement of quotas can be disabled for a file system without clearing the limits set for all users and groups.
  • Page 39: Disabling/Enabling Quota Accounting

    Disabling/Enabling Quota Accounting 4.5. Disabling/Enabling Quota Accounting By default, quota accounting is enabled; therefore, GFS keeps track of disk usage for every user and group even when no quota limits have been set. Quota accounting incurs unnecessary overhead if quotas are not used. You can disable quota accounting completely by setting the tunable parameter to 0.
  • Page 40: Growing A File System

    Chapter 4. Managing GFS This example enables quota accounting on file system on a single node and initializes the /gfs quota file. # gfs_tool settune /gfs quota_account 1 # gfs_quota init -f /gfs 5. Growing a File System command is used to expand a GFS file system after the device where the file gfs_grow system resides has been expanded.
  • Page 41: Adding Journals To A File System

    Examples After running the command, run a command to check that the new space is now gfs_grow available in the file system. Examples In this example, the file system on the directory is expanded. /gfs1 gfs_grow /gfs1 In this example, the state of the mounted file system is checked. gfs_grow -Tv /gfs1 Complete Usage gfs_grow [Options] {MountPoint | Device} [MountPoint | Device]...
  • Page 42 Chapter 4. Managing GFS command is used to add journals to a GFS file system after the device where the gfs_jadd file system resides has been expanded. Running a command on a GFS file system gfs_jadd uses space between the current end of the file system and the end of the device where the file system resides.
  • Page 43 Complete Usage In this example, two journals are added to the file system on the directory. /gfs1 gfs_jadd -j2 /gfs1 In this example, the current state of the file system on the directory is checked for the /gfs1 new journals. gfs_jadd -Tv /gfs1 Complete Usage gfs_jadd [Options] {MountPoint | Device} [MountPoint | Device]...
  • Page 44: Direct I/O

    Chapter 4. Managing GFS Flag Parameter Description verbosity level to display more information. Quiet. Turns down the verbosity level. Displays command version information. Turns up the verbosity of messages. Table 4.4. GFS-specific Options Available When Adding Journals 7. 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, bypassing the operating system read and write caches.
  • Page 45: Gfs Directory Attribute

    GFS Directory Attribute Setting the Flag directio gfs_tool setflag directio File Clearing the Flag directio gfs_tool clearflag directio File File Specifies the file where the flag is assigned. directio Example In this example, the command sets the flag on the file named in directory directio datafile...
  • Page 46: Data Journaling

    Chapter 4. Managing GFS Directory Specifies the directory where the flag is set. inherit_directio Example In this example, the command sets the flag on the directory named inherit_directio /gfs1/data/ gfs_tool setflag inherit_directio /gfs1/data/ 8. Data Journaling Ordinarily, GFS writes only metadata to its journal. File contents are subsequently written to disk by the kernel's periodic sync that flushes file-system buffers.
  • Page 47: Configuring Atime Updates

    Examples Directory Specifies the directory where the flag is set or cleared. File Specifies the zero-length file where the flag is set or cleared. Examples This example shows setting the flag on a directory. All files created in the inherit_jdata directory or any of its subdirectories will have the flag assigned automatically.
  • Page 48: Tune Gfs Quantum

    Chapter 4. Managing GFS 9.1. Mount with noatime A standard Linux mount option, , can be specified when the file system is mounted, noatime which disables updates on that file system. atime Usage mount -t gfs BlockDevice MountPoint -o noatime BlockDevice Specifies the block device where the GFS file system resides.
  • Page 49: Suspending Activity On A File System

    Suspending Activity on a File System gfs_tool gettune MountPoint MountPoint Specifies the directory where the GFS file system is mounted. Changing the Parameter Value atime_quantum gfs_tool settune MountPoint atime_quantum Seconds MountPoint Specifies the directory where the GFS file system is mounted. Seconds Specifies the update period in seconds.
  • Page 50: Displaying Extended Gfs Information And Statistics

    Chapter 4. Managing GFS gfs_tool freeze MountPoint End Suspension gfs_tool unfreeze MountPoint MountPoint Specifies the file system. Examples This example suspends writes to file system /gfs gfs_tool freeze /gfs This example ends suspension of writes to file system /gfs gfs_tool unfreeze /gfs 11.
  • Page 51: Repairing A File System

    Examples flag displays a space-usage summary of a given file system. The information is more detailed than a standard Displaying Extended Status gfs_tool stat File flag displays extended status information about a file. stat MountPoint Specifies the file system to which the action applies. File Specifies the file from which to get information.
  • Page 52 Chapter 4. Managing GFS command has changed from previous releases of Red Hat GFS in gfs_fsck the following ways: • You can no longer set the interactive mode with Ctrl-C. Pressing Ctrl-C now cancels the command. Do not press Ctrl-C unless you want to gfs_fsck cancel the command.
  • Page 53: Context-Dependent Path Names

    Usage 13. Context-Dependent Path Names Context-Dependent Path Names (CDPNs) allow symbolic links to be created that point to variable destination files or directories. The variables are resolved to real files or directories each time an application follows the link. The resolved value of the link depends on the node or user following the link.
  • Page 54 Chapter 4. Managing GFS Variable Description This variable resolves to a real file or directory name with the @mach machine-type string produced by the output of the following command: echo `uname -m` This variable resolves to a real file or directory named with the operating-system name string produced by the output of the following command: echo `uname -s`...
  • Page 55 Example fileC...
  • Page 57: Upgrading Gfs

    Appendix A. Upgrading GFS To upgrade a node to Red Hat GFS 6.1 from earlier versions of Red Hat GFS, you must convert the GFS cluster configuration archive (CCA) to a Red Hat Cluster Suite cluster configuration system (CCS) configuration file ( ) and convert GFS volumes /etc/cluster/cluster.conf...
  • Page 58 Appendix A. Upgrading GFS # service pool stop e. Uninstall Red Hat GFS RPMs. 2. Install new software: a. Install Red Hat Enterprise Linux version 4 software (or verify that it is installed). b. Install Red Hat Cluster Suite and Red Hat GFS RPMs. 3.
  • Page 59 GFS 6.1 nodes are pool using LVM2 for other purposes (root file system) there may be problems activating the volumes under GFS 6.1. That is because of static minor pool conflicts. Refer to the following Bugzilla report for more information: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=146035...
  • Page 61: Index

    Index data journaling, 34 direct I/O, 32 directory attribute, 33 file attribute, 32 O_DIRECT, 32 adding journals to a file system, 29 growing, 28 atime, configuring updates, 35 making, 15 mounting with noatime, 36 mounting, 18 tuning atime quantum, 36 quota management, 21 audience, vii disabling/enabling quota accounting, 27...
  • Page 62 Index gfs_mkfs command options table, 17 setting quotas, 21 GNBD with device-mapper multipath, 1 synchronizing quotas, 24 growing a file system, 28 recommended references table, x initial tasks Red Hat Cluster Suite setup, initial, 13 system requirements, 9 introduction, vii references, recommended, x audience, vii repairing a file system, 39...

Table of Contents