Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mandar Khire
Ranch Hand
Posts: 567
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18028
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mandar Khire
Ranch Hand
Posts: 567
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim Holloway,
Your information helpful for me.
GFS
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
Pie
Posts: 18028
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic