Skip to main content
RunBook Academy

LinuxLIX · Shared Storage and ClustersClustered FS

Clustered filesystems concepts - POSIX over multiple hosts

Advanced⏱ ~10 mingfs2-utils

What you'll learn

  • Describe clustered filesystems
  • Distinguish GFS2, OCFS2, and CephFS
  • Recognise the use cases for each
  • Choose the right clustered filesystem

Prerequisites

Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09

Not yet marked complete on this device.

A clustered filesystem provides shared POSIX semantics over multiple hosts. Multiple nodes can read and write the same files with proper locking. This lesson covers the options.

What a clustered filesystem is

A regular filesystem (ext4, xfs) is local. A clustered filesystem (GFS2, OCFS2, CephFS) is shared:

  • Multiple nodes mount the same filesystem.
  • POSIX semantics (locking, permissions, mtime).
  • Distributed locking for consistency.
  • Survives individual node failures.

The cluster filesystem needs:

  • Shared storage (SAN, shared disks, or distributed storage).
  • Cluster membership (DLM, corosync, or custom).
  • Locking (distributed lock manager).

GFS2

GFS2 (Global File System 2) is Red Hat’s clustered filesystem:

  • Requires Red Hat Cluster Suite or compatible.
  • Shared storage required (typically SAN).
  • POSIX-compliant.
  • Online grow only, with gfs2_grow. GFS2 cannot be shrunk — there is no gfs2_shrink. Reclaiming space means building a smaller filesystem and migrating the data onto it.
  • One journal per mounting node, fixed at mkfs time (mkfs.gfs2 -j N). Adding a node later needs gfs2_jadd first, or the new node simply cannot mount.
  • Used with Pacemaker for cluster management.

For Red Hat shops, GFS2 is the standard.

OCFS2

OCFS2 (Oracle Cluster File System 2) is Oracle’s clustered filesystem:

  • Used in Oracle RAC and other Oracle clusters.
  • Shared storage required.
  • POSIX-compliant.
  • Simpler than GFS2 in some ways.

For Oracle shops, OCFS2 is the standard.

CephFS

CephFS is the distributed filesystem for Ceph:

  • Distributed metadata (MDS).
  • Distributed storage (OSD).
  • POSIX-compliant.
  • Scales to exabytes.
  • No single point of failure.

CephFS is the modern choice for new deployments. It provides POSIX over a distributed object store.

Use cases

Use caseClustered FS
Red Hat clusterGFS2
Oracle RACOCFS2
New distributed clusterCephFS
Web content (mostly read)NFS, no cluster FS needed
DatabaseNot a FS, use the database

Production considerations

  • Shared storage dependency: clustered filesystems require shared storage. The SAN or distributed storage is a single point of failure if not HA.
  • Network dependency: cluster locking requires low-latency network.
  • Locking contention: heavy concurrent writes can contend on locks.
  • Recovery: a node that drops out of the cluster may need to fence before rejoining.

Knowledge check

Knowledge check · 3 questions

  1. Q1. What is a clustered filesystem?

  2. Q2. CephFS is the modern choice for distributed POSIX storage.

  3. Q3. Which of the following are valid clustered filesystems? Select all that apply.

Passing score: 75%. Answers are checked in this browser.