<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pt-BR">
	<id>https://wiki.slacam.com.br/index.php?action=history&amp;feed=atom&amp;title=CriarDRBDCentos</id>
	<title>CriarDRBDCentos - Histórico de revisão</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.slacam.com.br/index.php?action=history&amp;feed=atom&amp;title=CriarDRBDCentos"/>
	<link rel="alternate" type="text/html" href="https://wiki.slacam.com.br/index.php?title=CriarDRBDCentos&amp;action=history"/>
	<updated>2026-11-17T00:50:12Z</updated>
	<subtitle>Histórico de revisões para esta página neste wiki</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.slacam.com.br/index.php?title=CriarDRBDCentos&amp;diff=777&amp;oldid=prev</id>
		<title>Felipe em 15h58min de 19 de janeiro de 2014</title>
		<link rel="alternate" type="text/html" href="https://wiki.slacam.com.br/index.php?title=CriarDRBDCentos&amp;diff=777&amp;oldid=prev"/>
		<updated>2014-01-19T15:58:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;pt-BR&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Edição anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Edição das 15h58min de 19 de janeiro de 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Linha 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linha 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;ads media=goo5/&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== DRBD – How to configure DRBD on CentOS 6 Mitch  May 30, 2013  CentOS, Disk, High Availability, Server  5 Comments ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== DRBD – How to configure DRBD on CentOS 6 Mitch  May 30, 2013  CentOS, Disk, High Availability, Server  5 Comments ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Felipe</name></author>
	</entry>
	<entry>
		<id>https://wiki.slacam.com.br/index.php?title=CriarDRBDCentos&amp;diff=776&amp;oldid=prev</id>
		<title>Machado: Criou página com &#039;== DRBD – How to configure DRBD on CentOS 6 Mitch  May 30, 2013  CentOS, Disk, High Availability, Server  5 Comments ==  DRBD® refers to block devices designed as a buildin...&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.slacam.com.br/index.php?title=CriarDRBDCentos&amp;diff=776&amp;oldid=prev"/>
		<updated>2014-01-13T17:52:48Z</updated>

		<summary type="html">&lt;p&gt;Criou página com &amp;#039;== DRBD – How to configure DRBD on CentOS 6 Mitch  May 30, 2013  CentOS, Disk, High Availability, Server  5 Comments ==  DRBD® refers to block devices designed as a buildin...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== DRBD – How to configure DRBD on CentOS 6 Mitch  May 30, 2013  CentOS, Disk, High Availability, Server  5 Comments ==&lt;br /&gt;
&lt;br /&gt;
DRBD® refers to block devices designed as a building block to form high availability (HA) clusters - Distributed Replicated Block Device This is done by mirroring a whole block device via an assigned network. Distributed Replicated Block Device can be understood as network based raid-1.&lt;br /&gt;
&lt;br /&gt;
So, Distributed Replicated Block Device is actually a network based RAID 1. You are configuring DRBD on your system if you:&lt;br /&gt;
&lt;br /&gt;
need to secure data on certain disk and are therefore mirroring your data to another machine via network.&lt;br /&gt;
configuring High Availability cluster or service.&lt;br /&gt;
&lt;br /&gt;
REQUIREMENTS:&lt;br /&gt;
&lt;br /&gt;
additional disk for synchronization on BOTH MACHINES (preferably same size)&lt;br /&gt;
network connectivity between machines&lt;br /&gt;
working DNS resolution (can fix with /etc/hosts file)&lt;br /&gt;
NTP synchronized times on both nodes&lt;br /&gt;
I’ve had problems running drbd84 on CentOS 6.4 running kernel 2.6.32-358.6.1.el6.i686 so i used drbd83 package. Tell me how it works for you…&lt;br /&gt;
&lt;br /&gt;
Let’s start our DRBD CentOS 6.x guide.&lt;br /&gt;
&lt;br /&gt;
1. BOTH MACHINES: Install ELRepo repository on your system.&lt;br /&gt;
&lt;br /&gt;
 [root@foo1 ~]/bin/rpm -ivh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm&lt;br /&gt;
&lt;br /&gt;
2. BOTH MACHINES: Install Distributed Replicated Block Device utils and kmod packages from ELRepo (choose the version you prefer – drbd83 or drbd84  – i’ve had problems with drbd84 on kernel 2.6.32-358.6.1.el6.i686).&lt;br /&gt;
&lt;br /&gt;
 [root@foo1 ~]/usr/bin/yum install -y kmod-drbd83 drbd83-utils&lt;br /&gt;
&lt;br /&gt;
3. BOTH MACHINES: Insert drbd module manually or just reboot both machines.&lt;br /&gt;
&lt;br /&gt;
 [root@foo1 ~]/sbin/modprobe drbd&lt;br /&gt;
