diff --git a/tools/shell/templates/Makefile.am b/tools/shell/templates/Makefile.am index fb59c3ed88..cad54743d1 100644 --- a/tools/shell/templates/Makefile.am +++ b/tools/shell/templates/Makefile.am @@ -1,26 +1,26 @@ # # doc: Pacemaker code # # Copyright (C) 2008 Andrew Beekhof # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # MAINTAINERCLEANFILES = Makefile.in templatedir = $(datadir)/@PACKAGE@/templates -template_DATA = apache virtual-ip filesystem ocfs2 clvm +template_DATA = apache virtual-ip filesystem ocfs2 clvm gfs2-base gfs2 EXTRA_DIST = $(template_DATA) diff --git a/tools/shell/templates/gfs2 b/tools/shell/templates/gfs2 new file mode 100644 index 0000000000..f5d459e69f --- /dev/null +++ b/tools/shell/templates/gfs2 @@ -0,0 +1,68 @@ +%name gfs2 + +# gfs2 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. + +%depends_on gfs2-base +%suggests clvm + +%required + +# Name the gfs2 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 gfs2 filesystem + +%optional + +# mount options + +%% options + +%generate + +primitive %_:id ocf:heartbeat:Filesystem + params + directory="%_:directory" + fstype="gfs2" + device="%_:device" + opt options="%_:options" + +monitor %_:id 20:40 + +clone c-%_:id %_:id + meta interleave="true" ordered="true" + +colocation colo-%_:id-gfs inf: c-%_:id gfs-clone + +order order-%_:id-gfs inf: gfs-clone c-%_:id + +# if there's clvm, generate some constraints too +# + +%if %clvm +colocation colo-%_:id-%clvm:id inf: c-%_:id c-%clvm:id + +order order-%_:id-%clvm:id inf: c-%clvm:id c-%_:id +%fi diff --git a/tools/shell/templates/gfs2-base b/tools/shell/templates/gfs2-base new file mode 100644 index 0000000000..2cafff0654 --- /dev/null +++ b/tools/shell/templates/gfs2-base @@ -0,0 +1,42 @@ +%name gfs2-base + +# gfs2 filesystem base (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 + +%generate + +primitive dlm ocf:pacemaker:controld + +clone dlm-clone dlm + meta interleave="true" ordered="true" + +primitive gfs-controld ocf:pacemaker:controld + +clone gfs-clone gfs-controld + meta interleave="true" ordered="true" + +colocation colo-gfs-dlm inf: gfs-clone dlm-clone + +order order-gfs-dlm inf: dlm-clone gfs-clone + +# 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 +%fi