WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Re: LVM on DRBD -OR- DRBD on LVM?

<stuff deleted>
Each domU has its own LVs in this case (hda/swap). So im mirroring the
entire pv using drbd0.
So, just to be sure, you have a PV just for the domU LV's then? Like a whole partition or separate hard drive? (like, in our case, we created a PV out of /dev/sda3 ... sorta)

So this means i have to have a script to start lvm, then start each domU...
LVM generally starts up with the OS startup scripts, but if _all_ of your domU data is on a single PV (and _none_ of your dom0 data is on that PV), then you could do this ... just move the position of the LVM startup script in your /etc/rc?.d to after drbd's startup.

I *seem* to have this working i think, here is how its currently
configured (note, no XEN yet):

drbd starts before lvm and then i have a script to make server1 the
primary (is there a way to do this in the configuration?).
Not that I know of, but I've not looked for that, really.
On server2
i have removed lvm from boot init. Once at the command line i can
mount one of the lvs on server1, read/write to it etc. Turn the power
off of server one to fake a hw problem. Then i have a script that i
can run on server2 to make it primary and start lvm, mount the drive
see the changes from server1. And then boot server1 etc...
Good.
What i have found is that if i try to start lvm on the secondary i get lots of errors:
You mean start LVM on server2 while server1 is still the primary? No can do! DRBD is active/passive (in it's current incarnation), and besides, unless you are running something like RedHat's Cluster LVM (clvm), the plain old LVM doesn't understand multi access (active/active) VGs yet, I don't think.

I felt that replicating swap was just a waste of resources as we can't
do hot migration anyway, so upon reboot, anything in swap is gone anyhow.

Noted - had the same thoughts.
The downside to replicating the whole PV, you are stuck inherently replicating swap activity, too. That's one reason why we are replicating at the LV level (that and I want to be able to run the guests *not* only on one primary server).

For simplistys sake, i just really want one dom0 where all our domUs
run. This will be running web(LAMP)/mail/dns and secondary mail/dns is
on a seperate server in a different location.
Are you building lots of LAMP servers or just one or ? I'm trying to see where Xen will fit into this :)

I also saw your posts on the DRBD list, and it sounds like you are making good progress!

--Sam

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users