1720c2fc1SMauro Carvalho Chehab.. SPDX-License-Identifier: GPL-2.0 2720c2fc1SMauro Carvalho Chehab 3*d9593868SAndrew Price==================== 4*d9593868SAndrew PriceGlobal File System 2 5*d9593868SAndrew Price==================== 6720c2fc1SMauro Carvalho Chehab 7*d9593868SAndrew PriceGFS2 is a cluster file system. It allows a cluster of computers to 8720c2fc1SMauro Carvalho Chehabsimultaneously use a block device that is shared between them (with FC, 9*d9593868SAndrew PriceiSCSI, NBD, etc). GFS2 reads and writes to the block device like a local 10720c2fc1SMauro Carvalho Chehabfile system, but also uses a lock module to allow the computers coordinate 11720c2fc1SMauro Carvalho Chehabtheir I/O so file system consistency is maintained. One of the nifty 12*d9593868SAndrew Pricefeatures of GFS2 is perfect consistency -- changes made to the file system 13720c2fc1SMauro Carvalho Chehabon one machine show up immediately on all other machines in the cluster. 14720c2fc1SMauro Carvalho Chehab 15*d9593868SAndrew PriceGFS2 uses interchangeable inter-node locking mechanisms, the currently 16720c2fc1SMauro Carvalho Chehabsupported mechanisms are: 17720c2fc1SMauro Carvalho Chehab 18720c2fc1SMauro Carvalho Chehab lock_nolock 19*d9593868SAndrew Price - allows GFS2 to be used as a local file system 20720c2fc1SMauro Carvalho Chehab 21720c2fc1SMauro Carvalho Chehab lock_dlm 22*d9593868SAndrew Price - uses the distributed lock manager (dlm) for inter-node locking. 23720c2fc1SMauro Carvalho Chehab The dlm is found at linux/fs/dlm/ 24720c2fc1SMauro Carvalho Chehab 25*d9593868SAndrew Pricelock_dlm depends on user space cluster management systems found 26720c2fc1SMauro Carvalho Chehabat the URL above. 27720c2fc1SMauro Carvalho Chehab 28*d9593868SAndrew PriceTo use GFS2 as a local file system, no external clustering systems are 29720c2fc1SMauro Carvalho Chehabneeded, simply:: 30720c2fc1SMauro Carvalho Chehab 31720c2fc1SMauro Carvalho Chehab $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device 32720c2fc1SMauro Carvalho Chehab $ mount -t gfs2 /dev/block_device /dir 33720c2fc1SMauro Carvalho Chehab 34*d9593868SAndrew PriceThe gfs2-utils package is required on all cluster nodes and, for lock_dlm, you 35*d9593868SAndrew Pricewill also need the dlm and corosync user space utilities configured as per the 36*d9593868SAndrew Pricedocumentation. 37*d9593868SAndrew Price 38*d9593868SAndrew Pricegfs2-utils can be found at https://pagure.io/gfs2-utils 39720c2fc1SMauro Carvalho Chehab 40720c2fc1SMauro Carvalho ChehabGFS2 is not on-disk compatible with previous versions of GFS, but it 41720c2fc1SMauro Carvalho Chehabis pretty close. 42720c2fc1SMauro Carvalho Chehab 43*d9593868SAndrew PriceThe following man pages are available from gfs2-utils: 44720c2fc1SMauro Carvalho Chehab 45720c2fc1SMauro Carvalho Chehab ============ ============================================= 46720c2fc1SMauro Carvalho Chehab fsck.gfs2 to repair a filesystem 47720c2fc1SMauro Carvalho Chehab gfs2_grow to expand a filesystem online 48720c2fc1SMauro Carvalho Chehab gfs2_jadd to add journals to a filesystem online 49720c2fc1SMauro Carvalho Chehab tunegfs2 to manipulate, examine and tune a filesystem 50*d9593868SAndrew Price gfs2_convert to convert a gfs filesystem to GFS2 in-place 51720c2fc1SMauro Carvalho Chehab mkfs.gfs2 to make a filesystem 52720c2fc1SMauro Carvalho Chehab ============ ============================================= 53