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] drbd and xen problem: disk not accessible

To: "Ross S. W. Walker" <rwalker@xxxxxxxxxxxxx>, "Marco Strullato" <marco.strullato@xxxxxxxxx>
Subject: RE: [Xen-users] drbd and xen problem: disk not accessible
From: "Ross S. W. Walker" <rwalker@xxxxxxxxxxxxx>
Date: Wed, 23 Apr 2008 12:21:29 -0400
Cc: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 23 Apr 2008 09:22:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
Importance: normal
In-reply-to: <E2BB8074E5500C42984D980D4BD78EF9022A711F@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Priority: normal
References: <b9f669850804230710n4f13dab2hd965d8ecf52cce42@xxxxxxxxxxxxxx><E2BB8074E5500C42984D980D4BD78EF9022A711C@xxxxxxxxxxxxxxxxxxxxx><b9f669850804230735y631668c7y3e0c8308d216855f@xxxxxxxxxxxxxx> <E2BB8074E5500C42984D980D4BD78EF9022A711F@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcilT0hwbCyHUN/5SLu4RDsjW8V5XgAAYyEAAAMlO7A=
Thread-topic: [Xen-users] drbd and xen problem: disk not accessible
Ross S. W. Walker wrote:
> 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.

You can by the way convert this existing setup to iSCSI
by turning these 2 servers into iSCSI targets and
exporting the /dev/drbd0 PV on each to say Xen blade
servers setup with multi-path fail-over (don't do it
round-robin as the drbd latency and io ordering will
get in the way!).

> 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.

After some thought, this isn't a requirement, but
adviseable anyway to allow proper VG resizing and to
make sure the meta-data io doesn't collide with the
disk io.

> 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