<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>raid-1 &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/raid-1/</link>
	<description>Feed of posts on WordPress.com tagged "raid-1"</description>
	<pubDate>Tue, 07 Oct 2008 07:32:51 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Mal schnell 'nen Raid einrichten...]]></title>
<link>http://lennaron.wordpress.com/?p=3</link>
<pubDate>Wed, 10 Sep 2008 23:45:32 +0000</pubDate>
<dc:creator>lennaron</dc:creator>
<guid>http://lennaron.pt-br.wordpress.com/2008/09/10/mal-schnell-nen-raid-einrichten/</guid>
<description><![CDATA[Nun bastel ich ja schon seit einigen Tagen an diesem tollen supermodernen Media-PC für meinen alten]]></description>
<content:encoded><![CDATA[<p>Nun bastel ich ja schon seit einigen Tagen an diesem tollen supermodernen Media-PC für meinen alten Herrn, dabei sollte das doch alles so einfach sein, zwei SATA-Festplatten ans Board stecken, im Bios den Raid aktivieren und dann sollte alles klappen.</p>
<p>Aber natürlich weit gefehlt. Eigentlich ist das Asus M2A-VM Moterhboard ein ganz gutes Board, doch die Einrichtung eines simplen Raid 1 (2x 500GB) stellte sich doch als schwieriger heraus als zuerst angenommen.</p>
<p>Zum Glück fand ich nach mehrtägiger Suche und drei Installationen von Windows endlich einen Forenbeitrag, der mich letztendlich auf die Lösung brachte:</p>
<p><a href="http://vip.asus.com/forum/view.aspx?id=20080620222736859&#38;board_id=1&#38;model=M2A-VM&#38;page=1&#38;SLanguage=en-us"></p>
<p>Wenn man erstmal weiß wie's geht ganz einfach. Zu allererst eine Diskette Suchen und formatieren. Dann von der Asus Support-CD booten und den Treiber auf die Diskette installieren (diese Bootfähigkeit der Treiber-CD kann einem beim späteren Installieren der Treiber unter Windows vor Rätsel stellen, also sicher stellen, dass der PC bei der Treiberinstallation nicht von der Support-CD bootet ;-)</p>
<p>Wenn man dann den Treiber auf der Diskette hat, und im Bios SATA "Enabled" und der Raid-Treiber unter Chipset South aktiviert wurde wird der Rest zum Kinderspiel.</p>
<p>Vor der Windows-Installation nun nur noch mit Strg+F ins Raid-Utility-Programm und den Raid konfigurieren. Wichtig dabei, bei mir war schon ein Raid definiert und ich konnte daher anfangs keine Einstellungen vornehmen. Also als aller erstes, alle vorhandenen Raids löschen, mit "3" und dann auf alles "Return" drücken, was dort angezeigt wird.</p>
<p>Dann kann man die Raids nach seinem belieben einrichten, bei mir ließ sich bei einem Raid 1 allerdings nur die Kapazität des ersten Raids für eine Platte einstellen, die zweite wurde dann automatisch mit dem Rest de Speicherplatzes angelegt. Da es sich dabei ja nur um virtuelle Laufwerke handelt, die bei der Windows-Installation sowieso nach belieben partitioniert werden können, sollte das aber kein Problem darstellen.</p>
<p>Wenn die Einrichtung des Raids abgeschlossen ist, kann die Installation von Windows beginnen. Dabei ist gleich am anfang "F6" für die Installation erweiterter Treiber zu drücken, wenn der Installer fragt, mit "S" bestätigen, Diskette einlegen und der Rest sollte sich von alleine ergeben.</p>
<p>Habe zum Test mal eine Festplatte abgeklemmt und nach der Windows Installation beide Platten separat eingebaut, funktioniert super, muss eben nur dabei beachtet werden, im Bios den Raid-Controller zu deaktivieren, da dieser sonst beim Fehlen einer Platte im Raid natürlich Panik bekommt.</p>
<p>Also nochmal ein großes Danke an kuelz, für dieses nette Tutorial, da sollten sich die Autoren der Asus-Handbücher mal ne Scheibe abschneiden.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Western Digital My Book Mirror Edition]]></title>
<link>http://itsinfocomunicacion.wordpress.com/?p=85</link>
<pubDate>Wed, 18 Jun 2008 21:09:24 +0000</pubDate>
<dc:creator>admin</dc:creator>
<guid>http://itsinfocomunicacion.pt-br.wordpress.com/2008/06/18/western-digital-my-book-mirror-edition/</guid>
<description><![CDATA[Western Digital sigue ampliando su extensa gama de discos duros externos. El nuevo miembro de la fam]]></description>
<content:encoded><![CDATA[<p><a href="http://www.gizmos.es/tag/western-digital"><img class="alignleft" style="float:left;border:1px solid black;margin:3px 8px;" src="http://www.gizmos.es/wp-content/uploads/2008/06/western-digital-my-book-mirror-edition.jpg" alt="" width="83" height="103" />Western Digital</a> sigue ampliando su extensa gama de <strong>discos duros externos</strong>. El nuevo miembro de la familia se llama <strong>Western Digital My Book Mirror Edition</strong> y es tan sencillo como oscura es su carcasa externa.</p>
<p><!--more-->En versiones con <strong>1 o 2 TB de capacidad</strong>, el <em>Western Digital My Book Mirror Edition</em> solamente cuenta con un puerto USB como método de conexión y la posibilidad de elegir entre <strong>RAID 0</strong> para conseguir mayores velocidad de escritura/lectura de datos, o <strong>RAID 1</strong> para almacenar los datos por duplicado automáticamente.</p>
<p>Sencillos, seguros y ampliables, porque tanto los <strong>Western Digital My Book Mirror Edition</strong> de 1 TB (209 euros), como los Western Digital My Book Mirror Edition de 2 TB (379 euros), permiten acceder a su interior para cambiar por nosotros mismos los discos duros. ¿Para cuándo un WD My Book Torrent Edition? Estamos seguro que conseguiría un éxito instantáneo de ventas.</p>
<p>Más información: <a href="http://www.westerndigital.com/">Western Digital</a>.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[D-Link DNS-323]]></title>
<link>http://leonardoanceschi.wordpress.com/?p=12</link>
<pubDate>Thu, 03 Apr 2008 14:04:22 +0000</pubDate>
<dc:creator>leonardoanceschi</dc:creator>
<guid>http://leonardoanceschi.pt-br.wordpress.com/2008/04/03/d-link-dns-323/</guid>
<description><![CDATA[Ieri mi è arrivato il D-Link DNS-323. Si tratta di un NAS low-end, che ho acquistato per poter cond]]></description>
<content:encoded><![CDATA[<p><img src="http://leonardoanceschi.wordpress.com/files/2008/04/nas.gif" alt="Nas" align="right" />Ieri mi è arrivato il <a href="http://www.dlink.com/products/?pid=509" target="_blank">D-Link DNS-323</a>. Si tratta di un <a href="http://en.wikipedia.org/wiki/Network-attached_storage" target="_blank">NAS</a> low-end, che ho acquistato per poter condividere i dati su tutti i pc e garantire la ridondanza degli stessi grazie al <a href="http://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_1" target="_blank">raid-1</a>.</p>
<p>Dopo una veloce installazione (molto semplice) mi sono accorto di aver acquistato qualcosa di molto più potente, perché con alcune semplici procedure è possibile trasformare la <a href="http://en.wikipedia.org/wiki/Black_box_%28systems%29" target="_blank">black-box</a> in una <a href="http://en.wikipedia.org/wiki/White_box_%28software_engineering%29" target="_blank">white-box</a> ultra personalizzabile, su cui è possibile installare quasi di tutto.<br />
Si può partire con dei binari precompilati (<a href="http://en.wikipedia.org/wiki/TELNET" target="_blank">Telnet</a>, <a href="http://en.wikipedia.org/wiki/BitTorrent_client" target="_blank">bittorrent</a>, <a href="http://en.wikipedia.org/wiki/Lighttpd" target="_blank">httpd</a>, <a href="http://en.wikipedia.org/wiki/Php" target="_blank">php</a>, <a href="http://en.wikipedia.org/wiki/Subversion_%28software%29" target="_blank">svn</a>, ...) fino ad installare una porta seriale che permette di aggiornarela flash ed installare <a href="http://en.wikipedia.org/wiki/Debian" target="_blank">Debian</a>.</p>
<p>Sono rimasto anche positivamente impressionato dalla ricca configurabilità di alert di diagnostica.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[RAID 1 num sistema Debian já instalado]]></title>
<link>http://snnangola.wordpress.com/?p=335</link>
<pubDate>Fri, 14 Mar 2008 18:19:08 +0000</pubDate>
<dc:creator>snnangola</dc:creator>
<guid>http://snnangola.pt-br.wordpress.com/2008/03/14/raid-1-num-sistema-debian-ja-instalado/</guid>
<description><![CDATA[O barrapunto publicou um artigo que ensina como criar um  raid 1 num sistema Debian sem necessidade ]]></description>
<content:encoded><![CDATA[<p>O <a href="http://barrapunto.com">barrapunto</a> publicou um artigo que ensina como criar um <i> <a href="http://lopezivan.blogspot.com/2008/03/raid-1-en-un-sistema-ya-instalado.html">raid 1 num sistema Debian</a> </i>sem necessidade de reinstalar o sistema ou perder a informação.</p>
<p>E meus senhores, cá entre nós...</p>
<p>RAID 1 hoje é importantissimo.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Your harddrive *will* fail - it's just a question of when]]></title>
<link>http://successfulsoftware.wordpress.com/?p=272</link>
<pubDate>Mon, 04 Feb 2008 17:43:30 +0000</pubDate>
<dc:creator>Andy Brice</dc:creator>
<guid>http://successfulsoftware.net/2008/02/04/your-harddrive-will-fail-its-just-a-question-of-when/</guid>
<description><![CDATA[There are a few certainties in life: death, taxes and harddisk failure. I have no less than 6 failed]]></description>
<content:encoded><![CDATA[<p><img src="http://successfulsoftware.wordpress.com/files/2008/02/disks.jpg" alt="failed harddisks" align="left" hspace="5" vspace="5" />There are a few certainties in life: death, taxes and harddisk failure. I have no less than 6 failed harddisks sitting here on my desk patiently awaiting their appointment with Mr Lump Hammer. 2 Seagates, 3 Maxtors and 1 Western Digital. This equates to roughly one disk failure per year. Perhaps this is not suprising given that I have about 9 working harddisks at the moment spread across various machines. Given the incredible tolerances to which harddisks are manfactured, perhaps it is a miracle harddisks work at all.</p>
<blockquote><p>As an analogy, a magnetic head slider flying over a disk surface with a flying height of 25 nm with a relative speed of 20 meters/second is equivalent to an aircraft flying at a physical spacing of 0.2 µm at 900 kilometers/hour. This is what a disk drive experiences during its operation. -<cite>Magnetic Storage Systems Beyond 2000, George C. Hadjipanayis from <a href="http://en.wikipedia.org/wiki/Harddisk" target="_blank">Wikipedia</a></cite><a href="http://en.wikipedia.org/wiki/Harddisk" target="_blank"> </a></p></blockquote>
<p>We all know we need to back-up our data. But it is a chore that often gets forgotten at the most critical periods. Here are my hints for preparing yourself for that inevitable 'click of death'.</p>
<ul>
<li>Buy an external USB/Firewire harddrive. 500GB drives are ridiculously cheap these days. Personally I don't like back-up tapes due to experiences of them stretching and corrupting data.</li>
<li>Back-up images of the entire OS, not just the data. You can use <a href="http://www.acronis.com/" target="_blank">Acronis TrueImage</a> on Windows and <a href="http://www.shirt-pocket.com/SuperDuper/" target="_blank">SuperDuper </a>on MacOSX. This can save you days restoring your entire development environment and applications from scratch.</li>
<li>Back-up individual files as well as entire OS images. You don't want to have to restore a whole image to retrieve one critical file. Windows Vista and Mac OS X Leopard both have back-up applications built into the OS.</li>
<li>Use a separate machine to your development machine as source code server.</li>
<li>Use a <a href="http://en.wikipedia.org/wiki/RAID1#RAID_1" target="_blank">RAID-1</a> (mirrored) disk on your main development machine[1]. It is worth noting that this actually doubles the likelihood of harddisk failure, but makes the likelihood of a catastrophic failure much lower. Keep an identical 3rd drive on hand to swap in when a drive fails.</li>
<li>Back-ups aren't much use if they get incinerated along with your office in a fire, so store copies off-site. For example you can:
<ul>
<li>ftp copies to your webserver</li>
<li>use a service such as <a href="http://aws.amazon.com/s3" target="_blank">Amazon S3</a> + <a href="http://www.jungledisk.com/" target="_blank">JungleDisk[2] </a>or specialised on-line back services such as <a href="http://mozy.com/" target="_blank">Mozy</a> or <a href="http://www.carbonite.com/" target="_blank">Carbonite</a></li>
<li>give DVDs to friends and family</li>
</ul>
</li>
</ul>
<ul>
<li>Make sure any off-site copies are securely encypted, for example using <a href="http://www.axantum.com/AxCrypt/" target="_blank">Axcrypt</a>.</li>
<li>Automate your back-ups as far as possible. Computers are much better at the dull repetitive stuff.</li>
<li>Test restoring data once in a while. There is not much point backing up data only to find you can't restore it when needed.</li>
</ul>
<p>There are lots of applications for backing up individual files. So many in fact, that no-one has any hope of evaluating them all (marketing tip: don't write another back-up application - really). I also worry that data stored in their various proprietary formats might not be accessible in future due to the vendor going out of business. I find the venerable  DOS <a href="http://support.microsoft.com/kb/q289483/" target="_blank">xcopy </a>adequate for my needs. I run it in a scheduled Windows batch file to automatically <a href="http://www.tech-pro.net/howto_033.html" target="_blank">synch</a> file changes on to my usb harddrive (i:) every night. Here it is in all its glory:</p>
<address><i>XCOPY c:\data i:\data /d /i /s /v /f /y /g /EXCLUDE:exclude.txt</i></address>
<p align="left">The <i>exclude.txt</i> file is used to exclude <a href="http://en.wikipedia.org/wiki/Subversion_%28software%29" target="_blank">subversion </a>folders and intermediate compiler files:</p>
<address><i> \.svn\</i></address>
<address><i> </i>.<i>obj</i></address>
<address><i> .ilk</i></address>
<address><i> .ncb</i></address>
<address><i> .pdb</i></address>
<address><i> .bak</i></address>
<p>Which of the above do I do? Pretty much all of them actually. At least I try, I haven't yet automated the offsite backup. This may seem rather excessive, but it paid dividends last month when <a href="http://upload.wikimedia.org/wikipedia/commons/e/e0/Falling_hare2.jpg" target="_blank">gremlins </a>went on the rampage here in the Oryx Digital office. I had 2 harddrive failures in 2 weeks. The power supply+harddisk+network card on my old XP development machine failed then, while I was in the process of moving everything to my new Vista development machine, one of the RAID-1 disks on the new machine failed.</p>
<p>Things didn't go quite according to plan though. The new RAID-1 box wouldn't boot from either harddisk. I have no idea why.</p>
<p align="center"> <a href="http://successfulsoftware.wordpress.com/files/2008/02/raid1_failure.png" title="raid1"><img src="http://successfulsoftware.wordpress.com/files/2008/02/raid1_failure.thumbnail.png" alt="raid1" /></a></p>
<p>Also the last couple of weekly Acronis image back-ups had failed and I hadn't done anything about it. I had recent back-ups of all the important data, but I faced a day or more reinstalling all the apps I had installed since the last successful image. It took several hours on the phone to Dell technical support and much crawling around on the floor before I could I get the new RAID-1 box to boot off one harddisk. I was then able to rebuild RAID-1 using the spare harddisk I had on standby for such an eventuality. Nothing was lost, apart from my sense of humour.</p>
<p>Dell offered to replace the defective harddisk under warranty, but I declined on the grounds that there is far too much valuable information on this disk (source code, digital certificate keys, customer details etc) for me to entrust it to any third party. Especially given that Dell reserve the right to refurbish the harddisk and send it to someone else. What if they forgot to wipe it? My experiences with courier companies also haven't given me great confidence that the disk would reach Dell. And I didn't want to receive a reburbished disk as a replacement. It just isn't worth relying on a refurb given how cheap new harddisks are. So the harddisk has joined the back of the growing queue to see Mr Lump Hammer.</p>
<p>The availability of cheap harddisks and cheap bandwidth means that it has never been easier to backup your systems. No more fiddling with mag tapes. Of course it is possible that your harddisk will work perfectly until it becomes obselete, but I think it would be very unwise to assume that this will be the case. Don't say I didn't warn you...</p>
<p>Further reading:</p>
<p><a href="http://www.codinghorror.com/blog/archives/001045.html" target="_blank"> What's your backup strategy?</a> (the prolific and always worth reading Jeff Atwood beats me to the punch)</p>
<p><i>[1] RAID-1 is built in to some Intel motherboards and is available as a relatively inexpensive extra from Dell. You may have to ask for it though - it wasn't listed as a standard configuration option when I purchased my Dell Dimension 9200.</i></p>
<p><i>[2] Since I wrote this article I installed the latest version of JungleDisk on my Vista box. On the 3 occasions I have tried to use it it hung Vista to the point where I had to I had to cut the power in order to reboot. I have now uninstalled it. </i></p>
<p align="left">&#160;</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Instalación de DRBD en dos nodos]]></title>
<link>http://netsultan.wordpress.com/2008/01/22/instalacion-de-drbd-en-dos-nodos/</link>
<pubDate>Tue, 22 Jan 2008 13:34:52 +0000</pubDate>
<dc:creator>netsultan</dc:creator>
<guid>http://netsultan.pt-br.wordpress.com/2008/01/22/instalacion-de-drbd-en-dos-nodos/</guid>
<description><![CDATA[Este documento se crea para guiar la instalación de DRBD (Distributed Replicated Block Device), es ]]></description>
<content:encoded><![CDATA[<p>Este documento se crea para guiar la instalación de DRBD (Distributed Replicated Block Device), es un dispositivo de bloque que está diseñado para construir clusters de alta disponibilidad y se hace mediante la replicación de un dispositivo entero de bloque por medio de una red dedicada, como si tuviéramos un RAID 1 de dos discos duros por red.</p>
<p>La versión utilizada para este documento es la 8.2.4 y está probado en kernels 2.6.21.5 y 2.6.23.1 en distribuciones Debian Etch, utilizaremos dos nodos, el primario será Atlantis y el secundario será Dedalos.</p>
<p>Lo primero que haremos será bajarnos en <b><i>ambos servidores</i></b> el paquete drbd-8.2.4 de <a href="http://oss.linbit.com/drbd/8.2/drbd-8.2.4.tar.gz">http://oss.linbit.com/drbd/8.2/drbd-8.2.4.tar.gz</a> , lo colocamos en las fuentes y lo descomprimimos.</p>
<p><span style="font-family:Courier;"> </span></p>
<p><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"># tar xvzf drbd-8.2.4.tar.gz</span></b></font></p>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<p>Ahora compilaremos drbd con ‘make’ y ‘make install’, primero en Atlantis y luego en Dedalos:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/usr/src/drbd-8.2.4/drbd# make</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>Calling toplevel makefile of kernel source tree, which I believe is in</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>KDIR=/lib/modules/2.6.21.5/build</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">test -f ../scripts/adjust_drbd_config_h.sh &#38;&#38; \</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>         </span>KDIR=/lib/modules/2.6.21.5/build O= /bin/bash ../scripts/adjust_drbd_co<span>                                </span><span>             </span>nfig_h.sh</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">/lib/modules/2.6.21.5/build /usr/src/drbd-8.2.4/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">/usr/src/drbd-8.2.4/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>Using unmodified drbd_config.h</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">make -C /lib/modules/2.6.21.5/build SUBDIRS=/usr/src/drbd-8.2.4/drbd<span>  </span>modules</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">make[1]: se ingresa al directorio `/usr/src/linux-2.6.21.5'</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span></span></b><b><span style="font-size:10pt;font-family:Courier;">CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_buildtag.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_bitmap.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_proc.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_worker.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_receiver.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_req.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_actlog.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/lru_cache.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_main.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_strings.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd_nl.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>LD [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>Building modules, stage 2.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>MODPOST 1 modules</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>CC<span>      </span>/usr/src/drbd-8.2.4/drbd/drbd.mod.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>LD [M]<span>  </span>/usr/src/drbd-8.2.4/drbd/drbd.ko</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">make[1]: se sale del directorio `/usr/src/linux-2.6.21.5'</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">mv .drbd_kernelrelease.new .drbd_kernelrelease</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Memorizing module configuration ... done.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/usr/src/drbd-8.2.4/drbd# make install</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">install -d //lib/modules/2.6.21.5/kernel/drivers/block</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">install -m 644 drbd.ko //lib/modules/2.6.21.5/kernel/drivers/block</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">/sbin/depmod -a &#124;&#124; /sbin/depmod -e drbd.ko 2&#62;&#38;1 &#62;/dev/null &#124;&#124; true</span></b></font></pre>
<pre><b><span style="font-size:10pt;font-family:Courier;"> </span></b></pre>
<p>La salida de los comandos se pone para tener una guía mas exacta de lo que se supone que debe ser el resultado. Una vez instalado DRBD, cargamos el modulo DRBD en <b><i>ambos servidores</i></b>:</p>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# modprobe drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# cat /proc/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">version: 8.2.4 (api:88/proto:86-88)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by root@Atlantis, 2008-01-22 13:08:17</span></b></font></pre>
<p><span style="font-family:Courier;"> </span></p>
<p>En esta versión de DRBD no hay un paquete drbdx.y-tools, sino que se encuentra dentro del tar.gz que nos bajamos anteriormente, concretamente en drbd-8.2.4/user. Como nota adicional se deberá instalar el paquete ‘flex’ para la correcta compilación de las utilidades de DRBD en <b><i>ambos servidores</i></b>:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# apt-get install flex</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Leyendo lista de paquetes... Hecho</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Creando Árbol de dependencias... Hecho</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Paquetes sugeridos:</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>bison</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Se instalarán los siguientes paquetes NUEVOS:</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>flex</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">0 actualizados, 1 se instalarán, 0 para eliminar y 75 no actualizados.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Necesito descargar 313kB de archivos.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Se utilizarán 1008kB de espacio de disco adicional después de desempaquetar.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Des:1 ftp://ftp.es.debian.org etch/main flex 2.5.33-11 [313kB]</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Descargados 313kB en 0s (1077kB/s)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Preconfigurando paquetes ...</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Seleccionando el paquete flex previamente no seleccionado.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">(Leyendo la base de datos ...</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">36600 ficheros y directorios instalados actualmente.)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Desempaquetando flex (de .../flex_2.5.33-11_amd64.deb) ...</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Configurando flex (2.5.33-11) ...</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# cd /usr/src/drbd-8.2.4/user</span></b><span style="font-family:Courier;"></span></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/usr/src/drbd-8.2.4/user# make</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">flex -s -odrbdadm_scanner.c drbdadm_scanner.fl</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd<span>   </span>-c -o drbdadm_scanner.o drbdadm_scanner.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd<span>   </span>-c -o drbdadm_parser.o drbdadm_parser.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd<span>   </span>-c -o drbdadm_main.o drbdadm_main.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd<span>   </span>-c -o drbdadm_adjust.o drbdadm_adjust.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd<span>   </span>-c -o drbdtool_common.o drbdtool_common.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd<span>   </span>-c -o drbdadm_usage_cnt.o drbdadm_usage_cnt.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">cp ../drbd/drbd_buildtag.c drbd_buildtag.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd<span>   </span>-c -o drbd_buildtag.o drbd_buildtag.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -o drbdadm drbdadm_scanner.o drbdadm_parser.o drbdadm_main.o drbdadm_adjust.o drbdtool_common.o drbdadm_usage_cnt.o drbd_buildtag.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd -fno-strict-aliasing<span>   </span>-c -o drbdmeta.o drbdmeta.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">flex -s -odrbdmeta_scanner.c drbdmeta_scanner.fl</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd -fno-strict-aliasing<span>   </span>-c -o drbdmeta_scanner.o drbdmeta_scanner.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -o drbdmeta drbdmeta.o drbdmeta_scanner.o drbdtool_common.o drbd_buildtag.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd -I/lib/modules/2.6.21.5/build/include -fno-strict-aliasing<span>   </span>-c -o drbdsetup.o drbdsetup.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">cp ../drbd/drbd_strings.c drbd_strings.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -g -O2 -c -W -Wall -I../drbd -I/lib/modules/2.6.21.5/build/include -fno-strict-aliasing<span>   </span>-c -o drbd_strings.o drbd_strings.c</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">gcc -o drbdsetup drbdsetup.o drbdtool_common.o drbd_buildtag.o drbd_strings.o</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/usr/src/drbd-8.2.4/user# make install</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">install -d /sbin/</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">if getent group haclient &#62; /dev/null 2&#62; /dev/null ; then<span>        </span>\</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>                </span>install -g haclient -m 4750 drbdsetup /sbin/ ;<span>  </span>\</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>                </span>install -g haclient -m 4750 drbdmeta /sbin/ ;<span>   </span>\</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>                </span>install -m 755 drbdadm /sbin/ ;<span>         </span>\</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>else<span>                                                            </span>\</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>                </span>install -m 755 drbdsetup /sbin/ ;<span>               </span>\</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>                </span>install -m 755 drbdmeta /sbin/ ;<span>                </span>\</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>                </span>install -m 755 drbdadm /sbin/ ;<span>                 </span>\</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>fi</span></b></font></pre>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<p>Ahora editamos el archivo /etc/drbd.conf, en <b><i>ambos servidores</i></b> ha de ser exactamente el mismo. Para saber qué parámetros poner ir a <a href="http://www.drbd.org/fileadmin/drbd/doc/8.0.2/en/drbd.conf.html">http://www.drbd.org/fileadmin/drbd/doc/8.0.2/en/drbd.conf.html</a> , pero bastará con una configuración sencilla como ésta:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">resource data {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>protocol C;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>startup {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>degr-wfc-timeout 120;<span>    </span># 2 minutes.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>disk {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">on-io-error<span>   </span>detach;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>net {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span></span></b><b><span style="font-size:10pt;font-family:Courier;">}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>syncer {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>rate 100M;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>al-extents 257;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>on Atlantis {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>device<span>     </span>/dev/drbd0;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>disk<span>       </span>/dev/sdb1;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>address<span>    </span>10.0.0.1:7788;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>meta-disk<span>  </span>internal;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>on Dedalos {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>device<span>    </span>/dev/drbd0;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>disk<span>      </span>/dev/sdb1;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">address<span>   </span>10.0.0.2:7788;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>meta-disk internal;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">}</span></b></font></pre>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<p><span style="font-family:Courier;"> </span></p>
<p>Nota: Se han puesto las direcciones en clase A puesto que se va a utilizar una comunicación local a través de cable cruzado en vez de usar( y por consiguiente, saturar) las direcciones públicas de ambos servidores.</p>
<p>Ahora inicializamos el area de metadatos para drbd en ambos servidores, el uso debido es ‘drbdadm create-md nombre_del_recurso’ en nuestro caso:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# drbdadm create-md data</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>                </span>--== This is a new installation of DRBD ==--</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Please take part in the global DRBD usage count at http://usage.drbd.org.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">The conter works completely anonymous. A random number gets created on</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">you machine, and that randomer number (as identifier for this machine) and</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">DRBD's version number are sent to usage.drbd.org.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">The benifits for you are:</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span>* As a respose to your data, the server (usage.drbd.org) will tell you</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>   </span>how many users before you have installed this version (8.2.4).</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span>* With a high counter the DRBD developers have a high motivation to</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>   </span>continue development of the software.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=5198341406454345055&#38;git=fc00c6e<span>                                             </span>00a1b6039bfcebe37afa3e7e28dbd92fa</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">In case you want to participate but know that this machines is firewalled</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">simply issue the query string with your favourite web browser or wget.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">You can control all this by setting 'usage-count' in your drbd.conf.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">* You may enter a free form comment about your machine, that gets</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>used on usage.drbd.org instead of the big random number.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">* Enter 'no' to opt out.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">* To count this node without comment, just press [RETURN]</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>--==<span>  </span>Thank you for participating in the global usage survey<span>  </span>==--</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">The server's response is:</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">you are the 157th user to install this version</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">In the future drbdadm will only contact usage.drbd.org when you update</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">DRBD or when you use 'drbdadm create-md'. Of course it will continue</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">to ask you for confirmation as long as 'usage-count' is at its default</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">value of 'ask'.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Just press [enter] to continue:</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">v08 Magic number not found</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">v07 Magic number not found</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">v07 Magic number not found</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">v08 Magic number not found</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Writing meta data...</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">initialising activity log</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">NOT initialized bitmap</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">New drbd meta data block sucessfully created.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>                </span>--== Creating metadata ==--</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">As with nodes we count the total number of devices mirrored by DRBD at</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">at http://usage.drbd.org.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">The counter works completely anonymous. A random number gets created for</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">this device, and that randomer number and the devices size will be sent.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">http://usage.drbd.org/cgi-bin/insert_usage.pl?nu=5198341406454345055&#38;ru=88757185<span>                                             </span>88670100790&#38;rs=400085812224</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Enter 'no' to opt out, or just press [return] to continue:</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Success</span></b></font></pre>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<p>Procedemos ahora a inicializar los recursos detallados en el archivo de configuración en <b><i>ambos servidores</i></b>. Es MUY IMPORTANTE tener en cuenta que los discos utilizados para el RAID 1 por red han de estar desmontados:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# drbdadm up all</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# cat /proc/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">version: 8.2.4 (api:88/proto:86-88)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by root@Atlantis, 2008-01-21 10:34:37</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span>0: cs:WFConnection st:Secondary/Unknown ds:Inconsistent/DUnknown C r---</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>       </span><span> </span></span></b><b><span style="font-size:10pt;font-family:Courier;">resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Dedalos:/# drbdadm up all</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Dedalos:/# cat /proc/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">version: 8.2.4 (api:88/proto:86-88)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by root@Dedalos, 2008-01-21 10:45:20</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span>0: cs:Connected st:Secondary/Secondary ds:Inconsistent/Inconsistent C r---</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span></span></b><b><span style="font-size:10pt;font-family:Courier;">resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<p>Como se observa, después de haber inicializado los recursos en los dos nodos, el estado de drbd es <i>Secondary/Secondary.</i> Para nombrar uno de ellos como primario deberemos hacer <b><i>sólo en el servidor primario</i></b>:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# drbdsetup /dev/drbd0 primary -o</span></b></font></pre>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<p>Ésta es la orden que hay que darle, puesto que en la versión utilizada aquí está obsoleto el comando "drbdadm --do-what-I-say primary all". Si observamos la salida de /var/log/kern.log veremos lo siguiente:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: role( Secondary -&#62; Primary ) disk( Inconsistent -&#62; UpToDate )</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: Forced to conisder local data as UpToDate!</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: Creating new current UUID</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: Writing meta data super block now.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: Becoming sync source due to disk states.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: Writing meta data super block now.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: writing of bitmap took 41 jiffies</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: 372 GB (97674210 bits) marked out-of-sync by on disk bit-map.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: Writing meta data super block now.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: conn( Connected -&#62; WFBitMapS )</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: conn( WFBitMapS -&#62; SyncSource )</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: Began resync as SyncSource (will sync 390696840 KB [97674210 bits set]).</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis kernel: drbd0: Writing meta data super block now.</span></b></font></pre>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<p>El tiempo de sincronización de los dos discos duros fisicos depende del tamaño de éstos y de la tasa de transferencia que soporte la red local a la que estén comunicados, aun así tardará un buen rato. Para ver el progreso de la sincronización:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# cat /proc/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">version: 8.2.4 (api:88/proto:86-88)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by root@Atlantis, 2008-01-21 10:34:37</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span>0: cs:SyncSource st:Primary/Secondary ds:UpToDate/Inconsistent C r---</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">ns:46842688 nr:0 dw:0 dr:46842688 al:0 bm:2859 lo:0 pe:0 ua:0 ap:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span></span></b><b><span style="font-size:10pt;font-family:Courier;">[=&#62;..................] sync'ed: 12.0% (335795/381539)M</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>finish: 8:26:31 speed: 11,256 (10,240) K/sec</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>resync: used:0/31 hits:2924808 misses:2860 starving:0 dirty:0 changed:2860</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<p><b><span style="font-size:10pt;font-family:Courier;"> </span></b></p>
<p>Nótese la diferencia del comando si se ejecuta en Atlantis o en Dedalos, cambia el orden de referencia de status:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Dedalos:/# cat /proc/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">version: 8.2.4 (api:88/proto:86-88)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by root@Dedalos, 2008-01-21 10:45:20</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span>0: cs:SyncTarget st:Secondary/Primary ds:Inconsistent/UpToDate C r---</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">ns:0 nr:46883648 dw:46883648 dr:0 al:0 bm:2861 lo:0 pe:0 ua:0 ap:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span></span></b><b><span style="font-size:10pt;font-family:Courier;">[=&#62;..................] sync'ed: 12.1% (335755/381539)M</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>finish: 8:31:37 speed: 11,040 (10,240) K/sec</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>resync: used:0/31 hits:2927366 misses:2862 starving:0 dirty:0 changed:2862</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<p><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></p>
<p><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></p>
<p>Una vez que se haya terminado el proceso de sincronización de los dos discos físicos por red, repetimos la ultima orden y nos saldrá lo siguiente:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# cat /proc/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">version: 8.2.4 (api:88/proto:86-88)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by root@Atlantis, 2008-01-21 10:34:37</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span>0: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r---</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">ns:44 nr:0 dw:44 dr:478 al:0 bm:0 lo:0 pe:0 ua:0 ap:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span></span></b><b><span style="font-size:10pt;font-family:Courier;">resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>act_log: used:0/257 hits:11 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<p><font color="#ff0000"><span style="font-family:Courier;"> </span></font></p>
<p>Ahora solo falta montar el disco en el nodo primario, pero OJO! No hay que montar la partición física sino la ‘virtual’, es decir /dev/drbd0, no /dev/hdb1 o /dev/sdb1. Con ‘df -h’ comprobaremos que efectivamente está montado:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# mount /dev/drbd0 /data</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# df -h</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">S.ficheros<span>          </span>TamaÃ±o Usado<span>  </span>Disp Uso% Montado en</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">/dev/sda1<span>             </span>179G<span>  </span>2,3G<span>  </span>168G<span>   </span>2% /</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">tmpfs<span>                 </span>2,0G<span>     </span>0<span>  </span>2,0G<span>   </span>0% /lib/init/rw</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">udev<span>                   </span>10M<span>   </span>72K<span>   </span>10M<span>   </span>1% /dev</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">tmpfs<span>                 </span>2,0G<span>     </span>0<span>  </span>2,0G<span>   </span>0% /dev/shm</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">/dev/drbd0<span>            </span>367G<span>  </span>723M<span>  </span>348G<span>   </span>1% /data</span></b></font></pre>
<p><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></p>
<p><font color="#ff0000"><span style="font-family:Courier;"> </span></font></p>
<p><font color="#ff0000"><span style="font-family:Courier;"> </span></font></p>
<p><b><i><span style="font-size:16pt;">PUNTO IMPORTANTE: REINICIO DE</span></i></b></p>
<p><b><i><span style="font-size:16pt;">LOS NODOS QUE POSEEN DRBD</span></i></b></p>
<p><b><i><span style="font-size:16pt;"> </span></i></b></p>
<p>Si crees que ahora que tienes sincronizado los discos duros de los dos nodos por red puedes apagar o reiniciar los nodos con un simple ‘init 0’ o ‘init 6’... estás equivocado, si haces esto, puedes corromper los datos de ambos discos duros o quizá peor, los puedes dejar inutilizados físicamente. No digo, que no se pueda a hacer con un simple ‘init 6’, lo que digo es que no es ni recomendable ni seguro.</p>
<p>La secuencia de comandos a seguir es la siguiente:</p>
<p><b><i>En el nodo primario</i></b></p>
<p><span>umount /dev/drbd0</span></p>
<p>df -h (no debería verse /dev/drbd0)</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# df -h</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">S.ficheros<span>          </span>TamaÃ±o Usado<span>  </span>Disp Uso% Montado en</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">/dev/sda1<span>             </span>179G<span>  </span>2,3G<span>  </span>168G<span>   </span>2% /</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">tmpfs<span>                 </span>2,0G<span>     </span>0<span>  </span>2,0G<span>   </span>0% /lib/init/rw</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">udev<span>                   </span>10M<span>   </span>72K<span>   </span>10M<span>   </span>1% /dev</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">tmpfs<span>              </span><span>   </span>2,0G<span>     </span>0<span>  </span>2,0G<span>   </span>0% /dev/shm</span></b></font></pre>
<p><font color="#ff0000"><span style="font-family:Courier;"> </span></font></p>
<p>drbdadm secondary all (se comprueba que el status de los discos son ambos secundarios)</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# drbdadm secondary all</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# cat /proc/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">version: 8.2.4 (api:88/proto:86-88)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by root@Atlantis, 2008-01-21 10:34:37</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span>0: cs:Connected st:Secondary/Secondary ds:UpToDate/UpToDate C r---</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">ns:52 nr:0 dw:52 dr:715 al:0 bm:2 lo:0 pe:0 ua:0 ap:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span></span></b><b><span style="font-size:10pt;font-family:Courier;">resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>act_log: used:0/257 hits:13 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<p><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></p>
<p><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></p>
<p><b><i><span>En ambos nodos</span></i></b></p>
<p>drbdadm down all</p>
<p><b><span style="font-size:10pt;"> </span></b></p>
<pre><font color="#ff0000"><code><b><span style="font-size:10pt;">Atlantis:/# drbdadm down all</span></b></code></font></pre>
<pre><font color="#ff0000"><code><b><span style="font-size:10pt;">Atlantis:/# cat /proc/drbd</span></b></code></font></pre>
<pre><font color="#ff0000"><code><b><span style="font-size:10pt;">version: 8.2.4 (api:88/proto:86-88)</span></b></code></font></pre>
<pre><font color="#ff0000"><code><b><span style="font-size:10pt;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by root@Atlantis, 2008-01-21 10:34:37</span></b></code></font></pre>
<pre><font color="#ff0000"><code><b><span style="font-size:10pt;"><span> </span>0: cs:Unconfigured</span></b></code></font></pre>
<p><font color="#ff0000"><code><span style="font-family:'Times New Roman';"> </span></code></font></p>
<p>rmmod drbd</p>
<p>Con estos dos últimos comandos la salida de /proc/drbd debería ser la siguiente:<code><span style="font-family:'Times New Roman';"></span></code></p>
<p><code><span> </span></code></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# rmmod drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# cat /proc/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">cat: /proc/drbd: No existe el fichero o el directorio</span></b></font></pre>
<p><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></p>
<p>Ahora Atlantis y Dedalos(Primario y Secundario) están listos para reiniciarse sin problemas. En cuanto arranquen la secuencia de comandos sería:</p>
<p><b><i>En ambos nodos</i></b></p>
<p><b><i> </i></b></p>
<p>modprobe drbd</p>
<p>drbdadm up all (esto hace que ambos nodos se inicialicen como secundarios)</p>
<p><b><i>En el nodo primario</i></b></p>
<p><span>drbdadm primary all</span></p>
<p><span>mount /dev/drbd0 /data</span></p>
<p><span> </span></p>
<p>Se comprueba que todo está bien y ha de quedar idéntico a esto:</p>
<p><span style="font-family:Courier;"> </span></p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# cat /proc/drbd</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">version: 8.2.4 (api:88/proto:86-88)</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by root@Atlantis, 2008-01-22 13:08:17</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span>0: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r---</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">ns:4 nr:0 dw:4 dr:237 al:0 bm:0 lo:0 pe:0 ua:0 ap:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span></span></b><b><span style="font-size:10pt;font-family:Courier;">resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>        </span>act_log: used:0/257 hits:1 misses:0 starving:0 dirty:0 changed:0</span></b></font></pre>
<p><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> </span></b></font></p>
<p>Así es como se hace un reinicio limpio de los nodos.</p>
<p><b><i><span style="font-size:16pt;">ANEXO: DRBD CON </span></i></b></p>
<p><b><i><span style="font-size:16pt;">VARIOS RECURSOS</span></i></b></p>
<p>Googleando por internet nos encontramos con que hay escasez de manuales o HOWTO's que traten sobre la sincronización de varios discos, no solo de un disco en cada servidor, sino varios.</p>
<p>El funcionamiento de DRBD permite crear un RAID 1 por cada par de discos. En ningún caso (por lo menos que yo conozca)  se pueden sincronizar los cuatro discos a la vez, sino que deberán sincronizarse por pares. Para ello, modificamos el archivo /etc/drbd.conf editado anteriormente y le añadimos un nuevo recurso llamado "data2", quedando así:</p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">resource data {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>protocol C;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>startup {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>degr-wfc-timeout 120;<span>    </span># 2 minutes.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>disk {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">on-io-error<span>   </span>detach;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>net {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span></span></b><b><span style="font-size:10pt;font-family:Courier;">}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>syncer {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>rate 100M;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>al-extents 257;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>on Atlantis {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>device<span>     </span>/dev/drbd0;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>disk<span>       </span>/dev/sdb1;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>address<span>    </span>10.0.0.1:7788;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>meta-disk<span>  </span>internal;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>on Dedalos {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>device<span>    </span>/dev/drbd0;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>disk<span>      </span>/dev/sdb1;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">address<span>   </span>10.0.0.2:7788;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>meta-disk internal;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">}</span></b> <b><span style="font-size:10pt;font-family:Courier;">resource data2 {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>protocol C;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>startup {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>degr-wfc-timeout 120;<span>    </span># 2 minutes.</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>disk {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">on-io-error<span>   </span>detach;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>net {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span></span></b><b><span style="font-size:10pt;font-family:Courier;">}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>syncer {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>rate 100M;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>al-extents 257;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>on Atlantis {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>device<span>     </span>/dev/drbd1;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>disk<span>       </span>/dev/sdc1;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>address<span>    </span>10.0.0.1:7789;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>meta-disk<span>  </span>internal;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span> </span></span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>on Dedalos {</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>device<span>    </span>/dev/drbd1;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>disk<span>      </span>/dev/sdc1;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span></span></b><b><span style="font-size:10pt;font-family:Courier;">address<span>   </span>10.0.0.2:7789;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>    </span>meta-disk internal;</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"><span>  </span>}</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">}</span></b></font></pre>
<p>Como se observa, se ha nombrado otro dispositivo virtual como /dev/drbd1, se usan los discos /dev/sdc1 y lo más importante, se utiliza la misma dirección IP pero con distinto puerto, esto quiere decir que <b>no hace falta interfaces adicionales por cada recurso añadido</b>, si bien puede ser recomendable en caso de disponer de interfaces Ethernet de sobra.</p>
<p>Ahora se procederá a la sincronización del nuevo par de discos con las mismas órdenes que se usaron para sincronizar el primer par de discos, a saber:</p>
<p>1) Se desmontan los dispositivos /dev/sdc1 de cada servidor (si estuvieran montados)</p>
<p>2) En ambos nodos creamos una nueva área de metadatos en los discos:</p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">drbdadm create-md data2</span></b></font></pre>
<p>3) En ambos nodos levantamos el recurso "data2"</p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">drbdadm up data2</span></b></font></pre>
<p>4) En el nodo primario indicamos que va a ser el primario del nuevo dispositivo /dev/drbd1</p>
<p><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">drbdsetup /dev/drbd1 primary -o</span></b></font></p>
<p>5) Comprobamos que el segundo par de discos se estan sincronizando:</p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# cat /proc/drbd</span></b> <b><span style="font-size:10pt;font-family:Courier;">version: </span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">8.2.4 (api:88/proto:86-88)</span></b> <b><span style="font-size:10pt;font-family:Courier;"></span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">GIT-hash: fc00c6e00a1b6039bfcebe37afa3e7e28dbd92fa build by</span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">root@Atlantis, 2008-01-22 13:08:17</span></b> <b><span style="font-size:10pt;font-family:Courier;"> </span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">0: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C </span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">  r---</span></b> <b><span style="font-size:10pt;font-family:Courier;">    ns:180 nr:0 dw:180 dr:540822 al:3 bm:0 lo:0 pe:0 </span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">  ua:0 ap:0</span></b> <b><span style="font-size:10pt;font-family:Courier;">        </span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">  resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0</span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">  act_log: used:0/257 hits:42 misses:3 starving:0 dirty:0 changed:3</span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">1: cs:SyncSource st:Primary/Secondary ds:UpToDate/Inconsistent C</span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> r---</span></b> <b><span style="font-size:10pt;font-family:Courier;">    ns:184973828 nr:0 dw:0 dr:184981440 al:0 bm:11289 lo:1 </span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">pe:261 ua:238 ap:0</span></b> <b><span style="font-size:10pt;font-family:Courier;"></span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> [========&#62;...........] sync'ed: 47.4% (200909/381539)M</span></b> <b><span style="font-size:10pt;font-family:Courier;">        </span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">finish: 0:40:49 speed: 83,808 (63,888) K/sec</span></b> <b><span style="font-size:10pt;font-family:Courier;">        </span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">resync: used:2/31 hits:11549551 misses:11291 starving:0 dirty:0</span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> changed:11291</span></b> <b><span style="font-size:10pt;font-family:Courier;"> act_log: used:0/257 hits:0 misses:0 starving:0</span></b></font> <font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;"> dirty:0 changed:0</span></b> </font><b><span style="font-size:10pt;font-family:Courier;"></span></b></pre>
<p>Como se observa, hay un recurso "0", que se sincronizó anteriormente, y un recurso "1", que es el que se esta sincronizando. Tras terminar la sincronización del segundo par de discos, comprobaremos que se puede acceder sin problemas:</p>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# mount /dev/drbd1 /data2</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">Atlantis:/# df -h</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">S.ficheros<span>          </span>TamaÃ±o Usado<span>  </span>Disp Uso% Montado en</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">/dev/sda1<span>             </span>179G<span>  </span>2,3G<span>  </span>168G<span>   </span>2% /</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">tmpfs<span>                 </span>2,0G<span>     </span>0<span>  </span>2,0G<span>   </span>0% /lib/init/rw</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">udev<span>                   </span>10M<span>   </span>72K<span>   </span>10M<span>   </span>1% /dev</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">tmpfs<span>                 </span>2,0G<span>     </span>0<span>  </span>2,0G<span>   </span>0% /dev/shm</span></b></font></pre>
<pre><font color="#ff0000"><b><span style="font-size:10pt;font-family:Courier;">/dev/drbd0<span>            </span>367G<span>  </span>723M<span>  </span>348G<span>   </span>1% /data</span></b> </font> <font color="#ff0000"></font><b><span style="font-size:10pt;font-family:Courier;"><font color="#ff0000">/dev/drbd1<span>            </span>367G<span>  </span>723M<span>  </span>348G<span>   </span>1% /data2</font></span></b></pre>
<p>Espero que este sencillo manual haya ayudado a quien lo haya leido, con mi experiencia he de decir que DRBD es mucho más sencillo y versatil que rsync para sincronizar los datos de dos servidores.</p>
<p>PD: Por lo menos hay una entrada en español de Google de DRBD que no tiene que ver con la serie de RBD, hasta en la sopa...</p>
<p>PD2: Por los cojones esto es WYSIWYG -.-'  si hay cosas que no se ven, es por wordpress. Que yo soy de sistemas, no un diseñador.</p>
]]></content:encoded>
</item>

</channel>
</rss>
