Translators/storage
From GlusterDocumentation
These translators hookup to exported directory and give POSIX compliance to the filesystem.
Translator storage/posix
Server Translator
GlusterFS relies on filesystems (such as ext2, ext3, xfs, reiserfs, etc) to handle block device management. This POSIX translator binds the GlusterFS server to underlying file system.
volume posix1 type storage/posix option directory /home/export # Option has to be given. Valid directory path only # option o-direct enable # (default: disable) boolean type only # option export-statfs-size no # (default: yes) boolean type only # option mandate-attribute off # (default: on) boolean type only # option span-devices 8 # (default: 0) integer value # option background-unlink yes # (default: no) boolean type # option janitor-sleep-duration 300 # (default: 600) integer value end-volume
- o-direct
If one wants to disable the kernel's VFS caching and instead send every I/O request directly to disks, 'enable' this option.
- export-statfs-size
When more than one directory is exported from a single mountpoint in backend (i.e., there is another volume exporting directory from this mount point), it is possible that 'df' on the client shows more diskspace than that of it actually has. In that case, one can say 'no' for exporting statfs-size from redundant exports.
- mandate-attribute
By default GlusterFS does not start if the backend filesystem does not support extended attributes as it is required by many translators to function properly. If user is aware of these factors and even then wants to start glusterfs on a filesystem which doesn't support extended attribute, switch 'on' this option.
- span-devices
When there is a mountpoint inside exported directory, posix translator does not show those files on different mount by default (because the inode number space can collide). One has to provide 'span-devices' option to posix to get the things working in that case. Option is a number indicating how many different mountpoints inside can be exported through posix's export directory.
- background-unlink
It was observed that when a very big file (file size > 100GB) is getting unlinked and the backend storage is ext3 or some other journaling fs, glusterfs mountpoint becomes unusable till unlink() call is returned. This can be solved by enabling this option in posix layer. Advised to use it when the file sizes span several GBs.
- janitor-sleep-duration
The janitor thread deletes all files and directories in the "/" GF_REPLICATE_TRASH_DIR directory. This directory is used by replicate self-heal to dump files and directories it deletes.
This is needed because letting replicate walk the directory tree and delete a directory and all its children is too racy. Instead, replicate self-heal only does an atomic rename(), and the janitor thread takes care of actually deleting them.
The janitor-sleep-duration sets the frequency at which this happens.
Translator storage/bdb
Server Translator
GlusterFS can emulate a filesystem using Berkeley DB to simulate a block device. This translator binds the GlusterFS server to a Berkeley database. This may be a more efficient storage backend for large numbers of small files.
volume bdb type storage/bdb option directory /var/lib/glusterbdb # export directory # option logdir /var/log/bdb # option errfile /var/log/bdb/error.log # option dir-mode 0750 # option file-mode 0640 # option page-size 4096 # option open-db-lru-limit 16 # option lock-timeout 4260000 # option checkpoint-interval 86400 # option transaction-timeout 4260000 # option mode persistent # option access-mode btree end-volume
- logdir
Directory to be used by libdb for writing transaction logs. NOTE: in absence of 'logdir' export directory itself will be used as 'logdir' also.
- errfile
Path to be used for libdb error logging. NOTE: absence of 'errfile' will disable any error logging by libdb.
- dir-mode, file-mode
Dir/File mode for dirs and regular files. stat() returns the mode specified by this option. NOTE: specify value in octal
- page-size
Size of pages used to hold data by libdb. set it to block size of exported filesystem for optimal performance.
- open-db-lru-limit
Maximum number of databases per directory that can be kept open. NOTE: for advanced users only.
- lock-timeout
The maximum time a lock request can be blocked by libdb. NOTE: only for advanced users. Do not specify this option when not sure.
- checkpoint-interval
The time interval between two consecutive libdb checkpoints. Lower values will reduce bdb's performance, but also reduces the exposure to potential data loss in case of a crash. NOTE: this option is valid only when "mode=persistent" is set.
- transaction-timeout
Maximum time for which a transaction can block waiting for required resources.
- mode
- cache
Data recovery is not flushed to disk immediately offering increased performance at increased risk of data loss in the event of a system failure.
- persistent
Data is immediately flushed to disk.
- access-mode
- btree
- hash
Choose the db access method. NOTE: for advanced users. leave the choice to glusterfs when in doubt.


