Red_Hat_Enterprise_Linux-6-Global_File_System_2-en-US.pdf

(506 KB) Pobierz
Red Hat Enterprise Linux 6
Global File System 2
Red Hat Global File System 2
817140575.015.png 817140575.016.png 817140575.017.png 817140575.018.png 817140575.001.png 817140575.002.png
Global File System 2
Red Hat Enterprise Linux 6 Global File System 2
Red Hat Global File System 2
Edition 7
Copyright © 2011 Red Hat, Inc. and others.
The 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 Torvalds 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
This book provides information about configuring and maintaining Red Hat GFS2 (Red Hat Global File
System 2) for Red Hat Enterprise Linux 6.
817140575.003.png 817140575.004.png 817140575.005.png
1. Audience ........................................................................................................................ v
2. Related Documentation ................................................................................................... v
3. We Need Feedback! ....................................................................................................... v
4. Document Conventions ................................................................................................... vi
4.1. Typographic Conventions ..................................................................................... vi
4.2. Pull-quote Conventions ........................................................................................ vii
4.3. Notes and Warnings ........................................................................................... viii
1.1. New and Changed Features ......................................................................................... 2
1.2. Before Setting Up GFS2 ............................................................................................... 3
1.3. Differences between GFS and GFS2 ............................................................................. 4
1.3.1. GFS2 Command Names .................................................................................... 4
1.3.2. Additional Differences Between GFS and GFS2 .................................................. 5
1.3.3. GFS2 Performance Improvements ...................................................................... 6
1.4. GFS2 Node Locking ..................................................................................................... 7
1.4.1. Performance Tuning With GFS2 ......................................................................... 8
2.1. Prerequisite Tasks ...................................................................................................... 13
2.2. Initial Setup Tasks ...................................................................................................... 13
2.3. Deploying a GFS2 Cluster .......................................................................................... 14
3.1. Making a File System ................................................................................................. 15
3.2. Mounting a File System .............................................................................................. 18
3.3. Unmounting a File System .......................................................................................... 22
3.4. Special Considerations when Mounting GFS2 File Systems .......................................... 22
3.5. GFS2 Quota Management .......................................................................................... 23
3.5.1. Configuring Disk Quotas .................................................................................. 23
3.5.2. Managing Disk Quotas ..................................................................................... 26
3.5.3. Keeping Quotas Accurate ................................................................................ 27
3.5.4. Synchronizing Quotas with the quotasync Command ....................................... 27
3.5.5. References ...................................................................................................... 28
3.6. Growing a File System ............................................................................................... 29
3.7. Adding Journals to a File System ................................................................................ 30
3.8. Data Journaling .......................................................................................................... 32
3.9. Configuring atime Updates ........................................................................................ 33
3.9.1. Mount with relatime ..................................................................................... 33
3.9.2. Mount with noatime ....................................................................................... 34
3.10. Suspending Activity on a File System ........................................................................ 34
3.11. Repairing a File System ............................................................................................ 35
3.12. Bind Mounts and Context-Dependent Path Names ..................................................... 37
3.13. Bind Mounts and File System Mount Order ................................................................ 38
3.14. The GFS2 Withdraw Function ................................................................................... 40
4.1. GFS2 File System Shows Slow Performance ............................................................... 43
4.2. Setting Up NFS Over GFS2 ........................................................................................ 43
4.3. GFS2 File System Hangs and Requires Reboot of One Node ....................................... 44
4.4. GFS2 File System Hangs and Requires Reboot of All Nodes ........................................ 44
iii
817140575.006.png 817140575.007.png 817140575.008.png
Global File System 2
4.6. Space Indicated as Used in Empty File System ........................................................... 45
A.1. Setting Quotas with the gfs2_quota command .......................................................... 47
A.3. Synchronizing Quotas with the gfs2_quota Command ............................................... 50
A.4. Enabling/Disabling Quota Enforcement ........................................................................ 51
A.5. Enabling Quota Accounting ........................................................................................ 51
C.1. GFS2 tracepoint Types .............................................................................................. 55
C.2. Tracepoints ................................................................................................................ 55
C.3. Glocks ....................................................................................................................... 56
C.4. The glock debugfs Interface ....................................................................................... 57
C.5. Glock Holders ............................................................................................................ 60
C.6. Glock tracepoints ....................................................................................................... 61
C.7. Bmap tracepoints ....................................................................................................... 61
C.8. Log tracepoints .......................................................................................................... 61
C.9. References ................................................................................................................ 62
iv
817140575.009.png 817140575.010.png 817140575.011.png
Introduction
This book provides information about configuring and maintaining Red Hat GFS2 (Red Hat Global File
System 2), which is included in the Resilient Storage Add-On.
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:
Installation Guide — Documents relevant information regarding the installation of Red Hat
Enterprise Linux 6.
Deployment Guide — Documents relevant information regarding the deployment, configuration and
administration of Red Hat Enterprise Linux 6.
Storage Administration Guide — Provides instructions on how to effectively manage storage devices
and file systems on Red Hat Enterprise Linux 6.
For more information about the High Availability Add-On and the Resilient Storage Add-On for Red
Hat Enterprise Linux 6, refer to the following resources:
High Availability Add-On Overview — Provides a high-level overview of the Red Hat High Availability
Add-On.
Cluster Administration — Provides information about installing, configuring and managing the High
Availability Add-On.
Logical Volume Manager Administration — Provides a description of the Logical Volume Manager
(LVM), including information on running LVM in a clustered environment.
DM Multipath — Provides information about using the Device-Mapper Multipath feature of Red Hat
Enterprise Linux.
Load Balancer Administration — Provides information on configuring high-performance systems and
services with the Load Balancer Add-On, a set of integrated software components that provide Linux
Virtual Servers (LVS) for balancing IP load across a set of real servers.
Release Notes — Provides information about the current release of Red Hat products.
High Availability Add-On 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://
3. We Need Feedback!
v
817140575.012.png 817140575.013.png 817140575.014.png
Zgłoś jeśli naruszono regulamin