You are on page 1of 12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

Register

Login

Contribute
Search

Subscribe

RSS

Ho tos

Forums

Contribute

Subscribe

ISPConfig

FAQForge

Ne s

OptionsForThis Howto
F eeS ppo PaidS ppo

Navigation
[+]E pand []Collap e Ho o Lin And oid Cen OS Debian Fedo a Ke nel Mand i a PCLin OS S SE Ub n

Adsb Google

Ub n

WebSe e Apache Che okee Ligh pd ngin Back p Con olPanel ISPConfig DNS BIND M DNS Po e DNS djbdn De k op Email An i Spam/Vi Po fi FTP HighA ailabili www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10

Ub n

Ub n CDCF19Ub n

1/12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

HighA ai abi i M i i g M SQL P g a i g C/C++ PHP Sa ba Sec i A i S a /Vi S age Vi a i a i KVM O e VZ VM a e Vi a B Xe O he F eeBSD C e cia Mi iH F C ib e S b ci i L gi Si eMa /RSSFeed

U e login
U e a e: Pa d:

Re e be Me?

Login
C ea ea e acc Re e e a d

Facebook

www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10

2/12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

Find s on Facebook

Ho

toForge
Like

Facebook social pl gin

2,469 people like

Who'sonline
The ea ec e 12 e a d3731g e i e.

Ho toForge Forums
Need SMTPf PC e he h e

h acce 1 ie

