Mauro Carvalho Chehab | 720c2fc | 2020-02-17 17:12:05 +0100 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 3 | ==================== |
| 4 | Global File System 2 |
| 5 | ==================== |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 6 | |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 7 | GFS2 is a cluster file system. It allows a cluster of computers to |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 8 | simultaneously use a block device that is shared between them (with FC, |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 9 | iSCSI, NBD, etc). GFS2 reads and writes to the block device like a local |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 10 | file system, but also uses a lock module to allow the computers coordinate |
| 11 | their I/O so file system consistency is maintained. One of the nifty |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 12 | features of GFS2 is perfect consistency -- changes made to the file system |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 13 | on one machine show up immediately on all other machines in the cluster. |
| 14 | |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 15 | GFS2 uses interchangeable inter-node locking mechanisms, the currently |
Steven Whitehouse | e9ccb73 | 2009-05-19 10:23:23 +0100 | [diff] [blame] | 16 | supported mechanisms are: |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 17 | |
Mauro Carvalho Chehab | 720c2fc | 2020-02-17 17:12:05 +0100 | [diff] [blame] | 18 | lock_nolock |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 19 | - allows GFS2 to be used as a local file system |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 20 | |
Mauro Carvalho Chehab | 720c2fc | 2020-02-17 17:12:05 +0100 | [diff] [blame] | 21 | lock_dlm |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 22 | - uses the distributed lock manager (dlm) for inter-node locking. |
Mauro Carvalho Chehab | 720c2fc | 2020-02-17 17:12:05 +0100 | [diff] [blame] | 23 | The dlm is found at linux/fs/dlm/ |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 24 | |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 25 | lock_dlm depends on user space cluster management systems found |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 26 | at the URL above. |
| 27 | |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 28 | To use GFS2 as a local file system, no external clustering systems are |
Mauro Carvalho Chehab | 720c2fc | 2020-02-17 17:12:05 +0100 | [diff] [blame] | 29 | needed, simply:: |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 30 | |
Steven Whitehouse | 2fcb4a1 | 2006-02-24 10:42:20 -0500 | [diff] [blame] | 31 | $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 32 | $ mount -t gfs2 /dev/block_device /dir |
| 33 | |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 34 | The gfs2-utils package is required on all cluster nodes and, for lock_dlm, you |
| 35 | will also need the dlm and corosync user space utilities configured as per the |
| 36 | documentation. |
| 37 | |
| 38 | gfs2-utils can be found at https://pagure.io/gfs2-utils |
Steven Whitehouse | e9ccb73 | 2009-05-19 10:23:23 +0100 | [diff] [blame] | 39 | |
| 40 | GFS2 is not on-disk compatible with previous versions of GFS, but it |
| 41 | is pretty close. |
David Teigland | e473142 | 2006-01-18 09:21:38 +0000 | [diff] [blame] | 42 | |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 43 | The following man pages are available from gfs2-utils: |
Mauro Carvalho Chehab | 720c2fc | 2020-02-17 17:12:05 +0100 | [diff] [blame] | 44 | |
| 45 | ============ ============================================= |
Andrea Gelmini | 4cb947b | 2010-03-25 11:04:49 +0100 | [diff] [blame] | 46 | fsck.gfs2 to repair a filesystem |
| 47 | gfs2_grow to expand a filesystem online |
| 48 | gfs2_jadd to add journals to a filesystem online |
Steven Whitehouse | 49f3078 | 2012-05-10 11:45:31 +0100 | [diff] [blame] | 49 | tunegfs2 to manipulate, examine and tune a filesystem |
Andrew Price | d959386 | 2020-11-04 16:29:15 +0000 | [diff] [blame] | 50 | gfs2_convert to convert a gfs filesystem to GFS2 in-place |
Andrea Gelmini | 4cb947b | 2010-03-25 11:04:49 +0100 | [diff] [blame] | 51 | mkfs.gfs2 to make a filesystem |
Mauro Carvalho Chehab | 720c2fc | 2020-02-17 17:12:05 +0100 | [diff] [blame] | 52 | ============ ============================================= |