How to manage a NetBeez Beezkeeper server with an external /data directory

The are many reason why you would want to keep NetBeez data on a different volume than the OS volume, such as using your own organization’s approved Ubuntu images.

If you are running a self-managed BeezKeeper instance on-prem or your public cloud account and you need the data to be kept on a separate volume that the OS volume these are the things you need to maintain:

Symbolic links from the data partition to the root partition

/var/log/netbeez
/var/lib/mysql
/var/lib/docker
/var/lib/influxdb2
/opt/netbeez

For example:

ln -s /data/opt/netbeez /opt/netbeez

Environment files

Create this file /etc/bash.bashrc.d/netbeez.rc containing:

source /opt/netbeez/app_data/netbeez.rc

Add the following snippet into /etc/bash.bashrc

#### NETBEEZ DOCKER ####################
for file in /etc/bash.bashrc.d/*; do
  source "${file}"
done
#### NETBEEZ DOCKER ####################

Mount the data volume on boot

Make sure that the /data partition is mounted on boot by adding this into /etc/fstab

/dev/sdb1 /data ext4 defaults 0 0

Remember to replace /dev/sdb1 with the right device name. Use lsblk to find the right one. Verify your fstab configuration by running sudo mount -a.

Note that all of these actions should be done as the root user.

1 Like