Gentoo Archives: gentoo-commits

From: "Kacper Kowalik (xarthisius)" <xarthisius@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in xml/htdocs/proj/en/cluster/ha-cluster: heartbeat-upgrade.xml
Date: Mon, 24 Jan 2011 18:30:40
Message-Id: 20110124183031.03DC920054@flycatcher.gentoo.org
1 xarthisius 11/01/24 18:30:30
2
3 Added: heartbeat-upgrade.xml
4 Log:
5 Add heartbeat upgrade guide.
6
7 Revision Changes Path
8 1.1 xml/htdocs/proj/en/cluster/ha-cluster/heartbeat-upgrade.xml
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/cluster/ha-cluster/heartbeat-upgrade.xml?rev=1.1&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/cluster/ha-cluster/heartbeat-upgrade.xml?rev=1.1&content-type=text/plain
12
13 Index: heartbeat-upgrade.xml
14 ===================================================================
15 <?xml version='1.0' encoding="UTF-8"?>
16 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/cluster/ha-cluster/heartbeat-upgrade.xml,v 1.1 2011/01/24 18:30:30 xarthisius Exp $ -->
17 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
18
19 <guide link="/proj/en/cluster/ha-cluster/heartbeat-upgrade.xml">
20 <title>Heartbeat 2.x to Heartbeat 3.x with Pacemaker upgrade guide</title>
21
22 <author title="Author">
23 <mail link="ibrahim.ndaw@×××××.com">Ibrahim Ndaw</mail>
24 </author>
25 <author title="Author">
26 <mail link="ultrabug@g.o">Alexys Jacob</mail>
27 </author>
28 <author title="Editor">
29 <mail link="xarthisius@g.o">Kacper Kowalik</mail>
30 </author>
31
32 <abstract>
33 This guide describes how to migrate from Heartbeat-2.x to 3.x on your Gentoo machine.
34 </abstract>
35
36 <!-- The content of this document is licensed under the CC-BY-SA license -->
37 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
38 <license/>
39
40 <version>1.0</version>
41 <date>2011-01-21</date>
42
43 <chapter>
44 <title>Introduction</title>
45 <section>
46 <body>
47
48 <warn>
49 This document is not intended to be a tutorial on howto create ha-cluster
50 using heartbeat. It serves as a supplement to recent >=sys-cluster/heartbeat-3.0
51 unmasking.
52 </warn>
53
54 <note>
55 For a complete HA-Cluster HOWTO point your browser to
56 <uri>http://www.linux-ha.org/doc/users-guide/users-guide.html</uri>
57 </note>
58 <p>
59 Please be aware that new Pacemaker also supports OpenAIS/Corosync cluster infrastructure besides Heartbeat, and the former is being preferred solution by the upstream.
60 </p>
61 </body>
62 </section>
63 </chapter>
64
65 <chapter>
66 <title>Before you emerge heartbeat 3.x</title>
67 <section>
68 <body>
69
70 <p>
71 Shutdown one of your nodes. This keeps the cluster working while we prepare the migration.
72 </p>
73
74 <p>
75 Heartbeat-2.x was using the user <c>cluster</c> and group <c>cluster</c> for
76 its file permissions. Cluster-glue/Pacemaker now uses the user <c>hacluster</c> and
77 group <c>haclient</c>, so we'll have to migrate them to ensure the owner user/group
78 on the used directories remain correct.
79 </p>
80
81 <p>
82 Rename user <c>cluster</c> to <c>hacluster</c>.
83 </p>
84 <pre caption="Renaming user">
85 # <i>usermod -l hacluster cluster</i>
86 </pre>
87
88 <p>
89 Rename group <c>cluster</c> to <c>haclient</c>.
90 </p>
91 <pre caption="Renaming user">
92 # <i>groupmod -n haclient cluster</i>
93 </pre>
94
95 <p>
96 Adjust the permissions/rights of the folders used by heartbeat.
97 </p>
98 <pre caption="Fix folder permissions">
99 # <i>chown -R hacluster:haclient /var/lib/pengine</i>
100 # <i>chown -R hacluster:haclient /var/lib/heartbeat/*</i>
101 # <i>chown -R hacluster:haclient /var/run/crm</i>
102 </pre>
103 <note>
104 You may not have all of those folders, as their existence depends on your USE flags and version of heartbeat.
105 </note>
106 </body>
107 </section>
108 </chapter>
109
110 <chapter>
111 <title>Installing pacemaker with heartbeat</title>
112 <section>
113 <body>
114 <p>Emerge pacemaker with heartbeat support.</p>
115 <pre caption="Emerging pacemaker">
116 # <i>echo "sys-cluster/pacemaker -ais heartbeat" >> /etc/portage/package.use</i>
117 # <i>emerge pacemaker</i>
118 </pre>
119
120 <p>
121 Export your current haresource file to a CIB formatted xml.
122 </p>
123
124 <pre caption="Exporting haresource file">
125 # <i>cd /etc/ha.d</i>
126 # <i>/usr/lib/heartbeat/haresources2cib.py --stdout > import.xml</i>
127 </pre>
128
129 <p>
130 Now there are two possibilities depending on whether or not you were running heartbeat-2.x with crm. Check <c>crm on/off</c> in <path>/etc/ha.d/ha.cf</path>.
131 </p>
132
133 </body>
134 </section>
135
136 <section>
137 <title>You were using crm</title>
138 <body>
139
140 <p>
141 You can safely start heartbeat-3.x.
142 </p>
143 <pre caption="Run heartbeat">
144 # <i>/etc/init.d/heartbeat start</i>
145 </pre>
146
147 <p>
148 Now, import your resources from previously exported CIB.
149 </p>
150 <pre caption="Import resources">
151 # <i>cibadmin --replace --obj_type resources --xml_file import.xml</i>
152 </pre>
153 </body>
154 </section>
155
156 <section>
157 <title>You were NOT using crm</title>
158 <body>
159 <p>
160 Use <path>import.xml</path> as the actual CIB of heartbeat-3.x.
161 </p>
162 <pre caption="Import resources">
163 # <i>cp import.xml /var/lib/heartbeat/crm/cib.xml</i>
164 # <i>chown hacluster:root /var/lib/heartbeat/crm/cib.xml</i>
165 # <i>/etc/init.d/heartbeat start</i>
166 </pre>
167
168 </body>
169 </section>
170 </chapter>
171
172 <chapter>
173 <title>Resources</title>
174 <section>
175 <body>
176
177 <ul>
178 <li>
179 The official <uri link="http://www.linux-ha.org/wiki/Documentation">HA-Cluster wiki</uri>
180 </li>
181 <li>
182 The <uri link="http://www.clusterlabs.org">Pacemaker</uri> website.
183 </li>
184 <li>
185 The <uri link="http://www.corosync.org/doku.php">Corosync</uri> wiki.
186 </li>
187 <li>
188 The <uri link="http://www.openais.org/doku.php">OpenAIS</uri> wiki.
189 </li>
190 </ul>
191
192 </body>
193 </section>
194 </chapter>
195
196 <chapter>
197 <title>Acknowledgements</title>
198 <section>
199 <body>
200
201 <p>
202 Thanks <mail link="norman.shulman@×××××××××××.com">Norman Shulman</mail> for testing
203 the procedure described in this document.
204 </p>
205
206 </body>
207 </section>
208 </chapter>
209 </guide>