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.
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.
| Command | Description |
|---|---|
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... DESTINATION | Create 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
| Command | Description |
|---|---|
setquota -u UID SOFT HARD SOFT-INODES HARD-INODES PATH | Set a per‑user quota |
setquota -g GID SOFT HARD SOFT-INODES HARD-INODES PATH | Set a per‑group quota |
repquota [-a] (-u UID | -g GID)... PATH | Report quota usage |
Space limits are in bytes; add -h to repquota for human‑readable units. See Quotas.
Administration commands
| Command | Description |
|---|---|
leil-admin list-chunkservers HOST PORT | List all chunkservers and their state |
leil-admin list-mounts HOST PORT | List currently connected clients |
leil-admin info HOST PORT | Show master information and statistics |
HOST PORT is the master and its client port (MATOCL, default 9421).
Client and daemon control
| Command | Description |
|---|---|
leil-mount -H HOST /mnt/point | Mount the filesystem (see Mount options) |
fusermount -u /mnt/point | Unmount (or umount /mnt/point as root) |
leil-master start|stop|restart|status | Control the master daemon |
leil-chunkserver start|stop|restart|status | Control the chunkserver daemon |
leil-metalogger start|stop|restart|status | Control the metalogger daemon |
leil-master -a | Reconstruct 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.