<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Dear friends , <br>
</p>
<p>( i send the same messages again in order to conform with the
forum text formatting ) <br>
</p>
<p>Many Thanks for your brilliant answers ,<br>
</p>
<p>Ken your suggestion : <br>
</p>
<p>"The second problem is that you have an ordering constraint but
no colocation constraint. With your current setup, windows_VM has
to start<br>
</p>
<p>after the storage, but it doesn't have to start on the same node.
You need a colocation constraint as well, to ensure they start on
the sam</p>
<p>node."<b><br>
</b></p>
<p><br>
</p>
<p>for the storage i have the following complete steps:<br>
</p>
<p>pcs resource create ProcDRBD_SigmaVMs ocf:linbit:drbd
drbd_resource=sigma_vms drbdconf=/etc/drbd.conf op monitor
interval=10s<br>
</p>
<p>pcs resource master clone_ProcDRBD_SigmaVMs ProcDRBD_SigmaVMs
master-max=1 master-node-max=1 clone-max=2 clone-node-max=1
notify=true<br>
</p>
<p>pcs resource create StorageDRBD_SigmaVMs Filesystem
device="/dev/drbd1" directory="/opt/sigma_vms/" fstype="ext4"<font
color="#ff0000"><br>
</font></p>
<p>pcs constraint location clone_ProcDRBD_SigmaVMs prefers sgw-01<br>
</p>
<p>pcs constraint colocation add StorageDRBD_SigmaVMs with
clone_ProcDRBD_SigmaVMs INFINITY with-rsc-role=Master <br>
</p>
<p>pcs constraint order promote clone_ProcDRBD_SigmaVMs then start
StorageDRBD_SigmaVMs<b><br>
</b></p>
<p><br>
</p>
<p>and when i create the VM<br>
</p>
<p>pcs resource create windows_VM_res VirtualDomain
hypervisor="qemu:///system"
config="/opt/sigma_vms/xml_definitions/windows_VM.xml" <br>
</p>
<p>pcs constraint colocation add windows_VM_res with
StorageDRBD_SigmaVMs INFINITY<br>
</p>
pcs constraint order start StorageDRBD_SigmaVMs_rers then start
windows_VM <b><br>
<br>
</b><br>
My question is : <br>
<br>
are the below steps enough to ensure that the new VM will be placed
on the node 1 ?<font color="#ff0000"><font color="#000000"><br>
<br>
(storage process prefers node 1 (the primary of drbd) with
weight INFINITY, windows_VM should be placed with
StorageDRBD_SigmaVMs always </font></font><font color="#ff0000"><font
color="#000000"><br>
and from transitive rule </font></font><font color="#ff0000"><font
color="#000000"><font color="#ff0000"><font color="#000000">windows_VM</font></font>
should be placed on node1 <br>
<br>
(assume that ---> means prefer) storage --> node1 ,
windows ---> storage thus from transitive rule windows_VM
---> node1</font></font><font color="#ff0000"><br>
<br>
<font color="#000000">pcs constraint location
clone_ProcDRBD_SigmaVMs prefers sgw-01</font></font><br>
<br>
pcs constraint colocation add windows_VM_res with
StorageDRBD_SigmaVMs INFINITY<br>
<br>
pcs constraint order start StorageDRBD_SigmaVMs_rers then start
windows_VM <br>
<br>
Sincerely<br>
<br>
</body>
</html>