<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi, I'm trying to develop a solution for openstack-cinder-volume with an active/passive cluster.<br></div>Basically I have a san that exposes a LUN to 2 openstack-cinder-volume hosts, then I used pacemaker to create resources:<br><br></div>1 drbd + filesystem mounted on /etc/target<br></div>1 drbd + filesystem mounted on /var/lib/cinder<br></div>1 Virtual Ip Address used as iscsi_ip_address in cinder.conf (yes, on both nodes)<br></div>1 systemd:target.service for starting target daemon in an active/passive manner (only on the active host of the cluster)<br></div>1 systemd:openstack-cinder-volume for start the cinder-volume daemon<br><br></div><div>I'm using lvm as backend in cinder volume and cinder.conf has the same content an all cinder-volume nodes.<br></div><div><br></div>Status of the cluster:<br><br>[root@mitaka-cinder-volume1-env3 ~]# pcs status<br>Cluster name: cinder_iscsi_cluster<br>Last updated: Fri Sep  2 21:00:41 2016        Last change: Fri Sep  2 20:29:51 2016 by root via cibadmin on mitaka-cinder-volume2-env3<br>Stack: corosync<br>Current DC: mitaka-cinder-volume2-env3 (version 1.1.13-10.el7_2.4-44eb2dd) - partition with quorum<br>2 nodes and 9 resources configured<br><br>Online: [ mitaka-cinder-volume1-env3 mitaka-cinder-volume2-env3 ]<br><br>Full list of resources:<br><br> Resource Group: group1<br>     StorageVIP    (ocf::heartbeat:IPaddr2):    Started mitaka-cinder-volume2-env3<br>     targetd    (systemd:target):    Started mitaka-cinder-volume2-env3<br>     cinder-volume    (systemd:openstack-cinder-volume):    Started mitaka-cinder-volume2-env3<br> Master/Slave Set: ms_drbd_1_2 [res_drbd_1_2]<br>     Masters: [ mitaka-cinder-volume2-env3 ]<br>     Slaves: [ mitaka-cinder-volume1-env3 ]<br> res_Filesystem_1    (ocf::heartbeat:Filesystem):    Started mitaka-cinder-volume2-env3<br> Master/Slave Set: ms_drbd_2 [res_drbd_2]<br>     Masters: [ mitaka-cinder-volume2-env3 ]<br>     Slaves: [ mitaka-cinder-volume1-env3 ]<br> res_Filesystem_2    (ocf::heartbeat:Filesystem):    Started mitaka-cinder-volume2-env3<br><br>PCSD Status:<br>  mitaka-cinder-volume1-env3: Online<br>  mitaka-cinder-volume2-env3: Online<br><br>Daemon Status:<br>  corosync: active/enabled<br>  pacemaker: active/enabled<br>  pcsd: active/enabled<br>[root@mitaka-cinder-volume1-env3 ~]#<br><br><br></div>Status of constraints:<br><br>[root@mitaka-cinder-volume1-env3 ~]# pcs constraint<br>Location Constraints:<br>Ordering Constraints:<br>  promote ms_drbd_1_2 then start res_Filesystem_1 (score:INFINITY)<br>  res_Filesystem_1 then group1 (score:INFINITY)<br>  promote ms_drbd_2 then start res_Filesystem_2 (score:INFINITY)<br>  res_Filesystem_2 then group1 (score:INFINITY)<br>Colocation Constraints:<br>  res_Filesystem_1 with ms_drbd_1_2 (score:INFINITY) (with-rsc-role:Master)<br>  group1 with res_Filesystem_1 (score:INFINITY)<br>  res_Filesystem_2 with ms_drbd_2 (score:INFINITY) (with-rsc-role:Master)<br>  group1 with res_Filesystem_2 (score:INFINITY)<br>[root@mitaka-cinder-volume1-env3 ~]#<br><br><br><br><br></div>I'd like to know if this is the right way because I have some doubts: <br></div>1) Should I avoid that the lun used by the VG cinder-volumes is viewed at the same time by all nodes in the cluster? (please, let me know how can I avoid this in a "clustered" manner)<br></div>2) When I create a new volume, I see the logical volume on the active node, but not on the passive node. Why this happens? How can I rescan the logical volumes on the passive node? (lvscan doesn't find new volumes...)<br><br></div>Basically the failover works well because I have an instance booted from a volume that continue to works if I shut down the active node. I can observe with netstat that the connection between (the new active) cinder-volume and the compute node is re-created when failover happens. <br></div>However, please give me more suggestions about the argument. I have a san and 2 cinder-volume dedicated nodes and I'm try to realize an active/passive cluster. Any idea is accepted.<br></div>Thank you<br><div><div><br><br><br><div><div><br><br><div><div><div><div><br><br><br><br><br><br><div><div><div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div>