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 1 commit
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
37 changes: 33 additions & 4 deletions xml/ha_cluster_lvm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,47 @@
</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>
For a single VG using shared activation mode, you can add the VG
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>
</listitem>
<listitem>
<para>
For a single VG using exclusive activation mode, add constraints directly:
</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>
</listitem>
<listitem>
<para>
For multiple VGs using either activation mode, you can add constraints
that apply to batches of resources:
Copy link
Contributor

@gao-yan gao-yan May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example in below looks like it's exclusive activation mode, given that vg1 and vg2 are not explicitly cloned here. How about being more clear, for example something like:

"For multiple VGs, you can add constraints that apply to batches of resource. For instance for exclusive activation mode:
..."

And after the example:
"For multiple VGs using shared activation mode, you can first clone vg1 and vg2, and add similar constraints that apply to the clone resources instead".

Just an idea, I believe there are other ways to clarify it :-)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Thx.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thank you, I didn't catch that because the original procedure didn't have a step for cloning, but that's because it added the shared mode VG to the group, and the group is cloned. So of course without the group you have to clone. I'll add another dot point to address this.

</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>
</itemizedlist>
</step>
<step>
<para>
Check if the resources are running well:
Expand Down