Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Partition for openfiler to make it work for drbd

Posted on 2010-01-08
26
Medium Priority
?
2,355 Views
Last Modified: 2012-05-08
Hi
This is first time i am creating openfiler....
and i m following this ariticles

http://www.howtoforge.com/installing-and-configuring-openfiler-with-drbd-and-heartbeat
http://www.openfiler.com/learn/how-to/graphical-installation
http://www.easyreadarticles.com/applications/setting-up-a-high-availability-nassan-using-openfiler/

but i am little bit of confused, how the partitions will work
if i follow the howtoforge.com article


    *   3 GB root (/) partition  ( WHICH IS FINE)
    * 2 GB swap partition  (WHICH IS FINE)
    * 512 MB /meta partition (used for DRBD0)    (HERE IS THE PRBBLEM)
    * Data partition configured as an unmounted LVM (used for DRBD1)  (HERE IS THE PROBLEM)


its a 40GB hardirive .
if i put 3 Gb to root and 2 GB to swap, so i will have 36 GB to play arround.

now do i put this whole 36GB as LVM ...

where actually you creating partition for

512 MB /meta partition (used for DRBD0)    
* Data partition configured as an unmounted LVM

if you have done this before then please give me some idea ..
0
Comment
Question by:fosiul01
  • 16
  • 9
26 Comments
 
LVL 81

Accepted Solution

by:
arnold earned 2000 total points
ID: 26210458
I have not.
But during my research dealing with home grown iSCSI/NFS/SAMBA/etc. server openfiler came up and was setup. The mention of drbd I think I saw in one of the posts here dealing with HA without expensive hardware.

http://www.drbd.org/docs/applications/
Part IV chapter 11 for LVM.
you would need to create a pvcreate /dev/drbd
/dev/drbd0 and /dev/drbd1  
Subsequent chapters deal with other types of systems depending on the setup you use.
I'm not sure whether you should use the remaining space as a block for drbd1 data.
The thought here is whether you are clustering multiple features. i.e. instead of hiting one node for all resources, you could distribute the load i.e. the specific service is active on a specific node
               node1             Node2
NFS            X
SAMBA                              X
iSCSI         X




You're testing, so the setup does not need to be perfect from the get go.



0
 
LVL 29

Author Comment

by:fosiul01
ID: 26210530
Hi thanks

My first confusion is : 512 MB /meta partition (used for DRBD0)

Where actually you create this /meta partitions ???

this is graphical part of openfile intall
http://www.openfiler.com/learn/how-to/graphical-installation

look at Disck Setup section

so where shoul i setup this /meta partions

mainly here i am stuck


0
 
LVL 29

Author Comment

by:fosiul01
ID: 26210636
ok i think i knwo what it meant by this


My first confusion is : 512 MB /meta partition (used for DRBD0)

so i create /meta by myself ...

now questionh is,
what iwill do witgh rest 35GB of harddirve ??

shall i leave it as it and install open fire ,then after installing openfile, then use command to create pv ???


0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Author Comment

by:fosiul01
ID: 26210669
Basicaly what does it mean :

 Data partition configured as an unmounted LVM (used for DRBD1) ??

so i used

5GB for /root
2GB for swap
1GB for meta

so i use 8 GB

i got rest 32 GB unpertitions

at the time of disk setup, do i need to create LVm??
or i will leave this 32 GB as it is, and install openfile ??
0
 
LVL 29

Author Comment

by:fosiul01
ID: 26210737
oik i think, i know

let me complete this, then i will come again
0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 2000 total points
ID: 26210739
DRDB is another application you are adding to openfiler such that the GUI provided to manage openfiler does not include setting up or integrating drdb at this time.
You need to be in the shell to integrate drdb into the openfiler setup.
You create the device pvcreate /dev/drbd0 pvcreate /dev/drbd1 then modify lvm.conf (next step on the openfiler+drdb setup) so that you do not have duplicate entries i.e. /dev/sdb1 and /dev/sdb2 as well as /dev/drbd0 and /dev/drbd1 etc.
in fstab:
/dev/drbd0 /meta

You have skipped steps.
One you have the DRDB components setup/sync and working between the two nodes, this is when you go the openfiler GUI.