P b e da i g f 3.0.3.3 3.0.4 P b e i h he i e e ai f H dCGI P be ih e ai e e ( fi ,c ie , ... H Be ch a CPU [3.0.4 da e] Re e e Web i e e i e ed E da i g f 3.0.3.2 3.0.4 Pe fec e e debia ee e i c fig3.04...
www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10 3/12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

ip config3.04... ha ingafolde

Ne s
Indiegamedona iond i e! Open64Compile T ning OnAMDB lldo e FX 8150 Ub n :Po e Con mp ion,KVM, Mo illa,E c Ho oColo CodeYo Te minalinGnomeShell 3. Ho ToLe Yo Wallpape Ro a eWi h Webilde (Lin Min 11) S emRe c eCd2.4.0 Ha Lin Ke nel3.1.0 InCon e a ion:Jim Zemlinof heLin Fo nda ion W i ingman alpage on Lin Indica o Apple Po edTo GNOME3,CanAl ead Be U edInUb n 11.10 Cla icSe ion CanonicalWillDe elop Uni fo Phone mo e

Recentcomments
Re: eg.S ep10 pmB ild a ge folde 14ho 38minago Plea an l S p i ed 14ho 40minago I e i hWIndo XP? 15ho 1minago al e na i e 16ho 25minago Re:Wine ick of en
www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10 4/12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

Re:Wine ick of en needed 19ho 8minago Re:No nece a ob ild Gl e FSf om o ce 1da 36minago EXT4 i hDRBD?! 1da 14ho ago Da aba e e e 1da 20ho ago Re:If o ha eCen OS5.4 2da 1ho ago . mlfilei no being c ea ed 2da 1ho ago

Ne sletter
Subscribeto Ho toForge Ne sletter and a info medabo o la e HOWTO and p ojec .

en e emailadd e

Submit
(To n o ne link.) b c ibef om le e , i i hi

English

Deutsch

Site Map/RSS Feeds

Advertise

You are here:

Home

Howtos

Linux

Ubuntu

Setting Up Network RAID1 With DRBD On Ubuntu 11.10

Se ingUpNe o kRAID1Wi hDRBDOnUb n 11.10

Wan o

ppo Ho oFo ge?Becomea

b c ibe !
Storage

Submitted by falko (Contact Author) (Forums) on Sun, 2011-10-30 20:34. :: Ubuntu High-Availability

www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10

5/12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials
Submitted by falko (Contact Author) (Forums) on Sun, 2011-10-30 20:34. :: Ubuntu High-Availability Storage

Like

18

Send

27

SettingUpNet orkRAID1WithDRBDOnUbuntu11.10
Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Follow me on Twitter Last edited 10/28/2011 This tutorial shows how to set up network RAID1 with the help of DRBD on two Ubuntu 11.10 systems. DRBD stands for Distributed eplicated Block Device and allows you to mirror block devices over a network. This is useful for high-availability setups (like a HA NFS server) because if one node fails, all data is still available from the other node. I do not issue any guarantee that this will work for you!

1Preliminar Note
I will use two servers here (both running Ubuntu 11.10): s r e 1 e a p e c m(IP address 1 2 1 8 0 1 0 evr. ml.o 9.6..0) s r e 2 e a p e c m(IP address: 1 2 1 8 0 1 1 evr. ml.o 9.6..0) Both nodes have an unpartitioned second drive (/ e / d ) with identical size (30GB in this example) that I want to mirror over the network (network RAID1) with the help of DRBD. dvsb It is important that both nodes can resolve each other, either through DNS or through / t / o t . If you did not create DNS records for s r e 1 e a p e c mand echss evr. ml.o s r e 2 e a p e c m you can modify / t / o t on both nodes as follows: evr. ml.o, echss ser er1/ser er2: vechss i/t/ot

www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10

6/12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

17001lclo .oadmioah 2...oah lcloanlclo 1218010 e e1eapecm e e1 9.6..0 . ml.o 1218011 e e2eapecm e e2 9.6..0 . ml.o #Tefloigln ed ialoP6cpbeh hol nie a e bef I aalo :1i6lclo popak :poah i6lobc f0:0i6lcle e0:poan f0:0i6ma pei f0:pc f f0:1i6aloe f2:plnd f0:2i6alo e f2:pl

I'm running all the steps in this tutorial with root privileges, so make sure ou're logged in as root: d o

2S nchroni eTime
ser er1/ser er2: It is ver important that both nodes have the same time. Therefore we install the ntp packages:

a en alnpnpae p g i l d

3Partition/dev/sdb
www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10 7/12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

3Partition/de /sdb
ser er1/ser er2: Right no , our partitioning looks as follo s: fik dsl ro@evr:#fik otsre1 dsl Dsdvsa22G,322570bts ik/e/d:3.B21242ye 25has3scostak96clnesoa2150scos 5ed,6etr/rc,31yidr,ttl6946etr Uis=scoso11ye ntetrf1*52=52bts Scoie(oia/hscl:52bts/52bts etrszlgclpyia)1ye1ye IOszmnmmotml:52bts/52bts /ie(iiu/pia)1ye1ye Dsdniirx0721 ikietfe:0001c eieBoSatEdlcsISse DvcottrnBokdytm /e/d1*089714828Lnx dvsa244912833iu /e/d207821511037Etne dvsa515692132575xedd /e/d5070215110368LnxLM dvsa51669213257eiuV Dsdvsb22G,322570bts ik/e/d:3.B21242ye 25has3scostak96clnesoa2150scos 5ed,6etr/rc,31yidr,ttl6946etr Uis=scoso11ye ntetrf1*52=52bts Scoie(oia/hscl:52bts/52bts etrszlgclpyia)1ye1ye IOszmnmmotml:52bts/52bts /ie(iiu/pia)1ye1ye Dsdniirx0000 ikietfe:00000 Dsdvsbdentcnanavldpriintbe ik/e/dos'otiaiattoal Dsdvmpe/evrot14G,345390bts ik/e/aprsre1ro:3.B11366ye 25has3scostak89clnesoa1500scos 5ed,6etr/rc,31yidr,ttl6388etr Uis=scoso11ye ntetrf1*52=52bts Scoie(oia/hscl:52bts/52bts etrszlgclpyia)1ye1ye IOszmnmmotml:52bts/52bts /ie(iiu/pia)1ye1ye Dsdniirx0000 ikietfe:00000 Dsdvmpe/evrotdentcnanavldpriintbe ik/e/aprsre1roos'otiaiattoal Dsdvmpe/evrwp13B3801ye ik/e/aprsre1sa_:56M,56792bts 25has3scostak5clnesoa087etr 5ed,6etr/rc,6yidr,ttl1456scos Uis=scoso11ye ntetrf1*52=52bts Scoie(oia/hscl:52bts/52bts etrszlgclpyia)1ye1ye IOszmnmmotml:52bts/52bts /ie(iiu/pia)1ye1ye Dsdniirx0000 ikietfe:00000
www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10 8/12

04/11/11 Dsdniirx0000 ikietfe:00000

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

Dsdvmpe/evrwp1dentcnanavldpriintbe ik/e/aprsre1sa_os'otiaiattoal ro@evr:# otsre1 As ou see, / e / d is not partitioned. We change that now and create one big partition on it, / e / d 1 dvsb dvsb: fik/e/d dsdvsb ro@evr:#fik/e/d otsre1 dsdvsb DvcotisnihravldDSpriintbeou,SIoSikae eiecnaneteaiOattoal,nrSnGrOFdslbl BidneOikaeihdsdniir0fa56. uliganwDSdslblwtikietfex7b99 Cagswleanieoyol,utlyudcdowiete. hneilrminmmrnynioeietrthm Atrta,oorehrvoscnetwntbeoeal. fehtfcus,tepeiuotno'ercvrbe Wrignailg000fpriintbe4wlecretdb(ie ann:ivldfax00oattoalilborceywrt) C m a d ( o e p :<-- n omnmfrhl) Cmadato omncin xedd eetne rmratto14 ppiaypriin() <-- p P r i i n n m e 1 4 e a l ) <-- 1 attoubr(,dfut1: F r t s c o 2 4 2 1 5 9 e a l 0 8 :<-- ENTER isetr(086945,dfut24) Uigdfutvle24 snealau08 L s e t r s c o s o s z { , , 2 4 2 1 5 9 e a l 2 1 5 9 :<-- ENTER atsco,+etrr+ieKMG (086945,dfut6945) Uigdfutvle6945 snealau2159 C m a d ( o e p :<-- t omnmfrhl) Slceatto eetdpriin1 H x c d t p o l s o e ) <-- 83 eoe(yeLtitcds: C m a d ( o e p :<-omnmfrhl) Tepriintbehsbelee! hattoalaenatrd Cligicl)teraattoal. alnot(oredpriintbe Snigdss ycnik. ro@evr:# otsre1 Now run fik dsl again, and ou should find / e / d 1in the output: dvsb
www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10 9/12

04/11/11 Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials again, and ou should find / e / d 1in the output: dvsb

ro@evr:#fik otsre1 dsl Dsdvsa22G,322570bts ik/e/d:3.B21242ye 25has3scostak96clnesoa2150scos 5ed,6etr/rc,31yidr,ttl6946etr Uis=scoso11ye ntetrf1*52=52bts Scoie(oia/hscl:52bts/52bts etrszlgclpyia)1ye1ye IOszmnmmotml:52bts/52bts /ie(iiu/pia)1ye1ye Dsdniirx0721 ikietfe:0001c eieBoSatEdlcsISse DvcottrnBokdytm /e/d1*089714828Lnx dvsa244912833iu /e/d207821511037Etne dvsa515692132575xedd /e/d5070215110368LnxLM dvsa51669213257eiuV Dsdvsb22G,322570bts ik/e/d:3.B21242ye 6ed,5etr/rc,125clnesoa2150scos 4has1scostak97yidr,ttl6946etr Uis=scoso11ye ntetrf1*52=52bts Scoie(oia/hscl:52bts/52bts etrszlgclpyia)1ye1ye IOszmnmmotml:52bts/52bts /ie(iiu/pia)1ye1ye Dsdniirx7b99 ikietfe:0fa56 eieBoSatEdlcsISse DvcottrnBokdytm /e/d108215915268Lnx dvsb24694534653iu Dsdvmpe/evrot14G,345390bts ik/e/aprsre1ro:3.B11366ye 25has3scostak89clnesoa1500scos 5ed,6etr/rc,31yidr,ttl6388etr Uis=scoso11ye ntetrf1*52=52bts Scoie(oia/hscl:52bts/52bts etrszlgclpyia)1ye1ye IOszmnmmotml:52bts/52bts /ie(iiu/pia)1ye1ye Dsdniirx0000 ikietfe:00000 Dsdvmpe/evrotdentcnanavldpriintbe ik/e/aprsre1roos'otiaiattoal Dsdvmpe/evrwp13B3801ye ik/e/aprsre1sa_:56M,56792bts 25has3scostak5clnesoa087etr 5ed,6etr/rc,6yidr,ttl1456scos Uis=scoso11ye ntetrf1*52=52bts Scoie(oia/hscl:52bts/52bts etrszlgclpyia)1ye1ye IOszmnmmotml:52bts/52bts /ie(iiu/pia)1ye1ye Dsdniirx0000 ikietfe:00000 Dsdvmpe/evrwp1dentcnanavldpriintbe ik/e/aprsre1sa_os'otiaiattoal ro@evr:# otsre1

www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10

10/12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 - Page 2

next Setting Up Network RAID1 With DRBD On Ubuntu 11.10 - Page 2

Copyright

2011 Falko Timme

All Rights Reserved.


Like 18 Send

2 add comment | view as pdf | print: this | all page(s)

Please do not use the comment function to ask for help! If ou need help, please use our forum. Comments will be published after administrator approval.

Howtos | Mini-Howtos | Forums | News | Search | Contribute | Subscription Site Map/RSS Feeds | Advertise | Contact | Disclaimer | Imprint

Copyright

2011 HowtoForge - Linux Howtos and Tutorials All Rights Reserved.

www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10

11/12

04/11/11

Setting Up Network RAID1 With DRBD On Ubuntu 11.10 HowtoForge - Linux Howtos and Tutorials

www.howtoforge.com/setting-up-network-raid1-with-drbd-on-ubuntu-11.10

12/12

You might also like