LEIL-MOUNT(1)

๐Ÿ“ฆ version 5.12.0, in nixpkgs unstable

๐Ÿ’… leil-mount โ€” the leil-mount(1) glow-up

okay so bestie, buckle up โœจ this is the manual page for leil-mount, and by the end of it you're gonna be mounting Leil File System like it's nothing. no cap.


๐ŸŒธ NAME

leil-mount โ€” mount Leil File System ๐Ÿฆ‹


โœจ SYNOPSIS

leil-mount [HOST:[PORT]]:[PATH] [-d] [-f] [-s] [-m] [-n] [-p]
         [-H HOST] [-P PORT] [-S PATH] [-o opt[,opt]...]

leil-mount -h|--help

leil-mount -V|--version

like, pick your fighter ๐Ÿ’…


๐Ÿ’– DESCRIPTION

Mounts Leil File System. that's the whole vibe. let's get into it ๐ŸŽ€

๐ŸŒˆ General options

  • -h, --help โ€” shows you the help and dips out. your lil safety net ๐Ÿซถ
  • -V โ€” shows version info and exits. slay, now you know what you're running โœจ

๐Ÿ”ฅ FUSE options

  • -d, -o debug โ€” turns on debug mode. heads up: this implies -f ๐Ÿ‘‘
  • -f โ€” foreground operation. it stays right there with you, main character energy ๐Ÿ’…
  • -s โ€” disables multi-threaded operation. one thing at a time, and honestly? valid ๐Ÿ™ˆ