It is up to you whether you first want to test out openfiler setup/options to get familiar with the interface/configuration/settings to avoid having to address several things at the same time.
I.e. get familiar/comfortable with using a single openfiler as an NFS share, SAMBA share, iSCSI target, etc.
This will get you a scope of understanding on configuring/dealing with openfiler GUI.
Once you are sufficiently comfortable with that, work on integrating the DRBD into the server that runs openfiler. Complete the DRBD setup. make sure it is working as expected and then go back to the openfiler GUI.
the next steps cover the mounting of the /dev/drbd0 device as /cluster_metadata.

Follow the directions in http://www.howtoforge.com/installing-and-configuring-openfiler-with-drbd-and-heartbeat to its conclusion.
0
 
LVL 29

Author Comment

by:fosiul01
ID: 26211128
My openfile would not install!! i guess,while testing the Cd, its say FAIL!!

so downloading again

yes, you are right, i will do step by step, first get openfile installed then go for drbd

one thing : the interface for openfile and SAN/NAS interface(hardware) are they same ??

do they work same way ?? openfile and SAN/NAS storage ???


what do you use ???
0
 
LVL 29

Author Comment

by:fosiul01
ID: 26211262
how good is this openfiler ??

how comes its documentation is so rubbish ??? i cant find any documentation about how to use open filer in their site!!!!

it has only 2 document about, how to install!! thats it.. nothing else!!!



0
 
LVL 29

Author Comment

by:fosiul01
ID: 26211390
LOL you will have to buy Documentation!! that like begging is not it!!!


0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 2000 total points
ID: 26211699
The difference in setup between NAS and SAN is the NAS part deals with samba, NFS type shares, while the SAN part deals with iSCSI allocation.

Set it up for a person as a file server for windows (samba).

Evaluating setting up openfiler for a place as the shared storage for a clustered SQL server via iSCSI.

Search the net, there is a simple guide:
http://www.techhead.co.uk/how-to-configure-openfiler-v23-iscsi-storage-for-use-with-vmware-esx
For NFS
http://www.oramoss.com/wiki/index.php/Configure_Openfiler_2.3_as_a_basic_NFS_Server

The guide can be used if instead of iSCSI you want to use samba/nfs where you would pick ext3 or the other option. note on the services, you would need to enable cifs/samba and nfs ldap if you want to integrate it to a centralized account management system (AD/LDAP) etc.

The openfiler folks seem to be in your part of the woods.  If you can see if you can help them right a clearer set of documentation or post to the forums. http://www.openfiler.com/community/forums
0
 
LVL 1

Expert Comment

by:kevin_buchanan
ID: 26300386
I use Openfiler as a destination for backing up VMs.  We have about 30 VMs, and the Openfiler is hosting about 3Tb of storage for backups.

It works great and I highly recommend it for low-end 3rd tier storage.  I would recommend it for a 1st tier storage solution.

As for creating the partitions, you are on the right path...but you don't need any third party (Unless I am missing something)...openfiler can manage them for you.  

As for the data drive...you do not wan to to partition it.  Leave it as un-used disk space when installing Openfiler.  after you finish installing openfiler, then oo int the console and partition the unused space as a volume group, then setup shars (or NFS shares) nad you'll be good to go.

I have setup an Openfiler NAS probably 20+ times...it works great.
0
 
LVL 29

Author Comment

by:fosiul01
ID: 26304535
Hah!! after 2 days of fighting with it!! successfully installed openfile + HA + DRBD!!!


yesterday, As soon I format :
mkfs.ext3 /dev/drbd0

ref : http://www.howtoforge.com/installing-and-configuring-openfiler-with-drbd-and-heartbeat

openfile01 , will hang ..., i tryed 3 times , i have changed hardrive .. samething

today, I start off again with fresh ...

One thing is wired : after i installed openfiler on both server, ( openfiler01 and openfiler02)

if i do , fdisk -l
its show
hda1, had2

then when i update the openfiler ( by going update page) then after restart the server

its shows

sda1 , sda2!!!!

why is that ??

its not wired ??

anyway, its looks good, i am now syncronizeding both master and slaves.. its should be ok



one thing i need to know, how many  node you can setup with drbd ??

so if i have 10 Server, and i need to replication 10 server, i will need another 10 node to replicatate , is not it ??






0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 2000 total points
ID: 26307883
Could you clarify what you mean by nodes and replication? i.e does it apply to the mysql replication you have, to the NFS share common device provided by DRBD on the openfiler?

