How To Install ctdb on CentOS 8

ctdb is A Clustered Database based on Samba’s Trivial Database (TDB)

Introduction

In this tutorial we learn how to install ctdb on CentOS 8.

What is ctdb

CTDB is a cluster implementation of the TDB database used by Samba and other projects to store temporary data. If an application is already using TDB for temporary data it is very easy to convert that application to be cluster aware and use CTDB instead.

We can use yum or dnf to install ctdb on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install ctdb.

Install ctdb on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install ctdb using dnf by running the following command:

sudo dnf -y install ctdb

Install ctdb on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install ctdb using yum by running the following command:

sudo yum -y install ctdb

How To Uninstall ctdb on CentOS 8

To uninstall only the ctdb package we can use the following command:

sudo dnf remove ctdb

ctdb Package Contents on CentOS 8

/etc/ctdb
/etc/ctdb/ctdb-crash-cleanup.sh
/etc/ctdb/ctdb.conf
/etc/ctdb/debug-hung-script.sh
/etc/ctdb/debug_locks.sh
/etc/ctdb/events
/etc/ctdb/events/legacy
/etc/ctdb/events/notification
/etc/ctdb/events/notification/README
/etc/ctdb/functions
/etc/ctdb/nfs-checks.d
/etc/ctdb/nfs-checks.d/00.portmapper.check
/etc/ctdb/nfs-checks.d/10.status.check
/etc/ctdb/nfs-checks.d/20.nfs.check
/etc/ctdb/nfs-checks.d/30.nlockmgr.check
/etc/ctdb/nfs-checks.d/40.mountd.check
/etc/ctdb/nfs-checks.d/50.rquotad.check
/etc/ctdb/nfs-checks.d/README
/etc/ctdb/nfs-linux-kernel-callout
/etc/ctdb/notify.sh
/etc/ctdb/statd-callout
/etc/sudoers.d/ctdb
/etc/sysconfig/ctdb
/usr/bin/ctdb
/usr/bin/ctdb_diagnostics
/usr/bin/ctdb_local_daemons
/usr/bin/ltdbtool
/usr/bin/onnode
/usr/bin/ping_pong
/usr/lib/.build-id
/usr/lib/.build-id/1c/6799a4a33dd50d836d195614c770bee7ee992b
/usr/lib/.build-id/25/9394be5bb700bf77b18214e633f8e67aab2d8c
/usr/lib/.build-id/36
/usr/lib/.build-id/36/06eb237e92debeabc9571265138e773080a4ff
/usr/lib/.build-id/4c/71db5cccba7eeff4193e4ac265fdadc2a1bf87
/usr/lib/.build-id/54/a0febf0b65a6943ed90b3105ef1b56269e649c
/usr/lib/.build-id/55
/usr/lib/.build-id/55/1cc21edadaf88caf851f51bf61a7eb188d9d2a
/usr/lib/.build-id/5d/a8999392ba2c48ce6e9dedf17729efb010e8d5
/usr/lib/.build-id/77/698e6678444bc06b07aa771cb2e6febb155b06
/usr/lib/.build-id/a4
/usr/lib/.build-id/a4/c5340958cb865a4e7ebd7aa91fb2abe4d29bc9
/usr/lib/.build-id/aa/88bcc73a7ac1ad370577be29ead82dd0d2e417
/usr/lib/.build-id/e1/aa9adfcd9e11210dfc7861220e3baab1cb2381
/usr/lib/.build-id/e1/ec9a0c40e697e145f5dac919a6f34b0f6d48b1
/usr/lib/.build-id/ec/ec1284558b8460834a25807224bda189df9dbf
/usr/lib/.build-id/ed/a4a479d297fbd556507d9674db68d13c064ff8
/usr/lib/systemd/system/ctdb.service
/usr/lib/tmpfiles.d/ctdb.conf
/usr/libexec/ctdb
/usr/libexec/ctdb/ctdb-config
/usr/libexec/ctdb/ctdb-event
/usr/libexec/ctdb/ctdb-eventd
/usr/libexec/ctdb/ctdb-path
/usr/libexec/ctdb/ctdb_killtcp
/usr/libexec/ctdb/ctdb_lock_helper
/usr/libexec/ctdb/ctdb_lvs
/usr/libexec/ctdb/ctdb_mutex_fcntl_helper
/usr/libexec/ctdb/ctdb_natgw
/usr/libexec/ctdb/ctdb_recovery_helper
/usr/libexec/ctdb/ctdb_takeover_helper
/usr/libexec/ctdb/smnotify
/usr/sbin/ctdbd
/usr/sbin/ctdbd_wrapper
/usr/share/ctdb
/usr/share/ctdb/events
/usr/share/ctdb/events/legacy
/usr/share/ctdb/events/legacy/00.ctdb.script
/usr/share/ctdb/events/legacy/01.reclock.script
/usr/share/ctdb/events/legacy/05.system.script
/usr/share/ctdb/events/legacy/06.nfs.script
/usr/share/ctdb/events/legacy/10.interface.script
/usr/share/ctdb/events/legacy/11.natgw.script
/usr/share/ctdb/events/legacy/11.routing.script
/usr/share/ctdb/events/legacy/13.per_ip_routing.script
/usr/share/ctdb/events/legacy/20.multipathd.script
/usr/share/ctdb/events/legacy/31.clamd.script
/usr/share/ctdb/events/legacy/40.vsftpd.script
/usr/share/ctdb/events/legacy/41.httpd.script
/usr/share/ctdb/events/legacy/48.netbios.script
/usr/share/ctdb/events/legacy/49.winbind.script
/usr/share/ctdb/events/legacy/50.samba.script
/usr/share/ctdb/events/legacy/60.nfs.script
/usr/share/ctdb/events/legacy/70.iscsi.script
/usr/share/ctdb/events/legacy/91.lvs.script
/usr/share/doc/ctdb
/usr/share/doc/ctdb/README
/usr/share/doc/ctdb/examples
/usr/share/doc/ctdb/examples/11.natgw.options
/usr/share/doc/ctdb/examples/20.nfs_ganesha.check
/usr/share/doc/ctdb/examples/91.lvs.options
/usr/share/doc/ctdb/examples/README
/usr/share/doc/ctdb/examples/config_migrate.sh
/usr/share/doc/ctdb/examples/config_migrate.test_input
/usr/share/doc/ctdb/examples/ctdb.conf
/usr/share/doc/ctdb/examples/nfs-ganesha-callout
/usr/share/man/man1/ctdb.1.gz
/usr/share/man/man1/ctdb_diagnostics.1.gz
/usr/share/man/man1/ctdbd.1.gz
/usr/share/man/man1/ctdbd_wrapper.1.gz
/usr/share/man/man1/ltdbtool.1.gz
/usr/share/man/man1/onnode.1.gz
/usr/share/man/man1/ping_pong.1.gz
/usr/share/man/man5/ctdb-script.options.5.gz
/usr/share/man/man5/ctdb.conf.5.gz
/usr/share/man/man5/ctdb.sysconfig.5.gz
/usr/share/man/man7/ctdb-statistics.7.gz
/usr/share/man/man7/ctdb-tunables.7.gz
/usr/share/man/man7/ctdb.7.gz
/var/lib/ctdb
/var/lib/ctdb/persistent
/var/lib/ctdb/state
/var/lib/ctdb/volatile

References

Summary

In this tutorial we learn how to install ctdb on CentOS 8 using yum and dnf.