Monkey Space 2012 Is Over
A few weeks back I had the opportunity to attend the MonkeySpace conference.

For all of you that missed it, I highly recommend planning on attending it next year. If you did miss it, this year is not completely lost as the awesome folks over at Monkey Square are planning on making the videos of the sessions available at some future date.
I had a great time meeting some awesome people and attending some great sessions. There are several really exciting technologies out there that are worth following discussed at the conference.
Here is a bit of a recap of some of the sessions that I attended.
First, The top secret keynote that Miguel De Icaza delivered. The major topic was the release of Mono 3.0 and the future of the ecosystem. Some of the really cool features of Mono 3.0 is full c# 5.0, System.Net.Http, TPL DataFlow, Code Contracts, entity framework, razor, asp.net mvc 4, F# 3.0, and 64bit support on OS X. The 3.0 release is very exciting not to mention lots of ‘lameness’ will be going away with the new async stuff. There are also improvements to sgen the new garbage collection system in Mono that should help improve performance. Mono is seeing a lot of success in the gaming side of the market as well. Some other areas that will receive focus are code analysis, bug finding, and profiling tools. In the next year Xamarin expects to deliver new MonoTouch and Mono for Android versions based on 3.0. Very exciting stuff!!!
Second, ServiceStack. This was a very full session and I was lucky to find a spot to stand in at the back of the room. Sadly this meant that I missed parts of this presentation, but definitely plan to look more seriously into it once I get the chance as a replacement for wcf. Hopefully the video comes out sooner than later for this one!
Third, GitHub. Phil Haack did a great job presenting on GitHub and the awesomeness that it is. I had seen some of it before, but really like seeing the command line style interface that is built into the web interface in action. He also did a demo of the API that is available and there were some really cool things in there. I’m very interested in the possibility to integrate pull requests into some Continuous Integration system. It would be cool to know right away if the pull request would break the build or not.
Fourth, Vernacular. Aaron Bockover, now a Xamarin employee, was great enough to post his slides here. If you are working on a project that is targeting multiple platforms and need it to support multiple locales then this is definitely a project you need to check out. Very promising!
Fifth, Mobile Development with C#(book). Greg Shackles is definitely someone to follow and watch in this market segment. He has been doing some great work including writing a book about it. If you are considering writing a mobile app that is targeting multiple platforms I definitely recommend picking up this book.
Sixth, Effective MonoDevelop. Michael Hutchinson is an awesome developer that has contributed a great deal to the MonoDevelop project. His blog has some great tips that makes using MonoDevelop even better. It is definitely worth the read.
Apart from all of the sessions there was plenty of time to hang out with some rockstars in the Mono community. It is always great to chat with them in person and get feedback on questions and problems. I am definitely looking forward to next year’s conference! Keep up the great work!
Zoumpis @ oSC2012
Introduction
A few days after the openSUSE conference is over, it is the right moment to write my report.
For me it was the first openSUSE Conference which i attended to. It was the first time that i was surrounded by hundred of Geekos during 4 days and interacted with people from the openSUSE Community , SUSE other distribution and other FOSS projects as well. People from openSUSE , Gentoo , Ubuntu , Fedora have been there to collaborate, make a presentation , discuss about FOSS and at the end of the day have a beer (pivo, in Czech). So what did i do during the oSC2012?
What did i do
First of all , at Day Zero, the whole Greek community went to the Venue so as to help with the setup up and explore the Venue as well. It is a truth that i I was amazed by the infrastructure, the coordination and the high level of education provided by the University. I had the opportunity to get into a laboratory and saw that the students do make their own experiments there. At the end of the day we drunk a couple of beers and personally discussed with the Spanish spoken guys. We had fun by expressing our ideas and interact with people who live far away from European continental .
Actually the first day i helped at the registration desk by giving swag ,all the necessary staff and piece of information to the recently (or not) registered attendees. By the second day and until the end of the conference i worked at the Social Media team with Kostas Koudaras and Jos Poortvliet. Our goal was to spread to the social media (twitter,google+,facebook) the presentations,talks,workshops and what was going on during the conference. In that way people who attended to the conference were up-to-date for what is going on and people who didn’t attend had also the opportunity to enjoy the conference by watching the live streaming. Finally i did translate some of the tweets in Spanish , so the Spanish spoken people be up-to-date as well.
Presentations-Attendance
Apart from what did i do , i attended to some presentations. So here i list the presentations:
1) Agustin Benito Bethencourt: SME as target for GNU/Linux distributions
2) Jos Poortvliet: openSUSE Around the World
3) Lightning talks
4) Prof. Joe Doupnik: A complete server to assist charities
5) openSUSE Project meeting
6) Izabel Valverde: The openSUSE Travel Support Program
7) Kostas Koudaras: Ambassadors 2.0
8) Michal Hrušecký: Whats new in openSUSE Connect
9) Kostas Koudaras: oSC13 The Spirit and the City
I admit that i would like to attend the following presentations but finally it wasn’t possible :
1) Henne Vogelsang: Building RPMs for starters…
2) Stephan Kulow: Packaging of perl/python/ruby/java
My presentation
Apart from attending at some presentations i did make my own. Actually my presentation was related to my failure in GSOC 2012 with openSUSE Project. I explained to the crowd [ok i admit i was a bit nervous , it was my first presentation in an international conference] who am i , which are my plans and encouraged people to participate at the next Google Summer of Code with openSUSE Project. Finally i mentioned that what a failure does mean and what doesn’t mean in that case. My presentation is available here.
Interaction-Feedback
In my opinion it’s very important to interact with people during a conference. Apart from the presentations you gain experience, you discuss with other people about an idea that you have in common. So my interaction was :
a) Met people from Latin America (Sebastian, Axel) and discuss with them about the community there.
b) Met Baltasar Ortega who owns the kdeblog.com and become collaborator of the blog. Now my spanish posts appear also at kdeblog.com
c) Discussed with my mentor of GSOC 2012 about my next steps at the project
d) Discuss about participation of openSUSE Project @ LinuxCon with Jos Poortvliet and met Ralf Flaxa as well
d) My openSUSE Member application was accepted. Also i became member of openSUSE Member Officials Team
e) Met Ramon Roca and discuss with him about his project
f) Joined the conference by another point of view : as a volunteer who worked on a group.
g) Beers,beers,beers 
Conclusion
According to some people, FOSS conferences are dominated by corporate representatives promoting their products.I disagree with that because in my point of view FOSS conference are dominated by participants , volunteers , FOSS communities and FOSS companies. The main point is the interaction between all of these parts .
See you at the next openSUSE Conference!
F-Spot and its new home
As some of you might have noticed I’ve created a repo on GitHub for F-Spot under the mono umbrella – F-Spot on GitHub!
I have left the repository on git.gnome.org/f-spot and will try to sync up changes in master regularly. I’d like to thank the awesome GNOME project for hosting F-Spot and want to be clear that I
have absolutely no plans of dropping GNOME support in F-Spot nor diminish F-Spot’s GNOME integration in the future. On the contrary, as the .NET bindings for the GNOME 3 platform are improving I expect to be working on further GNOME integration for F-Spot.
The goal in moving F-Spot over to GitHub is purely for the benefit of its development technically as well as to breath new life into the project through the wider GitHub community and feature set. Github provides several really cool features, one of the features that I’m looking forward to taking advantages of is the pull request system.
Currently, contributors will typically clone a repository, create a patch that fixes some bug, file that bug in Bugzilla and attach the patch, which then sit and wait in the hope that the developers will notice the bug and accept the patch. What seems to happen with projects, particularly F-Spot, is those bugs will sit there and bit rot. Either someone will come alone, see the bug and possibly rebase the patch against git master or it’ll be forgotten until it’s no longer valid. The pull request interface isn’t some silver bullet, but I see it making the process much simpler and much more discoverable for both patch contributors and maintainers alike.
With the GitHub system, it’s really simpler for any user to come along and fork F-Spot. Once forked they can fix a bug and do a pull request. At this point there is a nice list of pull requests or shame list (a list of all the patches I haven’t addressed yet!). There are some other features such as issue tracking and a built-in wiki that comes with GitHub which I’m not sure if it will get used, but time will tell.
Another goal I have for the project is to port it over to OS X and Windows. GitHub has a nice client for both platforms as well as conveying the idea that F-Spot is intended to be cross-platform application with GNOME support more clearly than being on GNOME’s git does.
I hope everyone will appreciate this new workflow and will enjoy the improvements that are to come in F-Spot. I’m excited to continue development on F-Spot and look forward to the future of such an awesome photo management.
Fiesta de lanzamiento del openSUSE 12.2 [Barcelona] – openSUSE 12.2 Release Party
Español
Despues de la fiesta de lanzamiento del openSUSE 12.2 que tuvo lugar en Madrid , el Martes que viene [06/11] tendrá lugar fiesta de lanzamiento en Barcelona! Mas información podéis encontrar aqui.
English
After the openSUSE 12.2 Release Party took place in Madrid , the next Tuesday [06/11] the openSUSE 12.2 Release Party will take place in Barcelona! More info can be found here.
Informe de la fiesta de lanzamiento del openSUSE 12.2 [Madrid] – Report from openSUSE 12.2 Release Party [Madrid]
Español
Recién llegado del openSUSE Conference, el viernes pasado (26/10/2012, 21:00) tuvo lugar la fiesta del lanzamiento del openSUSE 12.2. Después de mis clases del Máster [URJC] profesores y estudiantes fuimos a un pub para tomar unas cervezas y hablar del openSUSE. Algunos de mis colegas me preguntaron cosas como “Qué entornos gráficos incluyen el DVD” y “Los dvd’s son de 64 bits”, “Cómo se puede contribuir en el proyecto openSUSE como desarrollador”.
Además profesores y colegas cogieron unos DVD’S promo y uno de ellos, que utiliza otra distribución con XFCE, probará el openSUSE con XFCE. Finalmente tuvo lugar un sorteo y dos participantes ganaron materiales de openSUSE Conference.Al final adjunto el código fuente de sorteo. El código fuente está debajo de la licencia GPL y podéis utilizarlo en su sorteo también.Aquí están algunas fotos de la fiesta.
English
After arriving from openSUSE Conference , the last Friday (26/10/2012, 21:00) the openSUSE 12.2 Release Party took place in Madrid. When my Master classes [URJC] finished professors and students we went to an Irish Pub to drink a beer and discuss about openSUSE Project. Some of my classmates asked me questions like “How many GUI does the DVD include?” , “The DVD’s are 64-bits version?” , “How can i contribute to the openSUSE Project as a developer?”.
Furthermore professors and classmates took some openSUSE DVD’s and one of my classmate who uses Xubuntu is gonna try openSUSE with XFCE. Finally a draw took place and two of the participants won material stuff from the openSUSE Conference. I submit the source code of the “draw”. You can use the source code for free [for your draw as well
] it is under GPL License. Here you can find the Release Party photos.
What I need from a WM/Desktop
My requirements are:
- win + left , win + right keys should align windows in the left and right halves of the screen, max-vertically, respectively
- win + top, win + bottom should align windows in the top and bottom halves of the screen, max-horizontally, respectively
- win + f or win + enter should fullscreenize the current window
- Should support 3x3 workspaces. My main development workspace will be in center. All other things like mail, browser, IRC, IM should be just one hop away in any of the neighboring four workspaces
- The currently focused window should be brighter than the rest of the windows in the background
- If I click on a window in the background, it should just get focused and not interpret as a click on the window (say if I click on a link in the browser in a bg window, it should not change the location but just bring the window to fg)
- There should be a tile option to arrange all windows in the current workspace, into quadrilaterals of equal width and height
- There should be an expose like option where I should be able to see all the open windows (may be triggered on win + f7 key or three-finger-scroll in the touchpad). This should just arrange the currently open windows
- There should be no always-present bar in any edge of the screen (unlike gnome3). Intelli-hide panel on the bottom is good (like gnome-do docky) etc.
- There should be no animations at all when the windows are resized/tiled/etc.
- There should be no animations at all when we switch workspaces.
- ALT + TAB should alternate between open windows (not applications) in the current workspace ONLY.
- The title bar of the windows should be as thin as possible, such that it will accommodate three buttons for minimize, maximize and close. But they should not be too big like in GNOME 3 wasting a lot of space. Does not matter if it is configurable/themable or not.
- Notifications should popup in some fixed location (say top-right corner) and stay until dismissed (I do not use notifications for individual chat message receiving etc. so this is good for me. I need to be notified only for a new chat and not messages in an already open chat window etc.)
- Should allow changing of control key position to either alt key (to help when working along with Mac) or capslock key
- Should have an option to have one workspace dedicated for an additional monitor and a keyboard shortcut to switch to that workspace
- Things like multimedia keys, password store etc. are not exactly a big need. If they exist, it is good but if they don't they are not deal breakers. My main requirements are for the WM aspects and not really these features.
Are there any other WM needs that should be added to the above list to make my programming environment better ?
Please share your comments/helps/config-files. Thanks.
openSUSE Conference 2012
Finally got around to find time to write a bit about my attendance of the openSUSE Conference 2012 in Prague.
Overall I found it a quite successful event even when I could think of a few improvements for next time. I’ve attended quite some talks during the days and also helped recording some of them. But to me the most important thing was to meet and talk to people. Since openSUSE 11.4 is going to go Evergreen very soon there were quite some discussions including two related BOFs and a maintenance hands-on with Marcus from the SUSE Maintenance team as we are planning to use OBS’ maintenance features for the upcoming 11.4.
What I missed was a bit more space to meet and hack a bit. Both venues were a bit short on seats outside of the talks or BOF rooms. But congratulations for a pretty stable wifi network during the conference. I missed it at the hotel though 
Apart from that I’ve met some new (to me) people and missed some other community members including some from the board which is a bit unfortunate for the main community event but still there were many good conversations.
Special thanks to Petr from SUSE showing us the city and helping me to find my hotel when I arrived (and everything else) and also the openSUSE travel support program which was sponsoring my travel to the conference.
I’m looking forward to next year’s conference and hope I can attend there as well again.
openSUSE conference
Letztes Wochenende (bis Dienstag) war ich bei der openSUSE conference, die diesmal in der "goldenen Stadt" Prag stattfand. Die Konferenz war sehr interessant - zum Einen die Vorträge, zum Anderen der "hallway track", bei dem ich viele Leute persönlich traf, die ich sonst nur namentlich aus Mailinglisten oder Bugzilla kenne.
Mein Workshop zu AppArmor wurde von rund 15 Personen besucht, die jetzt mehr über AppArmor wissen. Es wurden auch Fragen zum Packaging von Profilen gestellt - mit etwas Glück bekommen also ein paar Programme ein AppArmor-Profil in ihr Paket oder das Profil wird upstream zur Aufnahme zu den Standard-Profilen vorgeschlagen. Die Folien zum Workshop gibt es am Ende dieses Eintrags.
Zum openSUSE Jeopardy kamen nur 5 Personen. Diese haben aber alle mitgespielt und hatten sichtlich Spaß, die passenden Fragen zu meinen Antworten rund um Linux und openSUSE zu finden - vor allem Jan, der beide Runden (und somit zwei Flaschen Wein) gewann. Der IRC-basierte "Buzzer" hat dabei gut funktioniert und kommt mit etwas Glück beim nächsten LinuxTag nochmal zum Einsatz.
Am Montag war ich einer der wenigen Teilnehmer der BoF zur openSUSE landing page, die wir spontan etwas verlängerten. Daher fiel die admin@-BoF mehr oder weniger aus, was mangels anwesender Admins auch nicht wirklich schlimm war. Danach wurde ich von Coolo noch zum Filmen freiwillig gemeldet ;-) - die schrecklichen Publikums-Bilder vom Montag Nachmittag (Project Meeting etc.) und Dienstag (hauptsächlich Raum Riker) stammen von mir ;-)
Vielen Dank an alle, die zur openSUSE Conference beigetragen haben, and für die Unterstützung bei den Reisekosten!
Last weekend (until tuesday) I visited the openSUSE conference which was in the "golden town" Prague this year. The conference was very interesting. One part are the talks, the other part is the "hallway track" where I met lots of people I only knew from mailinglists or bugzilla.
About 15 persons took part in my AppArmor workshop, which means they now know more about AppArmor. Some also asked about packaging of AppArmor profiles. If we are lucky, some applications will receive a profile in their package, or their profile will be proposed for inclusion the the upstream set of default profiles. The slides I used in the workshop are available for download at the end of this post.
Only 5 persons came to my openSUSE jeopardy, but they all played and had fun in finding the matching questions for my answers about Linux and openSUSE. Jan must have had most fun - he won both rounds (and two bottles of wine). The IRC based "buzzer" worked quite well and will probably be used again at next LinuxTag.
On monday, I was one of the few participants of the BoF about the openSUSE landing page, which we extended time-wise. This also means the admin@ BoF was more or less dropped, which wasn't really bad because there weren't admins around. Afterwards, Coolo volunteered me ;-) to operate a video camera. The terrible pictures of the audience on monday afternoon (project meeting etc.) and tuesday (mostly room Riker) are from me ;-)
Thanks to everybody who contributed to the openSUSE Conference, and for the travel support!
Slides:
What's cooking for KDE in openSUSE 12.3 - theming
Although the release of openSUSE 12.3 is yet to come, the people of the openSUSE community contributing to KDE are already at work to bring the best possible KDE experience for the new release.
One of the changes that started off already is the development of a new Plasma theme and color scheme. Based on the original Produkt theme, it has been adapted to be better integrated with openSUSE’s customary green:
[caption id=“attachment_1003” align=“aligncenter” width=“300”][]({{ site.url }}/images/2012/10/snapshot4.png) Widget view[/caption]
[]({{ site.url }}/images/2012/10/snapshot1.png)
Aside from general changes, theming has also been extended to the new logout dialog from the next release of the KDE Workspace (4.10) which will be in openSUSE, and to the logout screen:
[caption id=“attachment_1002” align=“aligncenter” width=“200”][]({{ site.url }}/images/2012/10/snapshot3.png) Lock dialog[/caption]
[caption id=“attachment_1001” align=“aligncenter” width=“200”][]({{ site.url }}/images/2012/10/snapshot2.png) Logout dialog[/caption]
Last but not least, the theme extends to the alt-F2 launcher (KRunner) and to the system tray (shown is the new QML system tray from Plasma Workspace 4.10):
[caption id=“attachment_1006” align=“aligncenter” width=“175”][]({{ site.url }}/images/2012/10/snapshot7.png) System tray[/caption]
[caption id=“attachment_1005” align=“aligncenter” width=“253”][]({{ site.url }}/images/2012/10/snapshot6.png) KRunner view[/caption]
Don’t forget that everything is a work in progress.
This theme is the result of the hard work of the following people:
-
shumski
-
Raymond “tittiatcoke” Wooninck
-
Alin M Elena
Thanks also go to Melissa Adkins for reviewing the theme from a graphics design point of view.
Heartbeat dan DRBD
Implementasi heartbeat saja sangatlah mudah. Cukup mendownload, mengkompilasi dan mengkonfigurasi tiga buah file /etc/ha.d/ha.cf, /etc/ha.d/authkeys dan /etc/ha.d/haresources. Untuk drbd bisa download tarball dan jangan lupa untuk membaca dokumentasinya, karena drbd harus dikompilasi dengan kernel source secara baik, kalau tidak anda dapat menemui kesulitan dalam mem-probe modul drbd. Pada server ini saya menggunakan openSUSE 11.1 sehingga hidup jadi lebih mudah, tinggal gunakan 1-click install untuk heartbeat, drbd kernel module dan drbd user space, atau bisa juga dengan mengaktifkan repositori http://download.opensuse.org/repositories/server:/ha-clustering/
Konfigurasi Heartbeat
Pastikan anda menggunakan dua buah server untuk high availability cluster. Kalau hanya punya satu ya tidak perlu heartbeat dan drbd :-). Untuk penggunaan lebih dari 2 buah server sebaiknya menggunakan pacemaker dan openAIS karena dapat melakukan N-to-N atau N+1 cluster sampai jumlah yang teorithically tidak terbatas. Tetapi saya tidak akan menjelaskan pacemaker dan openAIS di sini.
Pada setiap server menggunakan dua buah ethernet card, atau bisa juga 1 ethernet card dan koneksi langsung antar kedua server dengan menggunakan null-modem cable.
Satu buah ethernet terhubung ke jaringan dan satu buah lagi sebaiknya dihubungkan antar server langsung menggunakan cross cable (tidak harus tetapi disarankan)
Pastikan ethernet bekerja dengan baik.
Pada skenario di atas eth0 real ip diset secara permanen dengan ifup, sedangkan virtual ip akan diset melalui file /etc/ha.d/haresources. Silakan ganti ip address sesuai dengan yang anda gunakan.
Konfigur file /etc/ha.d/ha.cf, /etc/ha.d/haresources, /etc/ha.d/authkeys. File-file ini harus sama di kedua server.
Contoh file ha.cf
keepalive 2
warntime 5
deadtime 15
initdead 90
udpport 694
auto_failback on
bcast eth0
node server1 server2
bcast eth0, maksudnya adalah ethernet yang akan digunakan oleh client untuk mengakses server. node, diikuti dengan nama server primary dan server secondary sesuai dengan hasil "uname -n"
Contoh file authkeys
Jika kedua server terhubung dengan kabel null-modem atau kabel cross anda dapat mengabaikan enkripsi dan mengisi file authkeys dengan misalnya:
auth 2
2 crc
Tetapi jika anda menggunakan jaringan, misalnya letak kedua server terpisah secara geografis maka penggunaan enkripsi sangat dianjurkan dengan format
auth num
num algorithm secret
Untuk membuatnya dapat gunakan script dibawah
# ( echo -ne "auth 1 1 sha1 "; dd if=/dev/urandom bs=512 count=1 | openssl md5 ) > /etc/ha.d/authkeys
Selanjutnya jangan lupa set agar authkeys hanya bisa dibaca dan ditulis oleh root # chmod 0600 /etc/ha.d/authkeys
Contoh file /etc/ha.d/haresources
Konfigurasi haresources tanpa drbd / sebelum drbd diaktifkan misalnya
server1 IPaddr::10.8.2.100/24/eth0 named dhcpd apache2
Arti dari baris tersebut adalah:
server1 --> nama server primary sesuai "uname -n"
IPaddr::10.8.2.100/24/eth0 --> ipaddress virtual yang digunakan di eth0
named dhcpd apache2 --> nama services yang redundan
Anda dapat menset service heartbeat agar jalan di run level saat booting, misalnya dengan perintah "chkconfig heartbeat on" atau pada openSUSE dengan "insserv /etc/init.d/heartbeat". Saya sendiri di openSUSE lebih menyukai untuk menjalankannya melalui file /etc/init.d/after.local misalnya vim /etc/init.d/after.local:
#! /bin/sh
sleep 2
rcheartbeat start
Jangan lupa untuk mengcopy semua file konfigurasi yang anda buat di server1 ke server2 (gunakan scp or whatever) ha.cf, haresources, authkeys dan after.local (kalau anda pakai). Heartbeat sebenarnya menyediakan fasilitas mencopy konfigurasi dari node primary ke node cluster lainnya dengan ha_propagate. Coba cari filenya di /usr/share/heartbeat/ha_propagate atau di /usr/lib/heartbeat/ha_propagate. Saya sendiri lebih prefer menggunakan scp :-)
Dari server1 coba "ifconfig" maka kalau semuanya ok akan muncul eth0:0 dengan ip 10.8.2.100. Dari client coba ping dan ssh ip tersebut, kalau masuk ke 10.8.2.4 maka heartbeat sudah bekerja sempurna. Selanjutnya matikan service heartbeat di server1, cek dengan ifconfig bahwa eth0:0 sudah tidak ada. Masuk ke server2 dan cek dengan ifconfig, harusnya sekarang eth0:0 dengan ip 10.8.2.100 sudah diambil alih oleh server2. Untuk mengembalikan ke server1 maka aktifkan service heartbeat di server1. Kalau ini semua ok berarti service heartbeat sudah berjalan dengan sempurna. Anda dapat juga mentest dengan mematikan eth0 pada server1, dan yakinkan bahwa ip virtual eth0:0 juga diambil alih oleh server2.
Konfigurasi drbd
Drbd merupakan singkatan dari Distributed Replicated Block Device. Drbd akan me-mirror seluruh block device yang telah didefinisikan dan bekerja sebaga raid-1 over network. Konfigurasi drbd cukup mudah walaupun tidak semudah heartbeat :-P Anda butuh kesabaran. Beberapa hal yang perlu diperhatikan. User space dan kernel space harus dengan versi yang sama. Ada kejadian dimana seseorang mendownload tarball dan kemudian mengupdate instalasi drbd. Waktu menjalankan configure dia tidak mendefinisikan kernel directory, akibatnya user space drbd (misalnya drbdadm) meningkat versinya tetapi modul drbd.ko tidak terupdate. Akibatnya mesin bisa hang :-( Setidaknya dalam mengkonfigure jalankan ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --with-km
Selanjutnya jalankan:
# cd drbd
# make clean
# make KDIR=/path/to/kernel/source
Untuk pengguna openSUSE tidak perlu melakukan langkah-langkah ini cukup install menggunakan 1-click install seperti yang sudah saya sebutkan di awal tulisan.
Hal lain yang sering salah dilakukan waktu mengkonfigurasi drbd adalah membuat filesystem saat merepartisi disk untuk drbd device. Hal ini harus dihindari sampai modul drbd kita panggil untuk pertama kali. Berikut adalah langkah-langkahnya:
siapkan pastisi untuk /dev/drbd yang akan digunakan untuk saling bereplikasi dan biarkan partisi tanpa filesystem. Ukuran partisi akan menentukan berapa lama keduanya bersinkronisasi, makin besar ukuran partisi maka makin lama sinkronisasi mencapai kondisi Consistent. Selain itu bisa juga disiapkan satu partisi tambahan untuk metadata walaupun tidak mandatory. Ukuran partisi di kedua server haruslah sama.
Edit file /etc/drbd.conf menjadi:
# You can find an example in /usr/share/doc/drbd.../drbd.conf.example
#include "drbd.d/global_common.conf";
#include "drbd.d/*.res";
global{
usage-count yes;
}
common{
protocol C;
}
resource r0{
net{
after-sb-0pri discard-younger-primary;
after-sb-1pri discard-secondary;
after-sb-2pri disconnect;
}
on server1{
device /dev/drbd0;
disk /dev/cciss/c0d0p6;
address 10.8.2.4:7788;
meta-disk internal;
}
on server2{
device /dev/drbd0;
disk /dev/cciss/c0d0p6;
address 10.8.2.5:7788;
meta-disk internal;
}
}
Pada server1 & server2 jalankan perintah:
# modprobe drbd
# drbdadm up all
# cat /proc/drbd
akan muincul tampilan dikedua server seperti:
server1:~ # cat /proc/drbd
version: 8.2.7 (api:88/proto:86-88)
GIT-hash: a1b440e8b3011a1318d8bff1bb7edc763ef995b0 build by lmb@hermes, 2009-02-20 13:35:59
0: cs:Connected st:Secondary/Secondary ds:Inconsistent/Inconsistent C r---
ns:45542488 nr:0 dw:0 dr:45542488 al:0 bm:2779 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
server2:~ # cat /proc/drbd
version: 8.2.7 (api:88/proto:86-88)
GIT-hash: a1b440e8b3011a1318d8bff1bb7edc763ef995b0 build by lmb@hermes, 2009-02-20 13:35:59
0: cs:Connected st:Secondary/Secondary ds:Inconsistent/Inconsistent C r---
ns:45542488 nr:0 dw:0 dr:45542488 al:0 bm:2779 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
Selanjutnya buatlah metadata untuk drbd di setiap server
server1:~ # drbdadm create-md r0
server1:~ # rcdrbd start
server2:~ # drbdadm create-md r0
server2:~ # rcdrbd start
Kita akan menjadikan server1 sebagai primary node, karena iotu pada server1 jalankan:
server1:~ # drbdadm primary all
server1:~ # drbdadm connect all
Jika ada masalah, kemungkinan besar adalah karena sudah ada file system. Untuk menghapus file sistem tanpa mengubah partisi dapat menjalankan perintah
dd if=/dev/zero bs=512 count=512 of=/dev/your_partition
Bisa juga ditemukan atau adanya kesalahan saat menginisiasi drbd yang berakibat kedua disk sudah berada dalam kondisi Primary/Secondary Inconsistent/Inconsistent. Pada saat awal harusnya semua dalam kondisi Secondary/Secondary. Jika menemui masalah ini jalankan:
server1:~ # drbdadm -- --overwrite-data-of-peer primary all
Selanjutnya jalankan pada server 1
server1:~# drbdsetup /dev/drbd0 primary --overwrite-data-of-peer
Sekarang inisial sinkronisasi akan mulai berjalan.
server1:~ # cat /proc/drbd
version: 8.2.7 (api:88/proto:86-88)
GIT-hash: a1b440e8b3011a1318d8bff1bb7edc763ef995b0 build by lmb@hermes, 2009-02-20 13:35:59
0: cs:SyncSource st:Primary/Secondary ds:UpToDate/Inconsistent C r---
ns:36350976 nr:0 dw:0 dr:36351244 al:0 bm:2218 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:68502008
[=====>..............] sync'ed: 34.7% (66896/102392)M
finish: 53:31:01 speed: 348 (320) K/sec
Prosesnya cukup memakan waktu dan bergantung dari ukuran disk yang digunakan sebagai device drbd. Bersabarlah dan menunggu sampai prosesnya selesai. Saya selalu menunggu sinkronisasi sampai selesai 100% untuk yang pertama kali sebelum melakukan apapun (walaupun tidak harus). Jika sudah selesai maka hasilnya akan seperti:
server1:~ # cat /proc/drbd
version: 8.2.7 (api:88/proto:86-88)
GIT-hash: a1b440e8b3011a1318d8bff1bb7edc763ef995b0 build by lmb@hermes, 2009-02-20 13:35:59
0: cs:Connected st:Secondary/Secondary ds:UpToDate/UpToDate C r---
ns:45542488 nr:0 dw:0 dr:45542488 al:0 bm:2779 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
server2:~ # cat /proc/drbd
version: 8.2.7 (api:88/proto:86-88)
GIT-hash: a1b440e8b3011a1318d8bff1bb7edc763ef995b0 build by lmb@hermes, 2009-02-20 13:35:59
0: cs:Connected st:Secondary/Secondary ds:UpToDate/UpToDate C r---
ns:0 nr:44887544 dw:44887544 dr:0 al:0 bm:2740 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
Selanjutnya pada server1 kita akan membuat file system. Cukup dilakukan di server1, karena server2 akan mengikuti:
server1:~ # drbdadm primary all
server1:~ # mkfs.ext3 /dev/drbd0
sekarang kita siapkan directory untuk mysql di server1
mkdir /data-mysql
mount -t ext3 /dev/drbd0 /data-mysql
mv /var/lib/mysql /data-mysql
ln -s /data-mysql/mysql /var/lib/mysql
umount /data-mysql
di server2:
mv /var/lib/mysql /tmp
ln -s /data-mysql/mysql /var/lib/mysql
Edit file /etc/ha.d/haresources di server1 dan server2 menjadi
server1 IPaddr::10.8.2.100/24/eth0 drbddisk::r0 Filesystem::/dev/drbd0::/data-mysql::ext3 named dhcpd apache2 mysql
Selanjutnya tinggal memanggil drbd dan heartbeat di runlevel 3 dan 5 setiap kali server di boot. Saya sendiri di openSUSE mmenggunakan /etc/init.d/after.local untuk memanggil drbd dan heartbeat. Ini hanya untuk memastikan bahwa drbd dan heartbeat dipanggil terakhir kali setelah semua service yang lain berjalan. Cukup buat file /etc/init.d/after.local dan isikan misalnya:
#!/bin/sh
sleep 1
rcdrbd start
sleep 2
rcheartbeat start
Sekarang kita tinggal mengujinya. Apakah service-service yang didefinisikan di /etc/ha.d/haresources akan berpindah ke server2 jika server1 dimatikan. Tahu kan cara menguinya? Kira-kira sama dengan cara menguji heartbeat di atas.
Have a lot of fun