DRBD handles the hard drive level replication.  Are you looking to replicate drive level data (DRBD) to 10 nodes?

I can not see what you are looking at so it is hard to say whether the /dev/hda1 change to /dev/sda1.  If you are using LVM, did you alter the lvm.conf to not scan devices used for /dev/drb0 /dev/drb1?

update openfiler you mean software update to the most current version?
You have SATA drives?
Did you change the BIOS from IDE to AHDI/SATA?

0
 
LVL 29

Author Comment

by:fosiul01
ID: 26311975
This is now making me mad

One node is saying: I/O error

what i meant was : the Hardrive is connected to  Openfiler, is IDE 20 GB hardrive

when i first install openfiler in that pc, after that if i do
fidisk -l

it will show you as hda1, had2,hda3

so its actually seeing as IDE, right ??

now after I have done System UPdate of openfiler ( Update to most recent version)


after reboot the pc, if i do

fidisk -l

it will show,

sad1,sad2,sda3 !!!

is not wired ???


Could you clarify what you mean by nodes and replication? i.e does it apply to the mysql replication you have, to the NFS share common device provided by DRBD on the openfiler?

No, i am not saying about mysql server replication, its Drive level.

so basically, if i write something on node1, it will replicate automaticaly to node2 is not it ??( realtime like mysql replication ) ??


0
 
LVL 29

Author Comment

by:fosiul01
ID: 26312898
Man , this openfiler is rubbish........

example : if you set Ethernet Ip via Web-interface, it will delete hardware address of that enternet card!!!

Recent UPdate(full system update), make hda to sda, have a look to the picture


, i tryed with 3 pic from last 3 days!!

last one, it made hda to sda, then when i came back to work at morning, it cant find the sda!!!! so it was saying disk less!!!





B4dupdate.GIF
ufterupdate.GIF
0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 2000 total points
ID: 26316259
The idea is once you install openfiler, the configuration and continued management can be done through the web GUI (i.e. for those who are more comfortable with graphical option selection versus having to know which command to issue for a particular task).

I think you can have multiple nodes with DRBD multi-geographical distribution.  I think you may then need to change the mode of the data replication.

Just to be clear you can not use DRBD replication to handle the mysql replication.  The DRBD replication can handle mysql setup as an HA/Cluster.  mysql runs on one node at one time with the database files shared

node1 (active) reads/writes to drbd disk VirtualIP
node2(passive) drbd replicates disk level changes
once node1 fails or you suing the cluadm on a centos/redhat box to fails
the mysql service is stopped on node1 the virtualIp is shifted to node2. mysql service is tarted on node2 accessing the drbd drive.
0
 
LVL 29

Author Comment

by:fosiul01
ID: 26317918
I dont have any intention to do drbd with mysql replication, i will keep that as mysql replication, but you said, " Just to be clear you can not use DRBD replication to handle the mysql replication."

but from this site
http://dev.mysql.com/doc/refman/5.1/en/drbd-mysql-replication-scale.html

its look like you can, but may be there might be some other problem, i will  read that tomorrow


also,

i am not clear about what you said : "mysql service is tarted on node2 accessing the drbd drive."

are you saying to put all data files  to drbd drive ??

like , mysql database datadir /usr/local/mysql/var/

so you saying, change the datadir from one location to Drbd drive ?? so it can replicate  to anothr node??
ppl say, they put mysql datadir in SAN storage ?? is this the same concept??



atlast i got DRBD + openfiler,,!!!!!( THANKS GOD)
i will keep on this whole night, see if the link works or not
but its working perfectly  now


another : how quickly file get replication from one node to another node by drbd ???
0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 2000 total points
ID: 26319850
the mysql+drbd is a pair of servers that are clustered.  only one runs at any one time.  Then you have replicant slave servers.

In a clustered setup nodea and nodeb have their data drives setup under drbd. Only one mysql instance can write into the DRBD drive.
i.e. nodea  /dev/drbd1 as the data drive mounted as /var/lib/mysql
nodeb has the same setup /dev/drbd1 is mounted as /var/lib/mysql.
While nodea is active the IP resources of the cluster is on nodea as well as the mysql service is running.
When nodeb is activated/ The mysql service on nodea is stopped. The IP resource of the cluster shifts to nodeb. mysql is tarted on nodeb.
In this setup the drbd setup is behaving as though nodea and nodeb had a common shared disk drive with only one being able to access it.  The /var/lib/mysql is also where the binary logs are stored.