๐Ÿฆ‹ LeilFS options

  • -c CFGFILE, -o sfscfgfile=CFGFILE โ€” loads a file that has extra mount options in it. like a lil cheat sheet ๐Ÿ“‹
  • -m, --meta, -o sfsmeta โ€” mounts the SFSMETA companion filesystem instead of the primary LeilFS. this is the one that lets you poke at trashed and reserved files, iykyk ๐Ÿ’€ (See NOTES)
  • -n, --nostdopts โ€” skips the default mount options (-o allow_other,default_permissions). it's equivalent to -o nostdmountoptions โญ
  • --nonempty โ€” lets you mount over a non-empty file/dir. equivalent to -o nonempty ๐ŸŒธ
  • -p, -o askpassword โ€” prompts you for a password. it's the interactive version of -o sfspassword=PASS ๐Ÿ”
  • -H HOST, -o sfsmaster=HOST โ€” connects to the LeilFS master on HOST (default is sfsmaster) ๐Ÿงš
  • -P PORT, -o sfsport=PORT โ€” connects to the LeilFS master on PORT (default is 9421) ๐Ÿ”Œ
  • -B HOST, -o sfsbind=HOST โ€” the local address to use when connecting to the master, instead of the default one ๐Ÿ 
  • -S PATH, -o sfssubfolder=PATH โ€” mounts that specific LeilFS directory (default is /, aka the whole entire filesystem, no big deal) ๐Ÿ‘‘
  • -o enablefilelocks=[0,1] โ€” enables/disables global file locking (disabled by default) ๐Ÿ”’
  • -o sfspassword=PASSWORD โ€” authenticates to the LeilFS master with PASSWORD ๐Ÿคซ
  • -o sfsmd5pass=MD5 โ€” authenticates to the LeilFS master using a directly given MD5 (only if the sfspassword option isn't specified) ๐Ÿงฎ
  • -o tlsconfigfile=PATH โ€” path to the TLS configuration file for client-side TLS settings. (there is no default value.) ๐Ÿ›ก๏ธ
  • -o sfsdelayedinit โ€” the connection to the master happens in the background, so with this option the mount can run without a network. good for being run from fstab / init scripts etc. etc. ๐Ÿ˜ด
  • -o sfsacl โ€” enables ACL support (disabled by default) ๐Ÿ“
  • -o sfsaclcacheto=SEC โ€” sets the ACL cache timeout in seconds (default: 1.0) โฑ๏ธ
  • -o sfsaclcachesize=N โ€” sets the ACL cache size in number of entries (0: no cache; default: 1000) ๐Ÿ“ฆ
  • -o sfsrwlock=0|1 โ€” when set to 1, parallel reads from the same descriptor are performed (default: 1) ๐Ÿ“–
  • -o sfsmkdircopysgid=N โ€” whether the sgid bit should be copied during a mkdir operation (on Linux default: 1, otherwise: 0) ๐Ÿ—‚๏ธ
  • -o sfssugidclearmode=SMODE โ€” sets the sugid clear mode (see below) ๐Ÿงผ
  • -o sfsdebug โ€” prints some LeilFS-specific debugging info ๐Ÿ›
  • -o sfscachemode=CACHEMODE โ€” sets the cache mode (see DATA CACHE MODES; default is AUTO) ๐Ÿ—„๏ธ
  • -o sfsattrcacheto=SEC โ€” sets the attributes cache timeout in seconds (default: 1.0) ๐Ÿ•
  • -o sfsentrycacheto=SEC โ€” sets the file entry cache timeout in seconds (default: 0.0, i.e. no cache) ๐Ÿšซ
  • -o sfsdirentrycacheto=SEC โ€” sets the directory entry cache timeout in seconds (default: 1.0) ๐Ÿ“
  • -o sfswritecachesize=N โ€” specifies write cache size in MiB, in range 16..2048 (default: 128) โœ๏ธ
  • -o sfschunkserverwavewriteto=MSEC โ€” sets the timeout for executing each wave of a write operation, in milliseconds (default: 50) ๐ŸŒŠ
  • -o sfscacheperinodepercentage=N โ€” specifies what part of the write cache not occupied by other inodes a single inode can occupy, measured in %. e.g. when N=75 and inode X uses 10 MiB, and all other inodes use 20 MiB out of a 100 MiB cache, X can use 50 MiB more (since 75% of 80 MiB is 60 MiB). default: 100 ๐Ÿฐ
  • -o sfschunkserverreadto=MSEC โ€” sets the timeout for the whole communication with a chunkserver during a read operation, in milliseconds (default: 2000) ๐Ÿ“ก
  • -o sfschunkserverwriteto=MSEC โ€” sets the chunkserver response timeout during a write operation, in milliseconds (default: 5000) โณ
  • -o sfschunkserverrtt=MSEC โ€” sets the timeout after which a SYN packet is considered lost during the first retry of connecting a chunkserver (default: 200) ๐Ÿ“ถ
  • -o sfschunkserverconnectreadto=MSEC โ€” sets the timeout for connecting with chunkservers during a read operation, in milliseconds (default: 2000) ๐Ÿ”—
  • -o sfschunkserverwavereadto=MSEC โ€” sets the timeout for executing each wave of a read operation, in milliseconds (default: 500) ๐ŸŒŠ
  • -o sfschunkservertotalreadto=MSEC โ€” sets the timeout for the whole communication with chunkservers during a read operation, in milliseconds (default: 2000) ๐Ÿ•ฐ๏ธ
  • -o cacheexpirationtime=MSEC โ€” sets the timeout for read cache entries to be considered valid, in milliseconds. 0 disables the cache (default: 1000) โฒ๏ธ
  • -o readbuffersexpirationtime=MSEC โ€” sets the timeout for read cache buffers to expire. read buffers get recycled among read operations to save allocating and deallocating that memory. those buffers are held aside for this amount of milliseconds before being released (default: 1000) โ™ป๏ธ
  • -o readaheadmaxwindowsize=KB โ€” sets the max value of the readahead window per single descriptor, in kibibytes (default: 16384) ๐ŸชŸ
  • -o readcachemaxsizepercentage=P โ€” sets the percentage of system memory used for the max value of read cache size (default: 60%) ๐Ÿ’พ
  • -o readworkers=N โ€” defines the number of read workers (default: 30) ๐Ÿ‘ฏ
  • -o maxreadaheadrequests=N โ€” defines the number of readahead requests per inode (default: 2) ๐Ÿ”
  • -o sfsrlimitnofile=N โ€” tries to change the limit of simultaneously opened file descriptors on startup (default: 100000) ๐Ÿ“‚
  • -o sfsnice=LEVEL โ€” tries to change the nice level to the specified value on startup (default: -19) ๐Ÿ˜‡
  • -o sfswriteworkers=N โ€” defines the number of write workers (default: 10) โœ๏ธ
  • -o sfswritewindowsize=N โ€” defines the write window size (in blocks) for each chunk. can be updated via the tweaks hidden file (default: 15) ๐ŸชŸ
  • -o sfsmemlock โ€” tries to lock memory (must be enabled at build time) ๐Ÿ”
  • -o sfsdonotrememberpassword โ€” does not remember the password in memory. more secure, but when the session is lost then a new session is created without a password โš ๏ธ
  • -o sfsioretries=N โ€” specifies the number of retries before an I/O error is returned (default: 30) ๐Ÿ”
  • -o sfsreportreservedperiod=N โ€” specifies the interval for reporting reserved inodes, in seconds (default: 30) ๐Ÿ“Š
  • -o sfsiolimits=PATH โ€” specifies the local I/O limiting configuration file (default: no I/O limiting) ๐Ÿšฆ
  • -o symlinkcachetimeout=N โ€” sets the timeout value for symlink cache timeout in seconds. default value is 3600 ๐Ÿ”—
  • -o bandwidthoveruse=N โ€” defines the ratio of allowed bandwidth overuse when fetching data. default value is 1.0. this option is effective only with N+M goals (erasure codes) ๐ŸŽ๏ธ
  • -o nostdmountoptions โ€” equivalent to the --nostdopts (-n) option, for use in fstab ๐Ÿ“œ
  • -o nonempty โ€” equivalent to the --nonempty option, for use in fstab ๐Ÿ“œ
  • -o sfsmaxchunkswritteninparallelperinode=N โ€” defines the maximum number of chunks that can be written in parallel per inode. 0 stands for unlimited (default: 0) ๐Ÿงฑ
  • -o sfsusewriteflushpacket=0|1 โ€” when set to 1, suggests the chunkserver flush the packets received every window size blocks (option sfswritewindowsize) or when a write needs to finish (e.g. when flush() is called on the inode or when enough time has passed). can be updated via the tweaks hidden file (default: 0) ๐Ÿšฟ
  • -o sfsdirectio=0|1 โ€” whether to use FUSE DirectIO. this may improve performance when reading large files under certain conditions โšก
  • -o limitglibcmallocarenas=N โ€” Linux only: limit glibc malloc arenas to the given value, which prevents using a huge amount of virtual memory. this can influence performance by reducing memory fragmentation and improving cache locality, but it may also lead to contention and reduced parallelism in multi-threaded applications. use it in constrained memory environments; recommended values are 4 or 8. (default is 0: disabled or let glibc decide) ๐Ÿง 
  • -o malloctrimperiod=MSEC โ€” Linux only: call malloc_trim on a periodical basis, which prevents using a huge amount of virtual memory by returning already freed memory to the OS. this can influence performance by increasing memory fragmentation and worsening cache locality. use it in constrained memory environments; recommended values are 300 or 1000. minimum value is 100 to avoid excessive calls to malloc_trim. (default is 0: disabled periodic trimming) ๐Ÿงน
  • -o sfslognotificationarea=0|1 โ€” enable/disable logging to the Linux notification area (default: 0) ๐Ÿ””
  • -o sfsmessagesuppressionperiod=N โ€” sets the period of message suppression in seconds for logging on the notification area (default: 10) ๐Ÿคซ
  • -o statfscachetimeout=MSEC โ€” sets the statfs cache timeout in milliseconds. when equal to 0 the cache is disabled (default: 0) ๐Ÿ“ˆ
  • -o usequotainvolumesize=0|1 โ€” when set to 1, uses the user and group specific quota hard limit to calculate the volume size (default: 0) ๐Ÿ“
  • -o maxwaitretrytime=SECS โ€” sets the maximum wait time in seconds for retrying a master server communication attempt, in seconds (default: 10) โณ
  • -o mastercommsleeptimedivisor=N โ€” specifies the number of retry attempts between each increase of the master-communication sleep interval. the client starts with a 1 second pause and adds 1 second every N retries, up to the maxwaitretrytime limit. when reconnecting, the client makes up to sfsioretries attempts, applying the computed pause at each zero-based retry. for example, with mastercommsleeptimedivisor=2, maxwaitretrytime=3 and sfsioretries=10 the sleep intervals are: try 0 โ†’ 1 s, try 1 โ†’ 1 s, try 2 โ†’ 2 s, try 3 โ†’ 2 s, try 4 โ†’ 3 s, then 3 s for all subsequent retries until reaching the last retry counter index, which would be try 9 (default: 3) ๐Ÿ˜ด

๐ŸŽ€ General mount options (see mount(8) manual)

  • -o rw | -o ro โ€” mounts the file-system in read-write (default) or read-only mode respectively ๐Ÿ”
  • -o suid | -o nosuid โ€” enables or disables suid/sgid attributes to work ๐Ÿชช
  • -o dev | -o nodev โ€” enables or disables character or block special device files interpretation ๐Ÿ–ฅ๏ธ
  • -o exec | -o noexec โ€” allows or disallows execution of binaries ๐Ÿƒโ€โ™€๏ธ

โœจ DATA CACHE MODES โœจ

Okay so there are three cache modes, bestie: NO, YES and AUTO. The default option is AUTO, and ngl you should not change it unless you really, truly know what you're doing. Like, know it in your soul. ๐Ÿ˜ญ

๐Ÿšซ NO, NONE or NEVER

Never ever allow files data to be kept in cache. Safest vibes, but it can reduce efficiency โ€” it's giving "safe but slow" ๐Ÿ’…

โœ… YES or ALWAYS

Always allow files data to be kept in cache. And yes, this one is dangerous. Consider yourself warned, no cap. ๐Ÿ’€

๐Ÿฆ‹ AUTO

File cache is managed by leil-master automatically. This one should be very safe and efficient โ€” it's the main character for a reason ๐Ÿ‘‘


๐ŸŒธ SUGID CLEAR MODE ๐ŸŒธ

SMODE can be set to:

  • NEVER โ€” SFS will not change suid and sgid bit on chown
  • ALWAYS โ€” clear suid and sgid on every chown โ€” the safest operation ๐Ÿซถ
  • OSX โ€” standard behavior in OS X and Solaris (a chown made by an unprivileged user clears suid and sgid)
  • BSD โ€” standard behavior in BSD systems (like in OSX, but only when something is really changed)
  • EXT โ€” standard behavior in most file systems on Linux (directories not changed, others: suid cleared always, sgid only when group exec bit is set)
  • SFS โ€” standard behavior in SFS on Linux (like EXT but directories are changed by unprivileged users)

๐Ÿ’œ SMODE extra info:

btrfs, ext2, ext3, ext4, hfs[+], jfs, ntfs and reiserfs on Linux work as EXT.

Only sfs on Linux works a little different. And beware, bestie โ€” there's a strange operation, chown(-1,-1), which is usually converted by a kernel into something like chmod ug-s, and therefore can't be controlled by SFS as chown. Like, it just slips right past. ๐Ÿ™ˆ


๐ŸŽ€ FSTAB ๐ŸŽ€

You can define your /etc/fstab LeilFS share like this:

leil-master:/ /mnt/leil safs rw 0 0

Screenshot it, tattoo it, whatever works for you ๐Ÿ’–


๐Ÿฆ‹ REPORTING BUGS ๐Ÿฆ‹

Report bugs to the GitHub repository https://github.com/leil-io/leilfs as an issue. We literally read them, so don't be shy ๐Ÿซถ


โญ NOTES โญ

The metadata mount point has two directories available: trash and reserved.

In trash you can see files that have been deleted but are still being kept in master trash. You can undelete them by moving the files into trash/undel, and delete permanently by deleting them again.

There is a bug with this though. See BUGS for more details. ๐Ÿ‘€

๐Ÿ’€ BUGS ๐Ÿ’€

Due to a limit in the protocol, the metadata mount point can at most return the first 1 million trash/reserved files. To see more, you will need to either delete or undelete the existing files.

Older versions of master (4.9.0 or earlier) will crash when reading a lot of files in trash/reserved. After more than 1 million files in trash/reserved, it becomes unsafe to read trash on those versions. So likeโ€ฆ don't. ๐Ÿ˜ญ

This limit was fixed and removed in master and leil-mount version 5.3.0. Slay ๐Ÿ’…


Copyright 2008-2009 Gemius SA

Copyright 2013-2019 Skytechnology sp. z o.o.

Copyright 2023-2024 Leil Storage Oรœ

LeilFS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.

LeilFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with LeilFS. If not, see http://www.gnu.org/licenses/.


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

leil-master(8) leilfs(7), mount(8)


okay that's the whole page, you made it to the end, I'm so proud of you ๐Ÿฅน๐Ÿ’– this was LEIL-MOUNT(1), dated 1980-01-01 (yes really, iconic timestamp honestly ๐Ÿ‘‘). go forth and mount responsibly, bestie ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from