Translators/storage/posix

From GlusterDocumentation

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.

 

Copyright © Red Hat, Inc. All Rights Reserved.