Global File System 2 or GFS2 is a shared disk file system for Linux computer clusters.
GFS2 allows all nodes to have direct concurrent access to the same shared block storage. GFS2 has no disconnected operating-mode, and no client or server roles. All nodes in a GFS2 cluster function as peers.
A GFS2 file system is intended to provide a feature set which is as close as possible to a local file system, while at the same time enforcing full cluster coherency between nodes. In a few cases, the Linux file system API does not allow the clustered nature of GFS2 to be totally transparent; for example, programs using Posix locks in GFS2 should avoid using the GETLK function since, in a clustered environment, the process ID may be for a different node in the cluster. In most cases however, the functionality of a GFS2 file system is identical to that of a local file system.
GFS2 supports up to 32 cluster nodes. Using GFS2 in a cluster requires hardware to allow access to the shared storage, and a lock manager to control access to the storage. GFS2 is based on a 64-bit architecture, which can theoretically accommodate an 8 EB file system.
GFS2 is a journaling filesystem and one journal is required for each node that will mount the filesystem. The one exception to that is spectator mounts which are equivalent to mounting a read-only block device and as such can neither recover a journal or write to the filesystem, so do not require a journal assigned to them.
GFS2 adds a number of new features which are not in GFS. These features include:
- The metadata filesystem.
- GFS2 specific trace points .
- The XFS-style quota interface.
- Caching ACLs.
- Supports the generation of “discard” requests for thin provisioning/SCSI TRIM requests.
- Supports I/O barriers (on by default, assuming underlying device supports it. Configurable from kernel 2.6.33 and up).
- FIEMAP ioctl (to query mappings of inodes on disk).
- Splice (system call) support.
mmap/splice support for journaled files (enabled by using the same on disk format as for regular - files).
- Far fewer tunables (making set-up less complicated).
- Ordered write mode (as per ext3, GFS only has writeback mode).
Website: github.com/torvalds/linux/tree/master/fs/gfs2
Support:
Developer: Red Hat
License: GNU General Public License v2.0
GFS2 is written in C. Learn C with our recommended free books and free tutorials.
Related Software
| Journaling File Systems | |
|---|---|
| ext4 | Evolved from ext3 adding many notable features including extents |
| XFS | Designed to maintain high performance with large files and file systems |
| Btrfs | Checksumming Copy on Write File system |
| F2FS | Flash file system initially developed by Samsung Electronics |
| OpenZFS | Advanced file system and volume manager originally developed for Solaris |
| GFS2 | Shared disk file system for Linux computer clusters |
| ext3 | Default file system for many popular Linux distributions |
| JFS | Journaled File System |
| UBIFS | File system for raw flash memory used through UBI volumes |
| OCFS2 | Extent-based cluster file system |
| Bcachefs | Advanced file system ejected from the mainline kernel |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

