1*620fc27eSBagas Sanjaya.. SPDX-License-Identifier: GPL-2.0 2*620fc27eSBagas Sanjaya 3*620fc27eSBagas Sanjaya==================== 4*620fc27eSBagas SanjayaGlobal File System 2 5*620fc27eSBagas Sanjaya==================== 6*620fc27eSBagas Sanjaya 7*620fc27eSBagas SanjayaOverview 8*620fc27eSBagas Sanjaya======== 9*620fc27eSBagas Sanjaya 10*620fc27eSBagas SanjayaGFS2 is a cluster file system. It allows a cluster of computers to 11*620fc27eSBagas Sanjayasimultaneously use a block device that is shared between them (with FC, 12*620fc27eSBagas SanjayaiSCSI, NBD, etc). GFS2 reads and writes to the block device like a local 13*620fc27eSBagas Sanjayafile system, but also uses a lock module to allow the computers coordinate 14*620fc27eSBagas Sanjayatheir I/O so file system consistency is maintained. One of the nifty 15*620fc27eSBagas Sanjayafeatures of GFS2 is perfect consistency -- changes made to the file system 16*620fc27eSBagas Sanjayaon one machine show up immediately on all other machines in the cluster. 17*620fc27eSBagas Sanjaya 18*620fc27eSBagas SanjayaGFS2 uses interchangeable inter-node locking mechanisms, the currently 19*620fc27eSBagas Sanjayasupported mechanisms are: 20*620fc27eSBagas Sanjaya 21*620fc27eSBagas Sanjaya lock_nolock 22*620fc27eSBagas Sanjaya - allows GFS2 to be used as a local file system 23*620fc27eSBagas Sanjaya 24*620fc27eSBagas Sanjaya lock_dlm 25*620fc27eSBagas Sanjaya - uses the distributed lock manager (dlm) for inter-node locking. 26*620fc27eSBagas Sanjaya The dlm is found at linux/fs/dlm/ 27*620fc27eSBagas Sanjaya 28*620fc27eSBagas Sanjayalock_dlm depends on user space cluster management systems found 29*620fc27eSBagas Sanjayaat the URL above. 30*620fc27eSBagas Sanjaya 31*620fc27eSBagas SanjayaTo use GFS2 as a local file system, no external clustering systems are 32*620fc27eSBagas Sanjayaneeded, simply:: 33*620fc27eSBagas Sanjaya 34*620fc27eSBagas Sanjaya $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device 35*620fc27eSBagas Sanjaya $ mount -t gfs2 /dev/block_device /dir 36*620fc27eSBagas Sanjaya 37*620fc27eSBagas SanjayaThe gfs2-utils package is required on all cluster nodes and, for lock_dlm, you 38*620fc27eSBagas Sanjayawill also need the dlm and corosync user space utilities configured as per the 39*620fc27eSBagas Sanjayadocumentation. 40*620fc27eSBagas Sanjaya 41*620fc27eSBagas Sanjayagfs2-utils can be found at https://pagure.io/gfs2-utils 42*620fc27eSBagas Sanjaya 43*620fc27eSBagas SanjayaGFS2 is not on-disk compatible with previous versions of GFS, but it 44*620fc27eSBagas Sanjayais pretty close. 45*620fc27eSBagas Sanjaya 46*620fc27eSBagas SanjayaThe following man pages are available from gfs2-utils: 47*620fc27eSBagas Sanjaya 48*620fc27eSBagas Sanjaya ============ ============================================= 49*620fc27eSBagas Sanjaya fsck.gfs2 to repair a filesystem 50*620fc27eSBagas Sanjaya gfs2_grow to expand a filesystem online 51*620fc27eSBagas Sanjaya gfs2_jadd to add journals to a filesystem online 52*620fc27eSBagas Sanjaya tunegfs2 to manipulate, examine and tune a filesystem 53*620fc27eSBagas Sanjaya gfs2_convert to convert a gfs filesystem to GFS2 in-place 54*620fc27eSBagas Sanjaya mkfs.gfs2 to make a filesystem 55*620fc27eSBagas Sanjaya ============ ============================================= 56*620fc27eSBagas Sanjaya 57*620fc27eSBagas SanjayaImplementation Notes 58*620fc27eSBagas Sanjaya==================== 59*620fc27eSBagas Sanjaya 60*620fc27eSBagas Sanjaya.. toctree:: 61*620fc27eSBagas Sanjaya :maxdepth: 1 62*620fc27eSBagas Sanjaya 63*620fc27eSBagas Sanjaya glocks 64*620fc27eSBagas Sanjaya uevents 65