The DRBD at the cost of the network bandwidth that is needed to transmit the disk level updates, is mimicking the SAN/NFS/DAS/NAS type of common storage.

Now the mysql replication: there are three slave replicas. their master is setup as the cluster IP and in the example you posted it is setup in a hub and spoke.
Presumably the underlying application could read from any slaves/master but will right only to the master clustered IP.

Create a file on one node and then see if you can read the file on the other.
Do you use something like cacti to monitor your servers/networks?
You could monitor the network usage on the DRBD interface and see whether the network usage on the private link between the two nodes is in bursts or is sustained.

The other issue is how you configured the drbd synchronous, asynchronous, dual access i.e. each node can write into the drive.

http://www.drbd.org/docs/about/
part V optimizing DRBD performance has an example on how to test the performance of your DRBD setup.
0
 
LVL 29

Author Comment

by:fosiul01
ID: 26321457
ok  DRBD is BAST....rd ... but i will hang on it till i make it work!!!

AFter followed the artile.. it was running fine, then as soon i reboot both server. after boot up

drbd is saying, diskless in primary node!!!

then i reboot again, its working fine!!

anyway, i will read drbd documentation.

so bottom line is :

use drbd to replicate File ( file server,nfs share, samba share)

and use mysql replication for replicate mysql server,

is not it ??

let me  modify my picture of my network to make it clear


0
 
LVL 29

Author Comment

by:fosiul01
ID: 26321497
Ok

I added my modified structure!!

only thing i need to as you advised, put a tunnel or vpn between 2 WEb server Or just allow user to upload DAta into company Server not WEbserver ....

right ??

any more ??

Company-Replication.jpg
0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 2000 total points
ID: 26323235
Yes.
You can further adjust the drbd performance.  Once satisfied, you could consider using an iSCSI (OpenFiler SAN component) to provide a shared disk resource to a pair of mysql servers configured in a cluster.

The webserver/ftp I do not really remember that discussion.
Limiting to where files can be uploaded will ease management.
saw some discussions on puppet http://reductivelabs.com/products/puppet/ or using subversion as a mechanism where files would be modified and then pushed or pulled. One or both options offer the possibility of reverting back.
0
 
LVL 29

Author Comment

by:fosiul01
ID: 26323471
HI thanks

 iSCSI  : omm i am nto good in this terms, but i will try to find out more about this iscsi.. can you use ide hardrive as iscsi ???

yes, i am started to use puppet ... and will try to manage all by puppet, that why i am installing same services in all server .. all by sources

do you need puppet and subversion both ??
or one will enough ??
0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 2000 total points
ID: 26323736
It all depends on how active your DB is the iscsi is a network based protocol, so make sure you consider using a dedicated separate interface for the iscsi.


Which ever option works for you.  Subversion might be usefull to have backup versions of data i.e. after three four, five changes, someone is reporting a page is not working as it did before. If you do not keep backups of each iteration of the web site, you may have a difficult time determining what the issue might be and how to correct it.
It subversion, you can look back and see what the changes from one version to the next were.
0
 
LVL 29

Author Comment

by:fosiul01
ID: 26323764
hmmm thanks
i will close this question now!! as its gone long!!

i will create few others on those new issue
0
 
LVL 29

Author Comment

by:fosiul01
ID: 26324859
Hi
Sorry the last one

Suppose, i have httpd.conf in 5 server

now i just want to modify 1 httpd.conf and want to pushed those into rest 4 server

i know with puppet you can do that.. i did that.

but just by using subversion, can you do that??

or you need puppet to pushed file into different server, and use subversion to keep track what has been changed??

or by using subversion you can push those httpd.conf to 4 apache server

which one is true??


0
 
LVL 81

Expert Comment

by:arnold
ID: 26327917
With subversion you would need to have a client and have access to the repository.
The subersion is more of a pull setup where you would have a script run on a regular interval on each server checking if a change is detected and then retrieve the changed document.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension . This reminded me of questions that come up here at EE along the lines of, "How can I tell the type of file from its cont…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month11 days, 17 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question