Skip to main content
Version: 5.11.0

CLI reference

LeilFS is operated from any mounted client with a command‑line tool for per‑file and per‑directory operations, plus leil-admin for querying cluster state and the leil-* service binaries for daemon control.

note

leil vs saunafs. The per‑file tool is invoked as either leil <subcommand> or saunafs <subcommand> depending on your package version — both accept the same subcommands (this documentation set uses both forms in different sections during the rebrand transition). Cluster‑state queries use leil-admin. Confirm which name your install ships with man leil / man saunafs.


File and directory commands

Invoke as leil <subcommand> (or saunafs <subcommand>). Most accept -r for recursion and -n|-h|-H to control number formatting.

CommandDescription
getgoal [-r] OBJECT...Print the replication goal
setgoal [-r] NAME OBJECT...Set the replication goal
gettrashtime [-r] OBJECT...Show trash retention time (seconds)
settrashtime [-r] [+|-]SECONDS OBJECT...Set trash retention; 0 = delete immediately
geteattr [-r] OBJECT...List extended attributes
seteattr [-r] -f ATTR OBJECT...Set an extended attribute
deleattr [-r] -f ATTR OBJECT...Remove an extended attribute
checkfile FILE...Check chunk availability
fileinfo FILE...Show file/chunk details
dirinfo OBJECT...Show directory statistics
filerepair FILE...Repair a file with missing chunks
makesnapshot [-o] SOURCE... DESTINATIONCreate a copy‑on‑write snapshot (-o overwrites)
appendchunks SNAPSHOT_FILE OBJECT...Append chunks of objects to a snapshot file
rremove OBJECT...Recursively remove objects

See Snapshots, Trash policy, Extended attributes and Replication for usage.


Quota commands

CommandDescription
setquota -u UID SOFT HARD SOFT-INODES HARD-INODES PATHSet a per‑user quota
setquota -g GID SOFT HARD SOFT-INODES HARD-INODES PATHSet a per‑group quota
repquota [-a] (-u UID | -g GID)... PATHReport quota usage

Space limits are in bytes; add -h to repquota for human‑readable units. See Quotas.


Administration commands

CommandDescription
leil-admin list-chunkservers HOST PORTList all chunkservers and their state
leil-admin list-mounts HOST PORTList currently connected clients
leil-admin info HOST PORTShow master information and statistics

HOST PORT is the master and its client port (MATOCL, default 9421).


Client and daemon control

CommandDescription
leil-mount -H HOST /mnt/pointMount the filesystem (see Mount options)
fusermount -u /mnt/pointUnmount (or umount /mnt/point as root)
leil-master start|stop|restart|statusControl the master daemon
leil-chunkserver start|stop|restart|statusControl the chunkserver daemon
leil-metalogger start|stop|restart|statusControl the metalogger daemon
leil-master -aReconstruct metadata from the changelog (disaster recovery)

On package installs the daemons are also managed as systemd units (leil-master, leil-chunkserver, leil-metalogger) — see the quick reference.