background image

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”

Section 4, “GFS Quota Management”

Section 5, “Growing a File System”

Section 6, “Adding Journals to a File System”

Section 7, “Direct I/O”

Section 8, “Data Journaling”

Section 9, “Configuring

atime

Updates”

Section 10, “Suspending Activity on a File System”

Section 11, “Displaying Extended GFS Information and Statistics”

Section 12, “Repairing a File System”

Section 13, “Context-Dependent Path Names”

1. Making a File System

Once a cluster is set up and running, you can create a GFS file system with the

gfs_mkfs

command. A file system is created on an activated CLVM volume.The following information is

required to run the

gfs_mkfs

command:

• Lock protocol/module name (for example,

lock_dlm

)

• Cluster name

• Number of journals (one journal required for each node that may be mounting the file system)

Usage

gfs_mkfs -p LockProtoName -t LockTableName -j Number BlockDevice

Chapter 4.

15

Содержание GLOBAL FILE SYSTEM 4.6

Страница 1: ...Global File System 4 6 Red Hat Global File System ISBN N A Publication date...

Страница 2: ...This book provides information about installing configuring and maintaining Red Hat GFS Red Hat Global File System Global File System...

Страница 3: ...ited without the explicit permission of the copyright holder Distribution of the work or derivative of the work in any standard paper book form for commercial purposes is prohibited unless prior permi...

Страница 4: ...Global File System...

Страница 5: ...e Devices 10 6 Network Power Switches 11 7 Console Access 11 8 Installing GFS 11 3 Getting Started 13 1 Prerequisite Tasks 13 2 Initial Setup Tasks 13 4 Managing GFS 15 1 Making a File System 15 2 Mou...

Страница 6: ...ending 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 Global File Sy...

Страница 7: ...e 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 Introduction to Sy...

Страница 8: ...Provides information about the current release of Red Hat Cluster Suite Red Hat Cluster Suite documentation and other Red Hat documents are available in HTML and PDF versions online at the following l...

Страница 9: ...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 system Tip A tip is typically an altern...

Страница 10: ...s Shared Data Clusters by Dilip M Ranade Wiley 2002 Provides detailed technical information on cluster file system and cluster volume manager design Storage Area Networks SANs Designing Storage Area N...

Страница 11: ...Topic Reference Comment by E Marcus and H Stern Wiley 2000 Table 1 Recommended References Table Recommended References xi...

Страница 12: ...xii...

Страница 13: ...and economic needs of your storage environment This chapter provides some very basic abbreviated information as background to help you understand GFS It contains the following sections Section 1 Perfo...

Страница 14: ...pplication node has equal access to all data files GFS supports over 300 GFS nodes Figure 1 1 GFS with a SAN 1 2 Performance Scalability Moderate Price Multiple Linux client applications on a LAN can...

Страница 15: ...rformance 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 dev...

Страница 16: ...Volume management is managed through CLVM Cluster Logical Volume Manager For information about Red Hat Cluster Suite refer to Configuring and Managing a Red Hat Cluster For information about using CL...

Страница 17: ...ware subsystems and their components Software Subsystem Components Description GFS gfs ko Kernel module that implements the GFS file system and is loaded on GFS cluster nodes gfs_fsck Command that rep...

Страница 18: ...as a local file system only It plugs into the lock harness lock_harness ko and provides local locking Table 1 1 GFS Software Subsystem Components 4 Before Setting Up GFS Before you install and set up...

Страница 19: ...des 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 St...

Страница 20: ...8...

Страница 21: ...ts shows the platform requirements for GFS Operating System Hardware Architecture RAM Red Hat Enterprise Linux AS ES or WS Version 4 or later ia64 x86 64 x86 SMP supported 256 MB minimum Table 2 1 Pla...

Страница 22: ...ts Note When a small number of nodes is used it may be possible to connect the nodes directly to ports on the storage device Note FC drivers may not work reliably with FC hubs Table 2 2 Fibre Channel...

Страница 23: ...ake sure that you have console access to each GFS node Console access to each node ensures that you can monitor nodes and troubleshoot problems 8 Installing GFS Installing GFS consists of installing R...

Страница 24: ...12...

Страница 25: ...ed Hat Enterprise Linux distribution In addition if you are using GNBD multipath make sure that you understand GNBD multipath considerations For information on GNBD multipath see the document Using GN...

Страница 26: ...ls BlockDevice 3 At each node mount the GFS file systems For more information about mounting a GFS file system refer to Section 2 Mounting a File System Command usage mount t gfs BlockDevice MountPoin...

Страница 27: ...vity on a File System Section 11 Displaying Extended GFS Information and Statistics Section 12 Repairing a File System Section 13 Context Dependent Path Names 1 Making a File System Once a cluster is...

Страница 28: ...uster Number Specifies the number of journals to be created by the gfs_mkfs command One journal is required for each node that mounts the file system More journals than are needed can be specified at...

Страница 29: ...e Recognized cluster locking protocols include lock_dlm The standard locking module lock_gulm The locking module compatible with earlier versions of GFS lock_nolock May be used when GFS is acting as a...

