# gluster volume create vol1 replica 3 \ server1.example.com:/exports/vol1/s1 \ server2.example.com:/exports/vol1/s2 \ server3.example.com:/exports/vol1/s3
Importing a Gluster Volume to Kadalu Storage
This post is the second part of the Kadalu Storage introduction series.
Gluster Storage and Kadalu Storage share the same filesystem backend that is GlusterFS. Which makes it natural to think about migrating a Gluster Volume to Kadalu Volume.
Luckily both Kadalu Storage and Gluster Storage can co-exist. To experience Kadalu Storage, you can identify one Volume from the Gluster Cluster and migrate it to Kadalu Storage. At the end of this blog post I will also show how you can go back to Gluster’s way of managing that Volume.
Create a Volume in Gluster Cluster (I am skipping all the Peer probe steps and directly jump to creating the Volume)
Gluster CLI doesn’t support importing or creating a volume by specifying volume ID. Do not delete the Gluster Volume after migrating to Kadalu Storage. Keep the Gluster Volume in Stopped state.
Start Kadalu Storage manager in all Gluster Storage nodes, in this example Start in server1, server2 and server3.
# systemctl enable kadalu-mgr # systemctl start kadalu-mgr
Login to any one server and create a Storage Pool, Example
server1# kadalu pool create PROD
Get the Volume ID by running the command, gluster volume info vol1. And use that Volume ID with Kadalu command as shown below (Note the Brick paths are unchanged)
$ kadalu volume create PROD/vol1 \ replica server1.example.com:/exports/vol1/s1 \ server2.example.com:/exports/vol1/s2 \ server3.example.com:/exports/vol1/s3 \ --volume-id ea4fc0b9-f63b-4621-8c50-838e02ef08df
Using migration Helper
Run the Gluster Volume info XML and then pipe it to the Kadalu Volume create command.
# gluster volume info vol1 --xml | kadalu volume create PROD/- \ --auto-add-nodes
This helper parses the Volume info and understands the Volume options used, type of Volume and many other details to recreate the Kadalu Volume. (Note: Volume Options support is a upcoming feature of Kadalu Storage)
If the node names used for Gluster are different from the ones to use with Kadalu then use the
# gluster volume info vol1 --xml | kadalu volume create PROD/- \ --auto-add-nodes \ --node-map="server1.example.com=node1.example.com" \ --node-map="server2.example.com=node2.example.com" \ --node-map="server3.example.com=node3.example.com"
To import all Volumes,
# gluster volume list | xargs \ gluster volume info --xml | kadalu volume create PROD/- \ --auto-add-nodes
Kadalu Volumes are started by default on creation. If you want to stop using Kadalu and move back to Glusterd based Volume management, Stop the Kadalu Volume and Start the Gluster Volume. That’s all!
$ kadalu volume stop PROD/vol1 # gluster volume start vol1
Join the Kadalu team as we plan, design and develop new features. We are available on our Slack instance, https://kadalu.slack.com.