Hello, i want to setup a VM which has another VM as failover. We use images where we store the VM in. Most people use drbd and heartbeat for this, is this the best solution fors this? When I use XEN images, how do I have to define the image in drbd? on ares.bluethings.net { device /dev/drbd0; disk /dev/sda5; address 172.16.6.2:7788; flexible-meta-disk internal; } The VM images dont exist yet, so I can do a fresh start and pick the best method for setting this up. Please share your guides on this. thx .r _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Jul 24, 2008 at 10:49 AM, Heiko <rupertt@gmail.com> wrote:> Hello, > i want to setup a VM which has another VM as failover. > We use images where we store the VM in. > Most people use drbd and heartbeat for this, is this the best solution > fors this? > > When I use XEN images, how do I have to define the image in drbd? > > on ares.bluethings.net { > device /dev/drbd0; > disk /dev/sda5; > address 172.16.6.2:7788; > flexible-meta-disk internal; > } >Am I right that the guy in this http://marksitblog.blogspot.com/2007/07/mysql-5-high-availability-with-drbd-8.html guide is using drbd inside the VM to mirror the /dev/sda1 inside the VM? thx> The VM images dont exist yet, so I can do a fresh start and pick the > best method for setting this up. > > Please share your guides on this. > > thx > > .r >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel Asplund
2008-Jul-24 17:19 UTC
Re: [Xen-users] Re: creating a xen failover with lookback images
>> Hello, >> i want to setup a VM which has another VM as failover. >> We use images where we store the VM in. >> Most people use drbd and heartbeat for this, is this the best solution >> fors this? >> >> When I use XEN images, how do I have to define the image in drbd? >> >> on ares.bluethings.net { >> device /dev/drbd0; >> disk /dev/sda5; >> address 172.16.6.2:7788; >> flexible-meta-disk internal; >> } >> > Am I right that the guy in this > http://marksitblog.blogspot.com/2007/07/mysql-5-high-availability-with-drbd-8.html > guide is using drbd inside the VM to mirror the /dev/sda1 inside the VM? > > thx >Yeah, he is running DRBD inside the VM to allow for failover with heartbeat of the VMs. I believe using LVM, DRBD and heartbeat is the best solution for this, it will give you a very flexible solution. I run this myself. Not inside the VMs but on the Dom0 nodes. But the principle is the same when configuring it. Cool solution would be to run a cluster both on the Dom0s and inside the DomUs, maybe something to try. :) Please have a look at my XEN cluster guide at: http://www.asplund.nu/xencluster/xen-cluster-howto.html It is not fully complete but maybe you can get some ideas about the DRBD setup. Cheers, Daniel _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Heiko
2008-Jul-28 11:18 UTC
Re: [Xen-users] Re: creating a xen failover with lookback images
On Thu, Jul 24, 2008 at 7:19 PM, Daniel Asplund <danielsaori@gmail.com> wrote:>>> Hello, >>> i want to setup a VM which has another VM as failover. >>> We use images where we store the VM in. >>> Most people use drbd and heartbeat for this, is this the best solution >>> fors this? >>> >>> When I use XEN images, how do I have to define the image in drbd? >>> >>> on ares.bluethings.net { >>> device /dev/drbd0; >>> disk /dev/sda5; >>> address 172.16.6.2:7788; >>> flexible-meta-disk internal; >>> } >>> >> Am I right that the guy in this >> http://marksitblog.blogspot.com/2007/07/mysql-5-high-availability-with-drbd-8.html >> guide is using drbd inside the VM to mirror the /dev/sda1 inside the VM? >>Hi Daniel, i reinstalled both servers and now have LVM. Since I dont use the Xen-tools and use CentOS, i would like to install the VM with virt-install, I started the installation with: virt-install \ --name=ticketsystem \ --ram=2000 \ --file=/dev/vg01/lv_myVM \ --vcpus=2 \ --os-variant=centos5 \ --nographics \ --location ftp://wftp.tu-chemnitz.de/pub/linux/centos/5.2/os/x86_64/ \ it ran thorugh, now I did shut it down and changed the VM config: disk = [ "drdb:ticketsystem,xvda1,w" , "file:/VM/ticketsystem_swap.img,xvda2,w"] [root@pc] xm create ticketsystem -c Using config file "/etc/xen/ticketsystem". No handlers could be found for logger "xend" Error: Disk isn''t accessible It looks like xend doesnt like the drbd thing? how can i get this working? thx>> thx >> > > Yeah, he is running DRBD inside the VM to allow for failover with > heartbeat of the VMs. > > I believe using LVM, DRBD and heartbeat is the best solution for this, > it will give you a very flexible solution. I run this myself. Not > inside the VMs but on the Dom0 nodes. But the principle is the same > when configuring it. Cool solution would be to run a cluster both on > the Dom0s and inside the DomUs, maybe something to try. :) >> Please have a look at my XEN cluster guide at: > http://www.asplund.nu/xencluster/xen-cluster-howto.html > It is not fully complete but maybe you can get some ideas about the DRBD setup. > > Cheers, Daniel > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Heiko
2008-Jul-28 11:33 UTC
Re: [Xen-users] Re: creating a xen failover with lookback images
On Mon, Jul 28, 2008 at 1:18 PM, Heiko <rupertt@gmail.com> wrote:> On Thu, Jul 24, 2008 at 7:19 PM, Daniel Asplund <danielsaori@gmail.com> wrote: >>>> Hello, >>>> i want to setup a VM which has another VM as failover. >>>> We use images where we store the VM in. >>>> Most people use drbd and heartbeat for this, is this the best solution >>>> fors this? >>>> >>>> When I use XEN images, how do I have to define the image in drbd? >>>> >>>> on ares.bluethings.net { >>>> device /dev/drbd0; >>>> disk /dev/sda5; >>>> address 172.16.6.2:7788; >>>> flexible-meta-disk internal; >>>> } >>>> >>> Am I right that the guy in this >>> http://marksitblog.blogspot.com/2007/07/mysql-5-high-availability-with-drbd-8.html >>> guide is using drbd inside the VM to mirror the /dev/sda1 inside the VM? >>> > Hi Daniel, > i reinstalled both servers and now have LVM. > Since I dont use the Xen-tools and use CentOS, i would like to install > the VM with virt-install, > I started the installation with: > > virt-install \ > --name=ticketsystem \ > --ram=2000 \ > --file=/dev/vg01/lv_myVM \--file=/dev/vg01/lv_myVM \ should be --file=/dev/drdb0 i guess> --vcpus=2 \ > --os-variant=centos5 \ > --nographics \ > --location ftp://wftp.tu-chemnitz.de/pub/linux/centos/5.2/os/x86_64/ \ > > it ran thorugh, now I did shut it down and changed the VM config: > > disk = [ "drdb:ticketsystem,xvda1,w" , "file:/VM/ticketsystem_swap.img,xvda2,w"] >should be disk = [ "drbd:ticketsystem,xvda1,w" , "file:/VM/ticketsystem_swap.img,xvda2,w"]> [root@pc] xm create ticketsystem -c > Using config file "/etc/xen/ticketsystem". > No handlers could be found for logger "xend" > Error: Disk isn''t accessible > > It looks like xend doesnt like the drbd thing? > > how can i get this working? > > thx > >>> thx >>> >> >> Yeah, he is running DRBD inside the VM to allow for failover with >> heartbeat of the VMs. >> >> I believe using LVM, DRBD and heartbeat is the best solution for this, >> it will give you a very flexible solution. I run this myself. Not >> inside the VMs but on the Dom0 nodes. But the principle is the same >> when configuring it. Cool solution would be to run a cluster both on >> the Dom0s and inside the DomUs, maybe something to try. :) >> > > >> Please have a look at my XEN cluster guide at: >> http://www.asplund.nu/xencluster/xen-cluster-howto.html >> It is not fully complete but maybe you can get some ideas about the DRBD setup. >> >> Cheers, Daniel >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users >> >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Heiko
2008-Jul-28 12:01 UTC
Re: [Xen-users] Re: creating a xen failover with lookback images
On Mon, Jul 28, 2008 at 1:33 PM, Heiko <rupertt@gmail.com> wrote:> On Mon, Jul 28, 2008 at 1:18 PM, Heiko <rupertt@gmail.com> wrote: >> On Thu, Jul 24, 2008 at 7:19 PM, Daniel Asplund <danielsaori@gmail.com> wrote: >>>>> Hello, >>>>> i want to setup a VM which has another VM as failover. >>>>> We use images where we store the VM in. >>>>> Most people use drbd and heartbeat for this, is this the best solution >>>>> fors this? >>>>> >>>>> When I use XEN images, how do I have to define the image in drbd? >>>>> >>>>> on ares.bluethings.net { >>>>> device /dev/drbd0; >>>>> disk /dev/sda5; >>>>> address 172.16.6.2:7788; >>>>> flexible-meta-disk internal; >>>>> } >>>>> >>>> Am I right that the guy in this >>>> http://marksitblog.blogspot.com/2007/07/mysql-5-high-availability-with-drbd-8.html >>>> guide is using drbd inside the VM to mirror the /dev/sda1 inside the VM? >>>> >> Hi Daniel, >> i reinstalled both servers and now have LVM. >> Since I dont use the Xen-tools and use CentOS, i would like to install >> the VM with virt-install, >> I started the installation with: >> >> virt-install \ >> --name=ticketsystem \ >> --ram=2000 \ >> --file=/dev/vg01/lv_myVM \ > > --file=/dev/vg01/lv_myVM \ should be --file=/dev/drdb0 i guess > >> --vcpus=2 \ >> --os-variant=centos5 \ >> --nographics \ >> --location ftp://wftp.tu-chemnitz.de/pub/linux/centos/5.2/os/x86_64/ \ >> >> it ran thorugh, now I did shut it down and changed the VM config: >> >> disk = [ "drdb:ticketsystem,xvda1,w" , "file:/VM/ticketsystem_swap.img,xvda2,w"] >>still wont boot: xm create ticketsystem -c Using config file "./ticketsystem". Traceback (most recent call last): File "/usr/bin/pygrub", line 651, in ? fs = fsimage.open(file, get_fs_offset(file)) IOError: [Errno 95] Operation not supported No handlers could be found for logger "xend" Error: Boot loader didn''t return any data! I did a complete reinstall to /dev/drbd0> should be disk = [ "drbd:ticketsystem,xvda1,w" , > "file:/VM/ticketsystem_swap.img,xvda2,w"] > > > >> [root@pc] xm create ticketsystem -c >> Using config file "/etc/xen/ticketsystem". >> No handlers could be found for logger "xend" >> Error: Disk isn''t accessible >> >> It looks like xend doesnt like the drbd thing? >> >> how can i get this working? >> >> thx >> >>>> thx >>>> >>> >>> Yeah, he is running DRBD inside the VM to allow for failover with >>> heartbeat of the VMs. >>> >>> I believe using LVM, DRBD and heartbeat is the best solution for this, >>> it will give you a very flexible solution. I run this myself. Not >>> inside the VMs but on the Dom0 nodes. But the principle is the same >>> when configuring it. Cool solution would be to run a cluster both on >>> the Dom0s and inside the DomUs, maybe something to try. :) >>> >> >> >>> Please have a look at my XEN cluster guide at: >>> http://www.asplund.nu/xencluster/xen-cluster-howto.html >>> It is not fully complete but maybe you can get some ideas about the DRBD setup. >>> >>> Cheers, Daniel >>> >>> _______________________________________________ >>> Xen-users mailing list >>> Xen-users@lists.xensource.com >>> http://lists.xensource.com/xen-users >>> >> >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel Asplund
2008-Jul-28 16:05 UTC
Re: [Xen-users] Re: creating a xen failover with lookback images
>>> Hi Daniel, >>> i reinstalled both servers and now have LVM. >>> Since I dont use the Xen-tools and use CentOS, i would like to install >>> the VM with virt-install, >>> I started the installation with: >>> >>> virt-install \ >>> --name=ticketsystem \ >>> --ram=2000 \ >>> --file=/dev/vg01/lv_myVM \ >> >> --file=/dev/vg01/lv_myVM \ should be --file=/dev/drdb0 i guess >> >>> --vcpus=2 \ >>> --os-variant=centos5 \ >>> --nographics \ >>> --location ftp://wftp.tu-chemnitz.de/pub/linux/centos/5.2/os/x86_64/ \ >>> >>> it ran thorugh, now I did shut it down and changed the VM config: >>> >>> disk = [ "drdb:ticketsystem,xvda1,w" , "file:/VM/ticketsystem_swap.img,xvda2,w"] >>> > still wont boot: > > xm create ticketsystem -c > Using config file "./ticketsystem". > Traceback (most recent call last): > File "/usr/bin/pygrub", line 651, in ? > fs = fsimage.open(file, get_fs_offset(file)) > IOError: [Errno 95] Operation not supported > No handlers could be found for logger "xend" > Error: Boot loader didn''t return any data! > > I did a complete reinstall to /dev/drbd0 >Believe your problem is with pygrub, that doesn''t play well with DRBD. Have a look at the following post with similar issue: http://lists.linbit.com/pipermail/drbd-user/2007-November/007808.html Follow those instructions, by removing the pygrub bootloader and copying the kernel and initrd to your Dom0. Hopefully that will do it. Cheers, Daniel _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users