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