This post will walk through the installation and setup procedures for deploying LINSTOR for a persistent, replicated, and high-performance source of block storage within DevStack version of OpenStack running on an Ubuntu host. We will refer to this Ubuntu host as the LINSTOR Controller. This setup also requires at least one additional Ubuntu node handling replicated data, and we will refer to this node as the LINSTOR Satellite. You may have more than one satellite nodes for increased redundancy.
The LINSTOR driver is a messenger between the underlying DRBD/LINSTOR and OpenStack. Therefore, both DRBD/LINSTOR as well as OpenStack must be pre-installed and configured. Once LINSTOR is installed, each node must be registered with LINSTOR and have a predefined storage pool on a thin LVM volume.
Install DRBD / LINSTOR on OpenStack Cinder node as a LINSTOR Controller node
# First, download and run a python script to enable LINBIT repo curl -O 'https://my.linbit.com/linbit-manage-node.py' chmod u+x linbit-manage-node.py ./linbit-manage-node.py # Install the DRBD, LINSTOR, and LVM packages sudo apt install -y drbd-dkms lvm2 sudo apt install -y linstor-controller linstor-satellite linstor-client sudo apt install -y drbdtop
Configure the LINSTOR Controller
# Start both LINSTOR Controller and Satellite Services systemctl enable linstor-controller.service systemctl start linstor-controller.service systemctl enable linstor-satellite.service systemctl start linstor-satellite.service # Create backend storage for DRBD/LINSTOR by creating a Volume Group 'drbdpool' # Specify appropriate volume location (/dev/vdb) sudo vgcreate drbdpool /dev/vdb # Create a Logical Volume 'thinpool' within 'drbdpool' # Specify appropriate thin volume size (64G) sudo lvcreate -L 64G -T drbdpool/thinpool
Install DRBD / LINSTOR on all other LINSTOR Satellite node(s)
# First obtain and install DRBD / LINSTOR packages through LINBIT # by running python script sudo apt install -y drbd-dkms lvm2 sudo apt install -y linstor-satellite sudo apt install -y drbdtop
Configure the LINSTOR Satellite node(s)
# Start LINSTOR Satellite Service systemctl enable linstor-satellite.service systemctl start linstor-satellite.service # Create backend storage for DRBD/LINSTOR by creating a Volume Group 'drbdpool' # Specify appropriate volume location (/dev/vdb) sudo vgcreate drbdpool /dev/vdb # Create a Logical Volume 'thinpool' within 'drbdpool' # Specify appropriate thin volume size (64G) sudo lvcreate -L 64G -T drbdpool/thinpool
Configure LINSTOR cluster (nodes and storage pool definitions) from the Controller node
# Create the controller node as combined controller and satellite node linstor node create cinder-node-name 192.168.1.100 --node-type Combined # Create the satellite node(s) linstor node create another-linstor-node 192.168.1.101 # repeat to add more satellite nodes in the LINSTOR cluster # Create LINSTOR Storage Pool on each nodes # For each node, specify node name, its IP address, # storage pool name (DfltStorPool) and volume type (lvmthin) # On the LINSTOR Controller linstor storage-pool create lvmthin cinder-node-name DfltStorPool \ drbdpool/thinpool # On the LINSTOR Satellite node(s) linstor storage-pool create lvmthin another-linstor-node DfltStorPool \ drbdpool/thinpool # repeat to add a storage pool to each node in the LINSTOR cluster
Cinder Driver Installation & Configuration
Download the latest driver (linstordrv.py)
wget https://github.com/LINBIT/openstack-cinder/blob/stein-linstor/cinder/ volume/drivers/linstordrv.py
Install the driver file in the proper destination
Configure OpenStack Cinder by editing /etc/cinder/cinder.conf
to enable LINSTOR driver by adding ‘linstor’ to enabled_backends
[DEFAULT] ... enabled_backends=lvm, linstor …
Then, add a LINSTOR section at the bottom of the cinder.conf
[linstor] volume_backend_name = linstor volume_driver = cinder.volume.drivers.linstordrv.LinstorDrbdDriver linstor_default_volume_group_name=drbdpool linstor_default_uri=linstor://localhost linstor_default_storage_pool_name=DfltStorPool linstor_default_resource_size=1 linstor_volume_downsize_factor=4096 linstor_controller_diskless=False iscsi_helper=tgtadm
Update Python libraries
sudo pip install protobuf --upgrade sudo pip install eventlet --upgrade
Register LINSTOR with Cinder
cinder type-key linstor cinder type-key linstor set volume_backend_name=linstor
Lastly, restart Cinder services
sudo systemctl restart [email protected] sudo systemctl restart [email protected] sudo systemctl restart [email protected]
Verification of proper installation
Check system journal for any driver errors
# Check if there is a recurring error after restart sudo systemctl -f -u [email protected]* | grep error
Create a test volume with LINSTOR backend
# Create a 1GiB volume through Cinder and verify LINSTOR backing exists openstack volume create --type linstor --size 1 --availability-zone nova \ linstor-test-vol openstack volume list linstor resource list
Delete the test volume
# Delete the test volume and verify if LINSTOR removed resources correctly openstack volume delete linstor-test-vol linstor resource list
By now, the LINSTOR driver should have successfully created a Cinder volume and the matching LINSTOR resources on the backend and then removed them from Cinder. From this point on, managing LINSTOR volumes should be a breeze with OpenStack Horizon’s GUI interface.
Management of LINSTOR snapshots and creation of LINSTOR volumes from those snapshots are also possible. Once a LINSTOR volume becomes available, it can then be made accessible within a Nova instance by creating an attachment. Any LINSTOR-backed volume can then provide replicated and persistent storage.
Please direct any questions regarding the specifics about the driver to Woojay Poynter at [email protected]. For any inquiry regarding DRBD and LINSTOR technology please contact our sales team at [email protected].
Feel free to check out this demonstration of LINSTOR volume management in OpenStack: