logo资料库

GFS2文件系统介绍.pdf

第1页 / 共46页
第2页 / 共46页
第3页 / 共46页
第4页 / 共46页
第5页 / 共46页
第6页 / 共46页
第7页 / 共46页
第8页 / 共46页
资料共46页,剩余部分请下载后查看
Global File System 2
Table of Contents
Introduction
1. Audience
2. Related Documentation
3. Feedback
4. Document Conventions
4.1. Typographic Conventions
4.2. Pull-quote Conventions
4.3. Notes and Warnings
Chapter 1. GFS2 Overview
1.1. Before Setting Up GFS2
1.2. Differences between GFS and GFS2
1.2.1. GFS2 Command Names
1.2.2. Additional Differences Between GFS and GFS2
1.2.3. GFS2 Performance Improvements
Chapter 2. Getting Started
2.1. Prerequisite Tasks
2.2. Initial Setup Tasks
Chapter 3. Managing GFS2
3.1. Making a File System
3.2. Mounting a File System
3.3. Unmounting a File System
3.4. GFS2 Quota Management
3.4.1. Setting Quotas
3.4.2. Displaying Quota Limits and Usage
3.4.3. Synchronizing Quotas
3.4.4. Enabling/Disabling Quota Enforcement
3.4.5. Enabling Quota Accounting
3.5. Growing a File System
3.6. Adding Journals to a File System
3.7. Data Journaling
3.7.1. Enabling and Disabling Data Journaling with the chattr Command
3.7.2. Enabling and Disabling Data Journaling with the gfs2_tool Command
3.8. Configuring atime Updates
3.8.1. Mount with relatime
3.8.2. Mount with noatime
3.9. Suspending Activity on a File System
3.10. Repairing a File System
3.11. Bind Mounts and Context-Dependent Path Names
Appendix A. Converting a File System from GFS to GFS2
Appendix B. Revision History
Index
Red Hat Enterprise Linux 5 Global File System 2 Red Hat Global File System 2
Global File System 2 Red Hat Enterprise Linux 5 Global File System 2 Red Hat Global File System 2 Edition 3 Copyright © 2009 Red Hat Inc.. This material may only be distributed subject to the terms and conditions set forth in the Open Publication License, V1.0 or later (the latest version of the OPL is presently available at http://www.opencontent.org/openpub/). Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat, Inc. in the United States and other countries. All other trademarks referenced herein 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 PO Box 13588 Research Triangle Park, NC 27709 USA This book provides information about installing, configuring, and maintaining Red Hat GFS2 (Red Hat Global File System 2) for Red Hat Enterprise Linux 5.
Introduction v 1. Audience ........................................................................................................................ v 2. Related Documentation ................................................................................................... v 3. Feedback ....................................................................................................................... vi 4. Document Conventions ................................................................................................... vi 4.1. Typographic Conventions ..................................................................................... vi 4.2. Pull-quote Conventions ....................................................................................... viii 4.3. Notes and Warnings ............................................................................................ ix 1. GFS2 Overview 1 1.1. Before Setting Up GFS2 ............................................................................................... 1 1.2. Differences between GFS and GFS2 ............................................................................. 2 1.2.1. GFS2 Command Names .................................................................................... 2 1.2.2. Additional Differences Between GFS and GFS2 .................................................. 3 1.2.3. GFS2 Performance Improvements ...................................................................... 4 2. Getting Started 7 2.1. Prerequisite Tasks ........................................................................................................ 7 2.2. Initial Setup Tasks ........................................................................................................ 7 3. Managing GFS2 9 3.1. Making a File System ................................................................................................... 9 3.2. Mounting a File System .............................................................................................. 12 3.3. Unmounting a File System .......................................................................................... 14 3.4. GFS2 Quota Management .......................................................................................... 15 3.4.1. Setting Quotas ................................................................................................ 15 3.4.2. Displaying Quota Limits and Usage .................................................................. 16 3.4.3. Synchronizing Quotas ...................................................................................... 18 3.4.4. Enabling/Disabling Quota Enforcement ............................................................. 19 3.4.5. Enabling Quota Accounting .............................................................................. 19 3.5. Growing a File System ............................................................................................... 20 3.6. Adding Journals to a File System ................................................................................ 21 3.7. Data Journaling .......................................................................................................... 23 3.7.1. Enabling and Disabling Data Journaling with the chattr Command ................... 23 3.7.2. Enabling and Disabling Data Journaling with the gfs2_tool Command .............. 24 3.8. Configuring atime Updates ........................................................................................ 25 3.8.1. Mount with relatime ..................................................................................... 25 3.8.2. Mount with noatime ....................................................................................... 26 3.9. Suspending Activity on a File System .......................................................................... 26 3.10. Repairing a File System ............................................................................................ 27 3.11. Bind Mounts and Context-Dependent Path Names ...................................................... 29 A. Converting a File System from GFS to GFS2 31 B. Revision History 33 Index 35 iii
iv
Introduction Welcome to the Global File System Configuration and Administration document. This book provides information about configuring and maintaining Red Hat GFS2 (Red Hat Global File System 2). Red Hat GFS2 can run in a single node or as part of a cluster configuration in Red Hat Cluster Suite in RHEL 5.3 and later. For information about Red Hat Cluster Suite see Red Hat Cluster Suite Overview and 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: • Linux system administration procedures, including kernel configuration • Installation and configuration of shared storage networks, such as Fibre Channel SANs 2. Related Documentation For more information about using Red Hat Enterprise Linux, refer to the following resources: • Red Hat Enterprise Linux Installation Guide — Provides information regarding installation of Red Hat Enterprise Linux. • Red Hat Enterprise Linux Deployment Guide — Provides information regarding the deployment, configuration and administration of Red Hat Enterprise Linux 5. For more information about Red Hat Cluster Suite, refer to the following resources: • Red Hat Cluster Suite Overview — Provides a high level overview of the Red Hat Cluster Suite. • Configuring and Managing a Red Hat Cluster — Provides information about installing, configuring and managing Red Hat Cluster components. • LVM Administrator's Guide: Configuration and Administration — Provides a description of the Logical Volume Manager (LVM), including information on running LVM in a clustered environment. • Global File System: Configuration and Administration — Provides information about installing, configuring, and maintaining Red Hat GFS (Red Hat Global File System). • Using Device-Mapper Multipath — Provides information about using the Device-Mapper Multipath feature of Red Hat Enterprise Linux. • 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). • Red Hat Cluster Suite Release Notes — Provides information about the current release of Red Hat Cluster Suite. v
Introduction 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. 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. Be sure to mention the manual's identifier: rh-gfs2(EN)-5 (2009-01-05T15:15) 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. 4. Document Conventions This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information. In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts1 set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default. 4.1. Typographic Conventions Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows. Mono-spaced Bold Used to highlight system input, including shell commands, file names and paths. Also used to highlight key caps and key-combinations. For example: To see the contents of the file my_next_bestselling_novel in your current working directory, enter the cat my_next_bestselling_novel command at the shell prompt and press Enter to execute the command. The above includes a file name, a shell command and a key cap, all presented in Mono-spaced Bold and all distinguishable thanks to context. Key-combinations can be distinguished from key caps by the hyphen connecting each part of a key- combination. For example: 1 https://fedorahosted.org/liberation-fonts/ vi
Typographic Conventions Press Enter to execute the command. Press Ctrl-Alt-F1 to switch to the first virtual terminal. Press Ctrl-Alt-F7 to return to your X-Windows session. The first sentence highlights the particular key cap to press. The second highlights two sets of three key caps, each set pressed simultaneously. If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in Mono-spaced Bold. For example: File-related classes include filesystem for file systems, file for files, and dir for directories. Each class has its own associated set of permissions. Proportional Bold This denotes words or phrases encountered on a system, including application names; dialogue box text; labelled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example: Choose System > Preferences > Mouse from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse 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). To insert a special character into a gedit file, choose Applications > Accessories > Character Map from the main menu bar. Next, choose Search > Find… from the Character Map menu bar, type the name of the character in the Search field and click Next. The character you sought will be highlighted in the Character Table. Double- click this highlighted character to place it in the Text to copy field and then click the Copy button. Now switch back to your document and choose Edit > Paste from the gedit menu bar. The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in Proportional Bold and all distinguishable by context. Note the > shorthand used to indicate traversal through a menu and its sub-menus. This is to avoid the difficult-to-follow 'Select Mouse from the Preferences sub-menu in the System menu of the main menu bar' approach. Mono-spaced Bold Italic or Proportional Bold Italic Whether Mono-spaced Bold or Proportional Bold, the addition of Italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example: To connect to a remote machine using ssh, type ssh username@domain.name at a shell prompt. If the remote machine is example.com and your username on that machine is john, type ssh john@example.com. The mount -o remount file-system command remounts the named file system. For example, to remount the /home file system, the command is mount -o remount /home. vii
Introduction To see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release. Note the words in bold italics above — username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system. Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example: When the Apache HTTP Server accepts requests, it dispatches child processes or threads to handle them. This group of child processes or threads is known as a server-pool. Under Apache HTTP Server 2.0, the responsibility for creating and maintaining these server-pools has been abstracted to a group of modules called Multi-Processing Modules (MPMs). Unlike other modules, only one module from the MPM group can be loaded by the Apache HTTP Server. 4.2. Pull-quote Conventions Two, commonly multi-line, data types are set off visually from the surrounding text. Output sent to a terminal is set in Mono-spaced Roman and presented thus: books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs Source-code listings are also set in Mono-spaced Roman but are presented and highlighted as follows: package org.jboss.book.jca.ex1; import javax.naming.InitialContext; public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create(); System.out.println("Created Echo"); System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } } viii
分享到:
收藏