[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] drbd and xen problem: disk not accessible


  • To: "Marco Strullato" <marco.strullato@xxxxxxxxx>
  • From: "Ross S. W. Walker" <rwalker@xxxxxxxxxxxxx>
  • Date: Wed, 23 Apr 2008 11:13:05 -0400
  • Cc: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 23 Apr 2008 08:13:40 -0700
  • Importance: normal
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Priority: normal
  • Thread-index: AcilT0hwbCyHUN/5SLu4RDsjW8V5XgAAYyEA
  • Thread-topic: [Xen-users] drbd and xen problem: disk not accessible

Marco Strullato wrote:
> > > disk = [ "drbd:r0,xvda,w" ]
> >
> >             ^^^^^^^
> >  Where did you get this config info from, as far as I
> >  know it should be:
> >
> >  disk = [ "phy:drbd0,xvda,w" ]
> 
> 
> I get this from this guide:
> http://www.drbd.org/users-guide/s-xen-configure-domu.html
> 
> 
> > Setting drbd resources per-lv will become very messy
> >  over time as the number of guests increase. I advise
> >  replicating PVs between hosts and adding the drbdX
> >  resources to shared VGs. If you maintain all your
> >  VMs in xenstore then the VM config should migrate
> >  between machines so you don't need to have the VM
> >  config present on both machines beforehand and
> >  therefore you will not be able to start the same
> >  VM on 2 machines at once and therefore shouldn't
> >  need to run CLVM which would get in the way of VM
> >  migration.
> >
> 
> This is interesting: could you be more precise please?
> How do you suggest me to set up the envirorment?

You will need to do this with Xen 3.2 as I do not
believe that RH/CentOS libvirt will migrate the VM
config!

Drbd setups are really only good for 2 servers, if you
want more Xen servers then 2 then look into an iSCSI
implementation.

So, say we have 2 servers, they have 2 SATA disks in
a mirror for OS, and 4 SATA disks in a RAID5/6/50/60/10
for guests. Both servers identical.

Lets say /dev/sda is OS mirror and /dev/sdb is guest
RAID (could be /dev/mdX for OS and /dev/mdX+1 for RAID
if doing software RAID).

Create a drbd resource out of /dev/sdb on both hosts
set as primary-primary and sync it up fully. Test it
make sure drbd is properly setup and performing as it
should.

NOTE: You will need to keep the meta-data on a separate
disk in drbd! I advise creating a LV on the OS mirror
and putting the drbd meta-data there.

Next make /dev/drbd0 a pv with pvcreate, create a VG
out of the PV, then on the other host do a pvscan, and
import the VG there.

Then you can create an LV on host1, lvscan on host2
and it should appear there. Test it out back and
forth until your comfortable it works as advertised.

Create a domU config file and test it out with your
first LV, make sure it boots and installs correctly,
then when you are comfortable with it import it into
the xenstore with 'xm new <config file>', after that
the VM should appear in 'xm list' all the time until
it is migrated to another host, whether it is up or
down it will show up in the list.

Then bring it up on host 1 with 'xm start <dom name>'
when the host is up and running you can do a
'xm migrate <dom name> <host name>' and it should
just move over to the second host.

Once you are comfortable this works you might want to
look into some kind of VM load-balancing/fail-over
application. Maybe someone has a nice heartbeat with
load balancing configs and scripts put together. The
idea is to have the virtual machine servers self
managing.

-Ross


______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.