This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes partitions & hdd type matter's in drbd-heartbeat in CENTOS-5.4? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "partitions & hdd type matter Watch "partitions & hdd type matter New topic

partitions & hdd type matter's in drbd-heartbeat in CENTOS-5.4?

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 492

I have 1 node which has dual boot windows XP & centos.(First it has only xp then i add centos with help of GPARTED).
2nd node completely centos.

On both nodes i try to use java project which create some data & stored in tables which created by mysql.
Both nodes should synchronize so i use DRBD- Heartbeat so database should store in shared disk & any node can handle it.
As DRBD -Heartbeat use for when one node fails then another should up & take responsibility,java project also work on same theme.
When i try to check whether my concept actually working or not...
I face few problems.

node 1 has centos on LVM, hdc2 & 3 & hdc4 for DRBD partition.
Node 2 has all partition as sda(partition no).

Question. For DRBD Heartbeat it necessary to both node have same partitioning pattern?(node 1 has 1 primary partitions which contain XP, on logical partition there are 3 partitions 2 for centos & 3rd for DRBD, node 2 has all partitions as primary.) Or as i ask in serverfault i try to run mysql from shared disk so each time i have to enter following command on primary node.

Millions saw the apple fall, but Newton asked why.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960

The partitioning doesn't matter, but the partition sizes do, since what drbd actually replicates is partitions or their logical equivalents (LVM logical volumes). The secondary has to have a container of the same size as the primary for each drbd resource being replicated.

It's worth noting that the secondary does not have an accessible filesystem. Until it becomes a primary, it's basically just a place where bytes get dumped. Only a primary can be mounted as a filesystem. If you need actual mirrored cross-system access, look at something like GFS, instead.

Customer surveys are for companies who didn't pay proper attention to begin with.
Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 492

Thanks Tim Holloway,
Your information helpful for me.
You are trying to telling me Global file system or Google File System?
By this word i got confuse...Currently i use Ext3, which is the default file system for many popular Linux distributions!
For using GFS should i change in java project?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960

I don't think you can get Google File System unless you're Google.

The Global File System, on the other hand, is readily available for RHEL and compatible Linux distros.

To use GFS, you need CLVM installed on the nodes that will be mirroring, as it handles the raw mirroring functions. You also should ideally have hardware fencing support.

GFS is just like any other Linux filesystem to use, you mount it just like you would an ext2/ext3/ext4/reiserfs, etc. etc. etc. No Java code changes required.

One thing to keep in mind, however, is that in order to preserve filesystem integrity across shared nodes, GFS does a lot of locking. So performance is best on read-mostly use.
jQuery in Action, 2nd edition
subject: partitions & hdd type matter's in drbd-heartbeat in CENTOS-5.4?
Similar Threads
Shared Drive access from WebSphere
Test 252: Mock exam
W2K & SUSE 10 / Dual boot
Test 252 Primer Q&A
CentOS repeatedly restart