ArticleslgStudy

computer science

GFS2

GFS2 is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand GFS2 rather than just read about it. In short: In computing, the Global File System 2 (GFS2) is a shared-disk file system for Linux computer clusters. GFS2 allows all members of a cluster to have direct concurrent access to the same shared block storage, in contrast to distributed file systems which distribute data throughout the cluster.

Key takeaways

  • GFS2 belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect GFS2 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of GFS2 from memory before moving on to harder problems.

Reference excerpt

In computing, the Global File System 2 (GFS2) is a shared-disk file system for Linux computer clusters. GFS2 allows all members of a cluster to have direct concurrent access to the same shared block storage, in contrast to distributed file systems which distribute data throughout the cluster. GFS2 can also be used as a local file system on a single computer. GFS2 has no disconnected operating-mode, and no client or server roles. All nodes in a GFS2 cluster function as peers. Using GFS2 in a cluster requires hardware to allow access to the shared storage, and a lock manager to control access to the storage. The lock manager operates as a separate module: thus GFS2 can use the distributed lock manager (DLM) for cluster configurations and the "nolock" lock manager for local filesystems. Older versions of GFS also support GULM, a server-based lock manager which implements redundancy via failover. GFS and GFS2 are free software, distributed under the terms of the GNU General Public License.

History Development of GFS began in 1995 and was originally developed by University of Minnesota professor Matthew O'Keefe and a group of students. It was originally written for SGI's IRIX operating system, but in 1998 it was ported to Linux (2.4) since the open source code provided a more convenient development platform. In late 1999/early 2000 it made its way to Sistina Software, where it lived for a time as an open-source project. In 2001, Sistina made the choice to make GFS a proprietary product. Developers forked OpenGFS from the last public release of GFS and then further enhanced it to include updates allowing it to work with OpenDLM. But OpenGFS and OpenDLM became defunct, since Red Hat purchased Sistina in December 2003 and released GFS and many cluster-infrastructure pieces under the GPL in late June 2004. Red Hat subsequently financed further development geared towards bug-fixing and stabilization. A further development, GFS2 derives from GFS and was included along with its distributed lock manager (shared with GFS) in Linux 2.6.19. Red Hat Enterprise Linux 5.2 included GFS2 as a kernel module for evaluation purposes. With the 5.3 update, GFS2 became part of the kernel package. GFS2 forms part of the Fedora, Red Hat Enterprise Linux and associated CentOS Linux distributions. Users can purchase commercial support to run GFS2 fully supported on top of Red Hat Enterprise Linux. As of Red Hat Enterprise Linux 8.3, GFS2 is supported in cloud computing environments in which shared storage devices are available. The following list summarizes some version numbers and major features introduced:

v1.0 (1996) SGI IRIX only v3.0 Linux port v4 journaling v5 Redundant lock manager v6.1 (2005) Distributed lock manager Linux 2.6.19[link removed] - GFS2 and DLM merged into Linux kernel[link removed] Red Hat Enterprise Linux 5.3 releases the first fully supported GFS2

Hardware The design of GFS and of GFS2 targets storage area network (SAN)-like environments. Although it is possible to use them as a single node filesystem, the full feature-set requires a SAN. This can take the form of iSCSI, Fibre Channel, ATA over Ethernet (AoE), or any other device which can be presented under Linux as a block device shared by a number of nodes, for example a DRBD device. The distributed lock manager (DLM) requires an IP based network over which to communicate. This is normally just Ethernet, but again, there are many other possible solutions. Depending upon the choice of SAN, it may be possible to combine this, but normal practice involves separate networks for the DLM and storage. The GFS requires a fencing mechanism of some kind. This is a requirement of the cluster infrastructure, rather than GFS/GFS2 itself, but it is required for all multi-node clusters. The usual options include power switches and remote access controllers (e.g. DRAC, IPMI, or ILO). Virtual and hypervisor-based fencing mechanisms can also be used. Fencing is used to ensure that a node which the cluster believes to be failed cannot suddenly start working again while another node is recovering the journal for the failed node. It can also optionally restart the failed node automatically once the recovery is complete.

Differences from a local filesystem Although the designers of GFS/GFS2 aimed to emulate a local filesystem closely, there are a number of differences to be aware of. Some of these are due to the existing filesystem interfaces not allowing the passing of information relating to the cluster. Some stem from the difficulty of implementing those features efficiently in a clustered manner. For example:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with GFS2

Start with the simplest possible case. Write down what GFS2 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to GFS2 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about GFS2 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of GFS2

In research
GFS2 appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses GFS2 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
GFS2 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Distributed file systems supported by the Linux kernel, Red Hat software, Shared disk file systems, so understanding it makes those chapters shorter.
In everyday life
Look for GFS2 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “GFS2” →

How to study GFS2 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what GFS2 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain GFS2 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is GFS2 in simple terms?

In computing, the Global File System 2 (GFS2) is a shared-disk file system for Linux computer clusters. GFS2 allows all members of a cluster to have direct concurrent access to the same shared block storage, in contrast to distributed file systems which distribute data throughout the cluster.

Why does GFS2 matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study GFS2?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on GFS2.

Tags

  • Distributed file systems supported by the Linux kernel
  • Red Hat software
  • Shared disk file systems
  • University of Minnesota software
  • Virtualization software for Linux

Keep exploring