Kadalu Storage - Quick Start
Introduction
Kadalu Storage is a distributed filesystem management system. At its core, Kadalu uses the GlusterFS filesystem.
Installation
This guide assumes you will create a replica 3 (1x3) cluster using three nodes. The steps are the same if you plan to use a single node.
-
Add Kadalu Storage repository using the below commands.
curl -sL --compressed "https://kadalu.tech/pkgs/1/ubuntu/20.04/KEY.gpg" | sudo apt-key add - sudo curl -sL --compressed -o /etc/apt/sources.list.d/kadalu_storage.list "https://kadalu.tech/pkgs/1/ubuntu/20.04/sources.list" sudo apt update
-
Install the latest Kadalu Storage packages on all the nodes.
$ sudo apt install kadalu-storage
Service Setup
Enable and start the kadalu-mgr service on all the storage nodes.
$ sudo systemctl enable kadalu-mgr
$ sudo systemctl start kadalu-mgr
Create a user and login
Users can be created in any one of the storage nodes or in any dedicated node other than the storage nodes.
$ kadalu user create admin
Password:
User admin created successfully
Login
$ kadalu user login admin
Password:
Login successful. Details saved in `/root/.kadalu/session`. Delete this file or run `kadalu logout` command to delete the session.
Add storage nodes
The following commands are run from the storage manager (which can be one of the storage nodes or any separate node) which was chosen in the previous step.
Note: The below steps 1 and 2 can be skipped and can be done as part of pool create by passing --auto-add-nodes
.
Step 1:
Add nodes to the cluster
$ kadalu node add vm1
Node vm1 added to the cluster successfully
ID: 710acd83-d3aa-4292-b362-543599d12edf
$
$ kadalu node add vm2
Node vm2 added to the cluster successfully
ID: dfed8210-53d4-44e6-8a8b-7abe3fddb145
$
$ kadalu node add vm3
Node vm3 added to the cluster successfully
ID: 9ac5d869-9542-4dac-9c88-97cfb11a5738
$ kadalu node list
Name ID Endpoint
vm3 9ac5d869-9542-4dac-9c88-97cfb11a5738 http://vm3:3000
vm2 dfed8210-53d4-44e6-8a8b-7abe3fddb145 http://vm2:3000
vm1 710acd83-d3aa-4292-b362-543599d12edf http://vm1:3000
Create a storage pool
Now create a directory to use as a storage unit and create a Kadalu Storage Volume.
$ sudo mkdir /data/t2 (Run on all the storage nodes)
$
$ kadalu pool create Test-Pool replica 3 vm1:/data/t2 vm2:/data/t2 vm3:/data/t2
Pool Test-Pool created successfully
ID: 59a726ad-0010-4a4f-ac4d-b11e54e722d7
$
$ kadalu pool list
Name ID State Type Size Inodes
Test-Pool 59a726ad-0010-4a4f-ac4d-b11e54e722d7 Started Replicate 50.0GiB 26.2M
Note: The above command can be written as:
$ kadalu pool create Test-Pool replica 3 vm1:/data/t2 vm2:/data/t2 vm3:/data/t2 --auto-add-nodes
And the steps to node addition can be skipped.
Mount the pool
$ sudo mkdir /mnt/kadalu_pool
$ sudo mount -t kadalu vm1:Test-Pool /mnt/kadalu_pool/
$ df -h /mnt/kadalu_pool/
Filesystem Size Used Avail Use% Mounted on
kadalu:/Test-Pool 30G 554M 30G 2% /mnt/kadalu_pool