&lt;br /&gt;
4. BOTH MACHINES: Create the Distributed Replicated Block Device resource file (/etc/drbd.d/disk1.res) and transfer it to the other machine (these files need to be exactly the same on both machines!).&lt;br /&gt;
&lt;br /&gt;
 /etc/drbd.d/disk1.res&lt;br /&gt;
 &lt;br /&gt;
 resource disk1&lt;br /&gt;
 {&lt;br /&gt;
 startup {&lt;br /&gt;
 wfc-timeout 30;&lt;br /&gt;
 outdated-wfc-timeout 20;&lt;br /&gt;
 degr-wfc-timeout 30;&lt;br /&gt;
 }&lt;br /&gt;
 net {&lt;br /&gt;
 cram-hmac-alg sha1;&lt;br /&gt;
 shared-secret sync_disk;&lt;br /&gt;
 }&lt;br /&gt;
 syncer {&lt;br /&gt;
 rate 100M;&lt;br /&gt;
 verify-alg sha1;&lt;br /&gt;
 }&lt;br /&gt;
 on foo1.geekpeek.net {&lt;br /&gt;
 device minor 1;&lt;br /&gt;
 disk /dev/sdb;&lt;br /&gt;
 address 192.168.1.100:7789;&lt;br /&gt;
 meta-disk internal;&lt;br /&gt;
 }&lt;br /&gt;
 on foo2.geekpeek.net {&lt;br /&gt;
 device minor 1;&lt;br /&gt;
 disk /dev/sdb;&lt;br /&gt;
 address 192.168.1.101:7789;&lt;br /&gt;
 meta-disk internal;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
5. BOTH MACHINES: Make sure that DNS resolution is working as expected! To quickly fix DNS resolution add IP addresses FQDN to /etc/hosts on both machines as follows:&lt;br /&gt;
&lt;br /&gt;
 /etc/hosts&lt;br /&gt;
&lt;br /&gt;
 192.168.1.100 foo1 foo1.geekpeek.net&lt;br /&gt;
 192.168.1.101 foo2 foo2.geekpeek.net&lt;br /&gt;
&lt;br /&gt;
6. BOTH MACHINES: Make sure that both machines are using NTP for time synchronization! To quickly fix this add an entry to your /etc/crontab file as follows and choose your NTP sync server:&lt;br /&gt;
&lt;br /&gt;
 /etc/crontab&lt;br /&gt;
&lt;br /&gt;
 1 * * * * root ntpdate your.ntp.server&lt;br /&gt;
&lt;br /&gt;
7. BOTH MACHINES: Initialize the DRBD meta data storage:&lt;br /&gt;
&lt;br /&gt;
 [root@foo1 ~]/sbin/drbdadm create-md disk1&lt;br /&gt;
&lt;br /&gt;
8. BOTH MACHINES: Start the Distributed Replicated Block Device service on both nodes:&lt;br /&gt;
&lt;br /&gt;
 [root@foo1 ~]/etc/init.d/drbd start&lt;br /&gt;
&lt;br /&gt;
9. On the node you wish to make a PRIMARY node run drbdadm command:&lt;br /&gt;
&lt;br /&gt;
 [root@foo1 ~]/sbin/drbdadm — –overwrite-data-of-peer primary disk1&lt;br /&gt;
&lt;br /&gt;
10. Wait for the Distributed Replicated Block Device disk initial synchronization to complete (100%) and check to confirm you are on primary node:&lt;br /&gt;
&lt;br /&gt;
[root@foo1 ~]cat /proc/drbd&lt;br /&gt;
 version: 8.3.15 (api:88/proto:86-97)&lt;br /&gt;
 GIT-hash: 0ce4d235fc02b5c53c1c52c53433d11a694eab8c build by phil@Build32R6, 2012-12-20 20:23:49&lt;br /&gt;
 1: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r—n-&lt;br /&gt;
 ns:1060156 nr:0 dw:33260 dr:1034352 al:14 bm:62 lo:9 pe:78 ua:64 ap:0 ep:1 wo:f oos:31424&lt;br /&gt;
 [==================&amp;gt;.] sync’ed: 97.3% (31424/1048508)K&lt;br /&gt;
 finish: 0:00:01 speed: 21,240 (15,644) K/sec&lt;br /&gt;
 [root@foo1 ~]# cat /proc/drbd&lt;br /&gt;
 version: 8.3.15 (api:88/proto:86-97)&lt;br /&gt;
 GIT-hash: 0ce4d235fc02b5c53c1c52c53433d11a694eab8c build by phil@Build32R6, 2012-12-20 20:23:49&lt;br /&gt;
 1: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r—–&lt;br /&gt;
 ns:1081628 nr:0 dw:33260 dr:1048752 al:14 bm:64 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0&lt;br /&gt;
&lt;br /&gt;
11. Create desired filesystem on Distributed Replicated Block Device device:&lt;br /&gt;
&lt;br /&gt;
 [root@foo1 ~]/sbin/mkfs.ext4 /dev/drbd1&lt;br /&gt;
&lt;br /&gt;
You can now mount DRBD device on your primary node! Want to learn how to manage DRBD from command line? Read “DRBD Management and Basic Command Usage on CentOS 6” post.&lt;/div&gt;</summary>
		<author><name>Machado</name></author>
	</entry>
</feed>