From owner-freebsd-xen@freebsd.org Wed Sep 23 14:36:53 2015 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 259BAA06336 for ; Wed, 23 Sep 2015 14:36:53 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0B4DF1FF1 for ; Wed, 23 Sep 2015 14:36:53 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: by mailman.ysv.freebsd.org (Postfix) id 0A954A06334; Wed, 23 Sep 2015 14:36:53 +0000 (UTC) Delivered-To: xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4716A06333 for ; Wed, 23 Sep 2015 14:36:52 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: from mail.eeeit.de (mail.eeeit.de [37.120.160.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77F881FED for ; Wed, 23 Sep 2015 14:36:51 +0000 (UTC) (envelope-from mike@reifenberger.com) Received: from localhost (localhost [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mike@reifenberger.com) by mail.eeeit.de (Postfix) with ESMTPSA id 2A35E35BB; Wed, 23 Sep 2015 16:36:43 +0200 (CEST) Received: from 212.144.53.198 ([212.144.53.198]) by mail.eeeit.de (Horde Framework) with HTTP; Wed, 23 Sep 2015 16:36:42 +0200 Date: Wed, 23 Sep 2015 16:36:42 +0200 Message-ID: <20150923163642.Horde.C2gq8tfwkC45mOK8NwCIAj-@mail.eeeit.de> From: Michael Reifenberger To: Roger Pau =?utf-8?b?TW9ubsOp?= Cc: xen@freebsd.org Subject: Re: can't start domU after resizing zfs volume References: <20150918194154.Horde.PQcchwucJFPQY4U0K75MgpW@mail.eeeit.de> <56027D61.70207@citrix.com> In-Reply-To: <56027D61.70207@citrix.com> User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 14:36:53 -0000 Zitat von Roger Pau Monné : > El 18/09/15 a les 19.41, Michael Reifenberger ha escrit: >> Hi, >> today I've got my first real xen dom0 error so far: >> >> I had a 20G zfs volume with windows installed (Windows has the PV >> drivers installed). >> The disk section of the cfg looks like: >> ... >> disk = [ >> '/dev/zvol/zdata/VM/win81/root,raw,hda,rw', >> '/VM/ISO/W81.PRO.X64.MULTi8.ESD.Apr2015.iso,raw,hdc:cdrom,r' >> ] >> boot="d" >> ... >> >> >> This works until shutting down the domU and extending the volume (from >> 20G) to 40G: >> >> zfs set volsize=40G zdata/VM/win81/root >> >> Now trying to start the guest I get: >> >> (vm)(root) # xl create win81.cfg >> Parsing config from win81.cfg >> libxl: error: libxl_device.c:950:device_backend_callback: unable to add >> device with path /local/domain/0/backend/vbd/6/768 >> libxl: error: libxl_device.c:950:device_backend_callback: unable to add >> device with path /local/domain/0/backend/vbd/6/5632 >> libxl: error: libxl_create.c:1153:domcreate_launch_dm: unable to add >> disk devices >> libxl: error: libxl_dm.c:1595:kill_device_model: unable to find device >> model pid in /local/domain/6/image/device-model-pid >> libxl: error: libxl.c:1608:libxl__destroy_domid: >> libxl__destroy_device_model failed for 6 >> libxl: error: libxl_device.c:950:device_backend_callback: unable to >> remove device with path /local/domain/0/backend/vbd/6/768 >> libxl: error: libxl_device.c:950:device_backend_callback: unable to >> remove device with path /local/domain/0/backend/vbd/6/5632 >> libxl: error: libxl.c:1645:devices_destroy_cb: libxl__devices_destroy >> failed for 6 >> libxl: info: libxl.c:1691:devices_destroy_cb: forked pid 2306 for >> destroy of domain 6 >> >> Since I saw in syslog that GEOM did some auto-moddings of the disk I did: >> >> `gpart commit zvol/zdata/VM/win81/root` on the dom0, >> and `gpart resize -i 2 zvol/zdata/VM/win81/root` >> but this didn't change the above failure. > > The handbook for bhyve when using ZVOLs is to create them using: > > # zfs create -V16G -o volmode=dev zroot/linuxdisk0 > > Note the volmode=dev, which prevents GEOM from sniffing the partition table. > Thats at least a workaround! Sometimes it would be nice to be able to access/pre-fill domU slices/partitions on dom0 as well... >> Only after reboot the guest can be started so somewhere must be a >> mismatch of cached data... >> >> Any clues? > > This is from my own experience, but xen-blkback doesn't recover from > errors sometimes and ends up in some kind of locked state waiting for a > device to disconnect. Not sure if that's the case here, but I won't be > surprised. How does xen-blkback construct this Path: /local/domain/0/backend/vbd/6/768 or /local/domain/0/backend/vbd/6/5632? Is the volmode=dev changable after creation or only at creation time? BTW: Many thanks for supporting XEN-dom0 under FreeBSD/ZFS. So far it works surprisingly stable (Except some minor glitches like the above) :-) Thanks! Greetings --- Michael Gruß --- Michael Reifenberger