Страница 30: ...Managing a Red Hat Cluster After those requirements have been met you can mount the GFS file system as you would any Linux file system To manipulate file ACLs you must mount the file system with the o...

Страница 31: ...ecific o option values that can be passed to GFS at mount time Option Description acl Allows manipulating file ACLs If a file system is mounted without the acl mount option users are allowed to view A...

Страница 32: ...table to use with the file system oopses_ok This option allows a GFS node to not panic when an oops occurs By default a GFS node panics when an oops occurs causing the file system used by that node to...

Страница 33: ...ing can allow users or groups to slightly exceed the set limit To minimize this GFS dynamically reduces the synchronization period as a hard quota limit is approached GFS uses its gfs_quota command to...

Страница 34: ...e either a group name from the group file or the GID number Size Specifies the new value to limit or warn By default the value is in units of megabytes The additional k s and b flags change the units...

Страница 35: ...playing 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 eithe...

Страница 36: ...IDs into names if the n option is added to the command line Space allocated to GFS s hidden files can be left out of displayed values for the root UID and GID by adding the d option to the command lin...

Страница 37: ...the gfs_quota sync command to synchronize the quota information from a node to the on disk quota file between the automatic updates performed by GFS Usage Synchronizing Quota Information gfs_quota syn...

Страница 38: ...ault Disabling is not persistent across unmounts 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...

Страница 39: ...er to 1 Usage fs_tool settune MountPoint quota_account 0 1 MountPoint Specifies the GFS file system to which the actions apply quota_account 0 1 0 disabled 1 enabled Comments To enable quota accountin...

Страница 40: ...as been added The gfs_grow command must be run on a mounted file system but only needs to be run on one node in a cluster All the other nodes sense that the expansion has occurred and automatically st...

Страница 41: ...em 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 expan...

Страница 42: ...with those flags displays the current state of the mounted GFS file system Usage gfs_jadd j Number MountPoint Number Specifies the number of new journals to be added MountPoint Specifies the director...

Страница 43: ...p Displays short usage message J MegaBytes Specifies the size of the new journals in megabytes Default journal size is 128 megabytes The minimum size is 32 megabytes To add journals of different sizes...

Страница 44: ...s used regardless of how the file is opened When a file is opened with O_DIRECT or when a GFS direct I O attribute is attached to a file all I O operations must be done in block size multiples of 512...

Страница 45: ...an be used to assign set a direct I O attribute flag inherit_directio to a GFS directory Enabling the inherit_directio flag on a directory causes all newly created regular files in that directory to a...

Страница 46: ...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 fsync to sync file data may see improved performance b...

Страница 47: ...atime Updates Each file inode and directory inode has three time stamps associated with it ctime The last time the inode status was changed mtime The last time the file or directory data was modified...

Страница 48: ...ed using the gfs_tool command Each GFS node updates the access time based on the difference between its system time and the time recorded in the inode It is required that system clocks of all GFS node...

Страница 49: ...on the mount point gfs1 are displayed gfs_tool gettune gfs1 In this example the atime update period is set to once a day 86 400 seconds for the GFS file system on mount point gfs1 gfs_tool settune gfs...

Страница 50: ...nformation and Statistics You can use the gfs_tool command to gather a variety of details about GFS This section describes typical use of the gfs_tool command for displaying statistics space usage and...

Страница 51: ...s_tool man page Examples 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 dataf...

Страница 52: ...rs no to any queries automatically The option provides a way of trying the command to reveal errors without actually allowing the gfs_fsck command to take effect Refer to the gfs_fsck man page gfs_fsc...

Страница 53: ...s a name to represent the real file or directory on the other end of the link For a Variable Symbolic Link ln s VariableLinkName Variable Specifies a special reserved name from a list of values refer...

Страница 54: ...g produced by the output of the following command echo id g Table 4 5 CDPN Variable Values Example In this example there are three nodes with hostnames n01 n02 and n03 Applications on each node uses d...

Страница 55: ...fileC Example 43...

Страница 56: ...44...

Страница 57: ...lock management to DLM lock management during the upgrade to Red Hat GFS 6 1 However after the upgrade to GFS 6 1 you can change lock managers The following procedure demonstrates upgrading to Red Hat...

Страница 58: ...onf 4 At all GFS 6 1 nodes start ccsd run the lock_gulmd c command and start clvmd as shown in the following example ccsd lock_gulmd c Warning You didn t specify a cluster name before use_ccs Letting...

Страница 59: ...rade option as shown in the following example mount t gfs o upgrade dev pool argus mnt gfs1 Note This step only needs to be done once on the first mount of the GFS file system Note If static minor num...

Страница 60: ...48...

Страница 61: ...t dependent path names CDPNs 41 data journaling 34 direct I O 32 directory attribute 33 file attribute 32 O_DIRECT 32 growing 28 making 15 mounting 18 quota management 21 disabling enabling quota acco...

Страница 62: ...laying quota limits 23 setting quotas 21 synchronizing quotas 24 R recommended references table x Red Hat Cluster Suite system requirements 9 references recommended x repairing a file system 39 S setu...

Отзывы: