Skip to main content
Version: 4.3.0

Service configuration

Here are some fundamental guidelines:

  • The SaunaFS Master server is ideally run on a separate machine with an SSD.
  • A Chunk server should have at least one dedicated disk.
  • Avoid installing a metalogger on the same machine as the master server. Metaloggers are optional. However, they can coexist with a chunk server.
  • Use shadow master servers to enhance data safety and allow for failover.

Before setting up SaunaFS, ensure each server has:

Operating Systems

For the purposes of this documentation, we will assume you are on a Debian-based system, and specifically Ubuntu. However, most of what applies here also applies to most Linux distributions. If not, please contact us (See Contacts), we are also working on documentation for other OS-es.

Clients can be POSIX operating systems and Windows 11.

File systems

  • For Metadata servers:
    • Use fast SSDs with a fast file system like XFS.
    • Along with HW RAID mirroring or better e.g. RAID 10, RAID 6 etc.
    • Avalible space for metadata should be minimum 2 x RAM planned RAM usage on Metadata server.
  • For Chunk servers: If using XFS, certain mount options like:
    • /dev/disk/by-id/ata-WDC_WUH721414ALE604_XXXXXX /mnt/sfschunkservers/data/ata-WDC_WUH721414ALE604_XXXXXX xfs rw,noexec,nofail,nodev,noatime,nodiratime,largeio,allocsize=16777216,inode64 0 0

Adjust the scheduler for your file systems based on your hardware and needs.

Master

The master server holds all critical file system information.

copy default configuration files:

cp -vi /usr/share/doc/saunafs-master/examples/* /etc/saunafs/

if this is a new installation create empty metadata by by copying /var/lib/saunafs/metadata.sfs.empty to /var/lib/saunafs/metadata.sfs

danger

This could be dangerous if it is NOT new/clean installation, since it is overriding potentially existing metadata.

cp -iva /var/lib/saunafs/metadata.sfs.empty /var/lib/saunafs/metadata.sfs

And now you can configure the sfsmaster.cfg file with details like:

  • server personality,
  • listening addresses (for other services to connect to), ports,
  • user/group,
  • metadata storage location,
  • access time recording
  • ...

For network permissions and access rights, use the sfsexports.cfg file.

Shadow master

The shadow master mirrors the master server's settings and keeps its meta database synchronized. Set the shadow master's personality and master host address in the sfsmaster.cfg file:

PERSONALITY = shadow
MASTER_HOST = <master ip>

Note that the files sfsexports.cfg, sfsgoals.cfg and sfstopology.cfg need to be the same as in the actual master at all times.

Start the service like you would start master. See man sfsmaster.cfg and man sfsexports.cfg for more info.

Chunkserver

file sfshdd.cfg. must include paths/mountpoints to the disks you want to use in your storage system.

The chunkserver will assume these directories are dedicated drives and will calculate the total space and usage from that.

By default, the master will try to balance chunks evenly between the chunkservers. If some of the chunkservers are doing other non-SaunaFS related IO-operations, you may wish set the ENABLE_LOAD_FACTOR option in sfschunkserver.cfg.

Metalogger

Metalogger helps keep a backup of the (shadow) master servers in case anything happens to them. Without this, if all master and shadow’s die, all data is lost.

These settings need to be set in the sfsmetalogger.cfg

MASTER_HOST=<master ip address/name>
MASTER_PORT=<master port>

Start the metalogger with systemctl:

systemctl enable --now saunafs-metalogger

See man sfsmetalogger[.cfg] for more details.