Global File System 2
Total Page:16
File Type:pdf, Size:1020Kb
Red Hat Enterprise Linux 7 Global File System 2 Red Hat Global File System 2 Steven Levine Red Hat Enterprise Linux 7 Global File System 2 Red Hat Global File System 2 Steven Levine Red Hat Customer Content Services [email protected] Legal Notice Copyright © 2016 Red Hat, Inc. and others. This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed. 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, OpenShift, 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. Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project. The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community. All other trademarks are the property of their respective owners. Abstract This book provides information about configuring and maintaining Red Hat GFS2 (Red Hat Global File System 2) for Red Hat Enterprise Linux 7. T able of Cont ent s Table of Contents .C .h .a .p . t.e .r . 1. .. G. .F .S .2 . .O . v. e. r.v .i e. w. 3. 1.1. New and Chang ed Features 4 1.2. Befo re Setting Up GFS2 4 1.3. Installing GFS2 5 1.4. Rep lacement Functio ns fo r g fs2_to o l in Red Hat Enterp rise Linux 7 6 .C .h .a .p . t.e .r . 2. .. G. .F .S .2 . .C .o .n . f.i g. u. .r a. t. i.o .n . a. n. .d . O. .p .e .r .a .t i.o . n. a. l. C. o. .n .s .i d. e. r. a. t.i o. .n .s . 9. 2.1. Fo rmatting Co nsid eratio ns 9 2.2. File System Frag mentatio n 11 2.3. Blo ck Allo catio n Issues 11 2.4. Cluster Co nsid eratio ns 12 2.5. Usag e Co nsid eratio ns 12 2.6 . File System Backup s 14 2.7. Hard ware Co nsid eratio ns 15 2.8 . Perfo rmance Issues: Check the Red Hat Custo mer Po rtal 15 2.9 . GFS2 No d e Lo cking 15 .C .h .a .p . t.e .r . 3. .. M. .a .n .a .g .i n. .g . G. .F .S .2 . 2. 1. 3.1. Making a File System 21 3.2. Mo unting a File System 24 3.3. Unmo unting a File System 27 3.4. Sp ecial Co nsid eratio ns when Mo unting GFS2 File Systems 28 3.5. GFS2 Quo ta Manag ement 28 3.6 . Gro wing a File System 33 3.7. Ad d ing Jo urnals to a File System 34 3.8 . Data Jo urnaling 36 3.9 . Co nfig uring atime Up d ates 37 3.10 . Susp end ing Activity o n a File System 38 3.11. Rep airing a File System 39 .C .h .a .p . t.e .r . 4. .. D. .i a. g. n. o. .s .i n. g. .a .n . d. .C .o . r.r e. c. t. i.n .g . .P .r o. .b .l e. m. .s . w. .i t.h . .G . F. S. 2. .F .i l.e . S. .y .s .t e. m. .s . 4. 2. 4.1. GFS2 File System Sho ws Slo w Perfo rmance 42 4.2. GFS2 File System Hang s and Req uires Reb o o t o f One No d e 42 4.3. GFS2 File System Hang s and Req uires Reb o o t o f All No d es 42 4.4. GFS2 File System Do es No t Mo unt o n Newly Ad d ed Cluster No d e 43 4.5. Sp ace Ind icated as Used in Emp ty File System 43 .C .h .a .p . t.e .r . 5. .. C. o. n. .f i.g .u . r.i n. g. a. .G . F. S. 2. .F .i l.e . S. .y .s .t e. m. i.n . .a . C. l.u .s .t .e .r . 4. 4. .A .p .p . e. n. d. i.x . A. .G . F. S. 2. .P . e. r.f o. .r m. .a .n .c .e . A. .n .a .l y. s. i.s . w. .i t.h . .P .e .r f. o. r.m . a. n. .c .e . C. o. -. P. i.l o. .t . 4. 6. A.1. Overview o f Perfo rmance Co -Pilo t 46 A.2. PCP Dep lo yment 46 A.3. PCP Installatio n 47 A.4. Tracing GFS2 Perfo rmance Data 48 A.5. Metric Co nfig uratio n (using p msto re) 49 A.6 . Lo g g ing Perfo rmance Data (using p mlo g g er) 50 A.7. Visual Tracing (using PCP-GUI and p mchart) 51 .A .p .p . e. n. d. i.x . B. .. .G . F. S. 2. T. r. a. c. e. p. o. i.n . t.s . a. n. .d . t. h. e. .d .e .b . u. g. f. s. .g .l o. c. k. s. .F .i l.e . 5. 3. B.1. GFS2 Tracep o int Typ es 53 B.2. Tracep o ints 53 B.3. Glo cks 54 B.4. The g lo ck d eb ug fs Interface 55 B.5. Glo ck Ho ld ers 57 1 Global File Syst em 2 B.5. Glo ck Ho ld ers 57 B.6 . Glo ck Tracep o ints 58 B.7. Bmap Tracep o ints 59 B.8 . Lo g tracep o ints 59 B.9 . Glo ck Statistics 59 B.10 . References 6 0 .A .p .p . e. n. d. i.x . C. .R .e .v .i s. i.o . n. .H . i.s .t o. .r y. 6. 1. .I n. d. e. x. 6. 1. 2 Chapt er 1 . GFS2 Overview Chapter 1. GFS2 Overview The Red Hat GFS2 file system is included in the Resilient Storage Add-On. It is a native file system that interfaces directly with the Linux kernel file system interface (VFS layer). When implemented as a cluster file system, GFS2 employs distributed metadata and multiple journals. Red Hat supports the use of GFS2 file systems only as implemented in the High Availability Add-On. Note Although a GFS2 file system can be implemented in a standalone system or as part of a cluster configuration, for the Red Hat Enterprise Linux 7 release Red Hat does not support the use of GFS2 as a single-node file system. Red Hat does support a number of high- performance single node file systems which are optimized for single node and thus have generally lower overhead than a cluster file system. Red Hat recommends using these file systems in preference to GFS2 in cases where only a single node needs to mount the file system. Red Hat will continue to support single-node GFS2 file systems for mounting snapshots of cluster file systems (for example, for backup purposes). Note Red Hat does not support using GFS2 for cluster file system deployments greater than 16 nodes. GFS2 is based on a 64-bit architecture, which can theoretically accommodate an 8 EB file system. However, the current supported maximum size of a GFS2 file system for 64-bit hardware is 100TB. The current supported maximum size of a GFS2 file system for 32-bit hardware is 16TB. If your system requires larger GFS2 file systems, contact your Red Hat service representative. When determining the size of your file system, you should consider your recovery needs. Running the fsck. g fs2 command.