Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add colocation and ordering for clvm #373

Merged
merged 3 commits into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 47 additions & 4 deletions xml/ha_cluster_lvm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,61 @@
</listitem>
<listitem>
<para>
Use shared activation mode for &ocfs; and add it to the cloned
<literal>g-storage</literal> group:
Use shared activation mode for &ocfs;:
</para>
<screen>&prompt.root;<command>crm configure primitive vg1 LVM-activate \
params vgname=vg1 vg_access_mode=lvmlockd activation_mode=shared \
op start timeout=90s interval=0 \
op stop timeout=90s interval=0 \
op monitor interval=30s timeout=90s</command>
&prompt.root;<command>crm configure modgroup g-storage add vg1</command></screen>
op monitor interval=30s timeout=90s</command></screen>
</listitem>
</itemizedlist>
</step>
<step>
<para>
Make sure the VG can only be activated on nodes where the DLM and
<systemitem>lvmlockd</systemitem> resources are already running:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Exclusive activation mode:</emphasis>
</para>
<para>
Because this VG is only active on a single node, do <emphasis>not</emphasis>
add it to the cloned <literal>g-storage</literal> group. Instead, add
constraints directly to the resource:
</para>
<screen>&prompt.root;<command>crm configure colocation col-vg-with-dlm inf: vg1 cl-storage</command>
&prompt.root;<command>crm configure order o-dlm-before-vg Mandatory: cl-storage vg1</command></screen>
<para>
For multiple VGs, you can add constraints to multiple resources at once:
</para>
<screen>&prompt.root;<command>crm configure colocation col-vg-with-dlm inf: ( vg1 vg2 ) cl-storage</command>
&prompt.root;<command>crm configure order o-dlm-before-vg Mandatory: cl-storage ( vg1 vg2 )</command></screen>
</listitem>
<listitem>
<para>
<emphasis role="bold">Shared activation mode:</emphasis>
</para>
<para>
Because this VG is active on multiple nodes, you can add it to the cloned
<literal>g-storage</literal> group, which already has internal colocation
and order constraints:
</para>
<screen>&prompt.root;<command>crm configure modgroup g-storage add vg1</command></screen>
<para>
Do <emphasis>not</emphasis> add multiple VGs to the group, because this
creates a dependency between the VGs. For multiple VGs, clone the resources and add
constraints to the clones:
</para>
<screen>&prompt.root;<command>crm configure clone cl-vg1 vg1 meta interleave=true</command>
&prompt.root;<command>crm configure clone cl-vg2 vg2 meta interleave=true</command>
&prompt.root;<command>crm configure colocation col-vg-with-dlm inf: ( cl-vg1 cl-vg2 ) cl-storage</command>
&prompt.root;<command>crm configure order o-dlm-before-vg Mandatory: cl-storage ( cl-vg1 cl-vg2 )</command></screen>
</listitem>
</itemizedlist>
</step>
<step>
<para>
Check if the resources are running well:
Expand Down