diff --git a/tools/shell/templates/clvm b/tools/shell/templates/clvm new file mode 100644 index 0000000000..9689f0aaa5 --- /dev/null +++ b/tools/shell/templates/clvm @@ -0,0 +1,41 @@ +%name clvm + +# Cluster-aware lvm (cloned) +# +# This template generates a cloned instance of clvm and one +# volume group +# +# NB: You need just one clvm, regardless of how many volume +# groups. In other words, you can use this template only for one +# volume group and to make another one, you'll have to edit the +# resulting configuration yourself. + +%required + +# Name the volume group +# (for example: vg-1) +# NB: The clone is going to be named c- (e.g. c-vg-1) + +%% id + +# The volume group name + +%% volgrpname + +%generate + +primitive clvm ocf:lvm2:clvmd + params daemon_timeout="30" daemon_options="-d2" + +clone clvm-clone clvm + meta interleave="true" ordered="true" + +primitive %_:id ocf:heartbeat:LVM + params volgrpname="%_:volgrpname" + +clone c-%_:id %_:id + meta interleave="true" ordered="true" + +colocation colo-%_:id-clvm inf: c-%_:id clvm-clone + +order order-%_:id-clvm inf: clvm-clone c-%_:id diff --git a/tools/shell/templates/ocfs2 b/tools/shell/templates/ocfs2 new file mode 100644 index 0000000000..dc0697627a --- /dev/null +++ b/tools/shell/templates/ocfs2 @@ -0,0 +1,85 @@ +%name ocfs2 + +# ocfs2 filesystem (cloned) +# +# This template generates a cloned instance of the ocfs2 filesystem +# +# The filesystem should be on the device, unless clvm is used +# To use clvm, pull it along with this template: +# new myfs ocfs2 clvm +# +# NB: You need just one dlm and o2cb, regardless of how many +# filesystems. In other words, you can use this template only for +# one filesystem and to make another one, you'll have to edit the +# resulting configuration yourself. + +%suggests clvm + +%required + +# Name the ocfs2 filesystem +# (for example: bigfs) +# NB: The clone is going to be named c- (e.g. c-bigfs) + +%% id + +# The mount point + +%% directory + +# The device + +%% device + +# optional parameters for the ocfs2 filesystem + +%optional + +# mount options + +%% options + +%generate + +primitive %_:id ocf:heartbeat:Filesystem + params + directory="%_:directory" + fstype="ocfs2" + device="%_:device" + opt options="%_:options" + +monitor %_:id 20:40 + +clone c-%_:id %_:id + meta interleave="true" ordered="true" + +primitive dlm ocf:pacemaker:controld + +clone dlm-clone dlm + meta interleave="true" ordered="true" + +primitive o2cb ocf:ocfs2:o2cb + +clone o2cb-clone o2cb + meta interleave="true" ordered="true" + +colocation colo-o2cb-dlm inf: o2cb-clone dlm-clone + +order order-o2cb-dlm inf: dlm-clone o2cb-clone + +colocation colo-%_:id-o2cb inf: c-%_:id o2cb-clone + +order order-%_:id-o2cb inf: o2cb-clone c-%_:id + +# if there's clvm, generate some constraints too +# + +%if %clvm +colocation colo-clvm-dlm inf: clvm-clone dlm-clone + +order order-clvm-dlm inf: dlm-clone clvm-clone + +colocation colo-%_:id-%clvm:id inf: c-%_:id c-%clvm:id + +order order-%_:id-%clvm:id inf: c-%clvm:id c-%_:id +%fi