Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,113 of 9,113 pages
About the help in other languages
All help pages

Shared storage and the DFS cluster

For infrastructure teams in public bodies that let several web servers share the uploaded files of an Exponential site. How the DFS cluster file handler works, what it needs (an NFS export and a metadata database), the…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/operations/availability/shared-storage-and-the-dfs-cluster.md

On this page

Shared storage and the DFS cluster

This page is for infrastructure and storage teams in public bodies who must make the uploaded files of an Exponential site available to more than one web server. It answers how the DFS cluster file handler works, what it needs from your storage and database teams, which commands maintain it, and which risks belong in the continuity plan. The complete setup is on the hosting page Clustering and shared storage.

Contents

  1. When you need it
  2. How the DFS cluster works
  3. What your teams provide
  4. Maintenance commands
  5. Risks for the continuity plan
  6. Checklist

When you need it

file.ini [ClusteringSettings] FileHandler decides how files of var/ are read and written. The shipped eZFSFileHandler uses plain files on the local disk and is right for one web server. eZDFSFileHandler is for several web servers serving one site. "A single server does not need a cluster file handler, whatever its size" (Clustering and shared storage).

How the DFS cluster works

  • The reference copy of every clustered file is on an NFS export, mounted at the same path on every web server.
  • Its metadata (name, size, modification time, expiry) is kept in a database table, ezdfsfile.
  • Cache files are copied to the local disk of the server that uses them.
  • Images and binary files are streamed from the mount by index_cluster.php.
  • The var directories are not shared; each server keeps its own and the handler keeps them in step.

The metadata database can be the site's database server or a separate one:

Backend ([eZDFSClusteringSettings] DBBackend)Comes from
eZDFSFileHandlerMySQLiBackendthe kernel (shipped default), MySQL and MariaDB
eZDFSFileHandlerPostgresqlBackendthe package ezpostgresqlcluster
eZDFSFileHandlerOracleBackendthe ezoracle extension

A site on SQLite cannot be the site database of a multi-server setup at all.

What your teams provide

TeamProvides
Storagean NFS export mounted at the same path on every web server, writable by the site's user, with its own redundancy and backups
Databasethe ezdfsfile table in a metadata database, backed up and monitored like the site's database
Web or platformcluster settings in the global settings/override/file.ini.append.php, the CLUSTER_* constants for index_cluster.php, rewrite rules for files
Securityconfig.cluster.php and the cluster settings hold database credentials; keep them out of version control and downloads

Cluster settings must be in the global override file, not in an extension or a siteaccess, because of the order in which settings are read.

Maintenance commands

CommandWhat it does
php bin/php/clusterize.phpmoves the files of var/ into the cluster (once, at setup); -u moves them back
php bin/php/dfscleanup.php -S and -Bchecks the mount against the table and the other way; -D deletes what does not exist
php bin/php/clusterpurge.phpshows the expired cluster files it would remove; with --apply removes them

Run dfscleanup.php with -S and -B first and read the result before you add -D. clusterpurge.php is also the cronjob part cluster_maintenance; the shipped settings keep it off the buttons of Setup > Cronjobs because it is destructive. Run it on a schedule from one server only.

Risks for the continuity plan

  • The mount. If the NFS mount goes away, every server fails to read files. Monitor the mount and the NFS server as part of the site.
  • The metadata database is on the path of every file read.
  • Consistency after an incident. Run dfscleanup.php -S and -B after an incident and before a migration.
  • Backups. Back up the NFS export and the metadata database together, in the same window as the site's database (What to back up).
  • Upgrades. Apply the dbupdate-cluster-... file of every upgrade step that has one (11 Upgrading).

Checklist

  • To do: One web server only: the cluster handler is not needed.
  • To do: Several: the NFS export is mounted at the same path everywhere and has its own redundancy.
  • To do: ezdfsfile exists in a metadata database that is backed up and monitored.
  • To do: Cluster settings are in the global override; credentials are not in version control.
  • To do: dfscleanup.php -S and -B report no differences after clusterize.php.
  • To do: clusterpurge.php runs from one server only.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x