Red Hat GLOBAL FILE SYSTEM 5.1 Manual

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

Advertisement

Quick Links

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

Advertisement

Table of Contents
loading

Summary of Contents for Red Hat GLOBAL FILE SYSTEM 5.1

  • 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. Feedback ...................... ix 5. Recommended References ................x 1. GFS Overview ....................... 1 1. New and Changed Features ................1 2. Performance, Scalability, and Economy ............2 2.1.
  • 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 ..............40 Index ........................43...
  • 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, PDF, and RPM versions on the Red Hat Enterprise Linux Documentation CD and online at 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: Feedback

    4. Feedback If you spot a typo, or if you have thought of a way to make this manual better, we would love to hear from you. Please submit a report in Bugzilla (http://bugzilla.redhat.com/bugzilla/) against the component rh-cs...
  • Page 10: Recommended References

    Introduction rh-gfs(EN)-5.1 (2007-10-30T15:10) By mentioning this manual's identifier, we know exactly which version of the guide you have. If you have a suggestion for improving the documentation, try to be as specific as possible. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.
  • Page 11: 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 12: Performance, Scalability, And Economy

    Chapter 1. GFS Overview and reorganized. For information on the available documents, see Section 2, “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 13: 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 14: 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 15: 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 16: 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 17: 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 18 Chapter 1. GFS Overview 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. Storage devices and partitions Determine the storage devices and partitions to be used for creating logical volumes (via CLVM) in the file systems.
  • Page 19: 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 20: 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 21: 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 23: 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 24 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 25: 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 26 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 27 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 28: Mounting A File System

    Chapter 4. Managing GFS Flag Parameter Description 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. Mounting a File System Before you can mount a GFS file system, the file system must exist (refer to Section 1, “Making a File System”), the volume where the file system exists must be activated, and the supporting...
  • Page 29: Mount Options

    Complete Usage 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 options, or a combination of both. mount -o Multiple parameters are separated by a comma and no spaces.
  • Page 30: Unmounting A File System

    Chapter 4. Managing GFS Option Description specified, the locking protocol name is read from the file-system superblock. Allows the user to specify which locking table to locktable=LockTableName use with the file system. oopses_ok This option allows a GFS node to not panic when an oops occurs.
  • Page 31: Gfs Quota Management

    GFS Quota Management 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. A user or group does not have a quota limit until one is set. GFS keeps track of the space used by each user and group even when there are no limits in place.
  • Page 32: Displaying Quota Limits And Usage

    Chapter 4. Managing GFS 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. It can be either a user name from the password file or the UID number.
  • Page 33 Displaying Quota Limits and 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. It can be either a user name from the password file or the UID number.
  • Page 34: Synchronizing Quotas

    Chapter 4. Managing GFS A group name or ID to which the data is associated. LimitSize The hard limit set for the user or group. This value is zero if no limit has been set. Value The actual amount of disk space used by the user or group. Comments When displaying quota information, the command does not resolve UIDs and GIDs...
  • Page 35: Disabling/Enabling Quota Enforcement

    Disabling/Enabling Quota Enforcement Synchronizing Quota Information gfs_quota sync -f MountPoint MountPoint Specifies the GFS file system to which the actions apply. Tuning the Time Between Synchronizations gfs_tool settune MountPoint quota_quantum Seconds MountPoint Specifies the GFS file system to which the actions apply. Seconds Specifies the new time period between regular quota-file synchronizations by GFS.
  • Page 36: Disabling/Enabling Quota Accounting

    Chapter 4. Managing GFS Usage gfs_tool settune MountPoint quota_enforce {0|1} MountPoint Specifies the GFS file system to which the actions apply. quota_enforce {0|1} 0 = disabled 1 = enabled Comments A value of 0 disables enforcement. Enforcement can be enabled by running the command with a value of 1 (instead of 0) as the final command line parameter.
  • Page 37: Growing A File System

    Growing a File System MountPoint Specifies the GFS file system to which the actions apply. quota_account {0|1} 0 = disabled 1 = enabled Comments To enable quota accounting on a file system, the parameter must be set back quota_account to 1. Afterward, the GFS quota file must be initialized to account for all current disk usage for users and groups on the file system.
  • Page 38: Managing Gfs

    Chapter 4. Managing GFS storage space that has been added. command must be run on a mounted file system, but only needs to be run on gfs_grow one node in a cluster. All the other nodes sense that the expansion has occurred and automatically start using the new space.
  • Page 39: Adding Journals To A File System

    Adding Journals to a File System Complete Usage gfs_grow [Options] {MountPoint | Device} [MountPoint | Device] MountPoint Specifies the directory where the GFS file system is mounted. Device Specifies the device node of the file system. Table 4.3, “GFS-specific Options Available While Expanding A File System” describes the GFS-specific options that can be used while expanding a GFS file system.
  • Page 40 Chapter 4. Managing GFS Number Specifies the number of new journals to be added. MountPoint Specifies the directory where the GFS file system is mounted. Comments Before running the command: gfs_jadd • Back up important data on the file system. •...
  • Page 41: Direct I/O

    Direct I/O MountPoint Specifies the directory where the GFS file system is mounted. Device Specifies the device node of the file system. Table 4.4, “GFS-specific Options Available When Adding Journals” describes the GFS-specific options that can be used when adding journals to a GFS file system. Flag Parameter Description...
  • Page 42: O_Direct

    Chapter 4. Managing GFS When a file is opened with , or when a GFS direct I/O attribute is attached to a file, all O_DIRECT I/O operations must be done in block-size multiples of 512 bytes. The memory being read from or written to must also be 512-byte aligned.
  • Page 43: Gfs Directory Attribute

    GFS Directory Attribute gfs_tool setflag directio /gfs1/datafile 7.3. GFS Directory Attribute command can be used to assign (set) a direct I/O attribute flag, gfs_tool , to a GFS directory. Enabling the flag on a directory inherit_directio inherit_directio causes all newly created regular files in that directory to automatically inherit the flag.
  • Page 44 Chapter 4. Managing GFS data is written to the journal, which can be substantially faster than the time it takes to write the file data to the main file system. Applications that rely on to sync file data may see improved performance by using data fsync() journaling.
  • Page 45: Configuring Atime Updates

    Configuring Updates atime 9. Configuring Updates atime Each file inode and directory inode has three time stamps associated with it: • — The last time the inode status was changed ctime • — The last time the file (or directory) data was modified mtime •...
  • Page 46: Tune Gfs Quantum

    Chapter 4. Managing GFS directory with atime updates turned off. /gfs1 mount -t gfs /dev/vg01/lvol0 /gfs1 -o noatime 9.2. Tune GFS Quantum atime When updates are enabled, GFS (by default) only updates them once an hour. The time atime quantum is a tunable parameter that can be adjusted using the command.
  • Page 47: Suspending Activity On A File System

    Suspending Activity on a File System Examples In this example, all GFS tunable parameters for the file system on the mount point /gfs1 displayed. gfs_tool gettune /gfs1 In this example, the update period is set to once a day (86,400 seconds) for the GFS file atime system on mount point /gfs1...
  • Page 48: Displaying Extended Gfs Information And Statistics

    Chapter 4. Managing GFS gfs_tool unfreeze /gfs 11. Displaying Extended GFS Information and Statistics You can use the command to gather a variety of details about GFS. This section gfs_tool describes typical use of the command for displaying statistics, space usage, and gfs_tool extended status.
  • Page 49: Repairing A File System

    Repairing a File System This example reports extended file system usage about file system /gfs gfs_tool df /gfs This example reports extended file status about file /gfs/datafile gfs_tool stat /gfs/datafile 12. Repairing a File System When nodes fail with the file system mounted, file-system journaling allows fast recovery. However, if a storage device loses power or is physically disconnected, file-system corruption may occur.
  • Page 50: Context-Dependent Path Names

    Chapter 4. Managing GFS gfs_fsck -y BlockDevice flag causes all questions to be answered with . With the flag specified, the command does not prompt you for an answer before making changes. gfs_fsck BlockDevice Specifies the block device where the GFS file system resides. Example In this example, the GFS file system residing on block device is repaired.
  • Page 51 Example ln -s VariableLinkName Variable Specifies a special reserved name from a list of values (refer to Table 4.5, “CDPN Variable Values”) to represent one of multiple existing files or directories. This string is not the name of an actual file or directory itself. (The real files or directories must be created in a separate step using names that correlate with the type of variable used.) LinkName Specifies a name that will be seen and used by applications and will be followed to get to...
  • Page 52 Chapter 4. Managing GFS created with the name . Individual directories , and /gfs/n01/ /gfs/n02/ /gfs/n03/ created that will be the actual directories used when each node references /gfs/log/ n01# cd /gfs n01# mkdir n01 n02 n03 n01# ln -s @hostname log n01# ls -l /gfs lrwxrwxrwx 1 root root 9 Apr 25 14:04 log ->...
  • Page 53: Index

    context-dependent path names (CDPNs), Index data journaling, 33 direct I/O, 31 directory attribute, 33 file attribute, 32 adding journals to a file system, 29 O_DIRECT, 32 atime, configuring updates, 35 growing, 27 mounting with noatime, 35 making, 15 tuning atime quantum, 36 mounting, 18 audience, vii quota management, 21...
  • Page 54 Index systems table, 29 setting quotas, 21 gfs_mkfs command options table, 17 synchronizing quotas, 24 growing a file system, 27 GULM (Grand Unified Lock Manager), 1 recommended references table, x Red Hat Cluster Suite initial tasks system requirements, 9 setup, initial, 13 references, recommended, x introduction, vii repairing a file system, 39...

Table of Contents