Translators/storage/bdb

From GlusterDocumentation

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.

 

Copyright © Gluster, Inc. All Rights Reserved.