Skip to content

Instantly share code, notes, and snippets.

@gilangvperdana
Created September 30, 2024 05:57
Show Gist options
  • Save gilangvperdana/0206dd2ef372ccec00616a6899c2feee to your computer and use it in GitHub Desktop.
Save gilangvperdana/0206dd2ef372ccec00616a6899c2feee to your computer and use it in GitHub Desktop.
Integrate Cinder with TrueNAS iSCSI

General

If you need an external SAN (TrueNAS) for storage backend on Cinder Openstack, you can follow this guidance. Tested on me on Openstack Kolla-ansible Caracal Ubuntu 22.04 LTS.

Pre-requisites

  • Openstack Caracal with Cinder ISCSI Backend Enabled
  • TrueNAS
  • TrueNAS Cinder Driver (https://github.com/iXsystems/cinder)
  • Makesure your TrueNAS endpoint reachable from Management Interface all Openstack Nodes

Create Dataset on Truenas

Please create Dataset on Pool -> Dataset

Cinder Configuration

nano /etc/kolla/config/cinder.conf
[DEFAULT] 
enabled_backends = ixsystems-iscsi, lvm-1 
default_volume_type = ixsystems-iscsi 
 
[ixsystems-iscsi] 
iscsi_helper = tgtadm 
volume_dd_blocksize = 512 
volume_driver = cinder.volume.drivers.ixsystems.iscsi.FreeNASISCSIDriver 
ixsystems_login = root 
ixsystems_password = yourP@ssw0rdHere 
ixsystems_server_hostname = 192.168.202.13 
ixsystems_transport_type = https 
ixsystems_volume_backend_name = iXsystems_TRUENAS_Storage 
ixsystems_iqn_prefix = iqn.2024-08.id.co.test
ixsystems_datastore_pool = HDD-POOL-01 
ixsystems_dataset_path = HDD-POOL-01/openstack 
ixsystems_vendor_name = iXsystems 
ixsystems_storage_protocol = iscsi 
image_volume_cache_enabled = true 
git clone https://github.com/iXsystems/cinder
docker cp driver/ixsystem/ cinder_volume:/var/lib/kolla/venv/lib/python3.10/site-packages/cinder/volume/drivers/ixsystems 
kolla-ansible –i multinode reconfigure –t cinder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment