[DRBD-user] Problems using image files with drbd, maybe unsupported?

Lars Ellenberg lars.ellenberg at linbit.com
Wed Oct 6 17:25:17 CEST 2010


On Wed, Oct 06, 2010 at 02:23:49PM +0200, Martin Fandel wrote:
> Now it works :). My fault was that I've used yast2 instead of xm on the console. If I start the vm via xm, it works fine... yast ckzskz...
> 
> Here are the steps I've done:
> 
> virtual-n1 is secondary node!
> 
> Configuration / State details:
> virtual-n1:~ # cat /proc/drbd 
> version: 8.3.7 (api:88/proto:86-91)
>  1: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r----
>     ns:0 nr:794500 dw:968596 dr:24677 al:14 bm:1563 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
> virtual-n1:~ # cat /etc/drbd.d/xen.res
> resource xen {
>    protocol	C;
>    disk {
>       on-io-error	pass_on;
>    }
>    syncer {
>       rate	100M;
>    }
>    net {
>    }
>    startup {
>    }
>    on virtual-n1 {
>       device	/dev/drbd1 ;
>       address	192.168.100.1:5001;
>       meta-disk	internal;
>       disk	/dev/sdc1;
>    }
>    on virtual-n2 {
>       device	/dev/drbd1 ;
>       address	192.168.100.2:5001;
>       meta-disk	internal;
>       disk	/dev/sdc1;
>    }
> }
> virtual-n2:~ # cat /etc/xen/vm/trnagios
> name="trnagios"
> uuid="dce10d36-3498-50f5-505c-e61615da090e"
> memory=512
> maxmem=512
> vcpus=1
> on_poweroff="destroy"
> on_reboot="restart"
> on_crash="destroy"
> localtime=0
> keymap="de"
> builder="linux"
> bootloader="/usr/lib/xen/boot/domUloader.py"
> bootargs="--entry=xvda2:/boot/vmlinuz-xen,/boot/initrd-xen"
> extra="xencons=tty "
> disk=[ 'file:/var/lib/xen/images/trnagios/disk0,xvda,w', ]
> vif=[ 'mac=00:16:3e:00:97:38,bridge=br0', ]
> nographic=1
> 
> Here we go, manual "unplanned failover" test:
> 
> virtual-n1:~ # drbdadm disconnect all
> virtual-n1:~ # cat /proc/drbd 
> version: 8.3.7 (api:88/proto:86-91)
>  1: cs:StandAlone ro:Secondary/Unknown ds:UpToDate/DUnknown   r----
>     ns:0 nr:822316 dw:996412 dr:24677 al:14 bm:1563 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
> virtual-n1:~ # drbdadm primary all
> virtual-n1:~ # cat /proc/drbd 
> version: 8.3.7 (api:88/proto:86-91)
>  1: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown   r----
>     ns:0 nr:822316 dw:996412 dr:25277 al:14 bm:1563 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
> virtual-n1:~ # mount /dev/drbd1 /var/lib/xen/images/
> virtual-n1:~ # ls -lha /var/lib/xen/images/trnagios/disk0 
> -rw------- 1 root root 20G  6. Okt 14:15 /var/lib/xen/images/trnagios/disk0
> virtual-n1:~ # xm create trnagios
> virtual-n1:~ # ssh trnagios
> Password:
> 
> :D :D :D I'm sooooooo happy :). I thought I can trust yast in starting the vm after unclean cut. But this doesn't work... I'm fine with this solution. DRBD rocks!

And you are sure you  ssh'ed into your "newly started" trnagios now running
on this host, not into the "still running" trnagios still running on the other?

 ;-)

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed


More information about the drbd-user mailing list