Posted on 2007-07-21
I have a few questions about DRBD. All of this is on Centos5 with DRBD 8
My current set up consists of 3 servers we will call them server1, server2 and server3.
Server1 and Server2 are going to be mirrored using DRBD and also be exporting my gnbd block devices(Server1 primary and Server2 secondary). I have created 3 partitions one for the metadata for DRBD and 2 others for xen domU's on both Server1 and Server2. I set up a vip address for Server1 and Server2 to use incase of failover.
Server3 will be importing the gnbd block devices for my xen domU's. In the event of a server outage the idea is for Server3 never to be disconnected from the gnbd block devices unless of course the whole site goes down. So basically if Server1 goes down then Server2 will pickup.
My confusion with DRBD:
If I have the partition i.e /dev/VolGroup02/test (7g partition) on Server1 and Server2 assigned to /dev/drbd0 where do I install my xen domU's? Do I export test as a gnbd device and install my domU? Or do I install it on /dev/drbd0?
When I create a drbd mirror with the test partition and do mkfs.ext3 everything syncs I can then export the device using gnbd and mount it, create a file and see that file when I make server1 secondary and bring up server2 as primary.
But if I install my xen domU on this gnbd device I cannot do that anymore drbd no longer recognizes the file system anymore and doesn't mirror the data real time I have to tell drbd that one of them is out of sync. And then it will sync them up. Should I be installing it this way? Should I install the xen domU first and then put drbd on it? I a little lost as to what I'm missing.
I'm hoping someone can point me in the right direction.