Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Apr 2024 14:44:06 +0200
From:      Roger Pau =?utf-8?B?TW9ubsOp?= <roger.pau@citrix.com>
To:        Brian Buhrow <buhrow@nfbcal.org>
Cc:        xen@freebsd.org
Subject:   Re: Freebsd-13.1 as domu cannot use multiple virtual disks
Message-ID:  <ZiJnFg4LGvui87R9@macbook.local>
In-Reply-To: <202404190559.43J5x9eZ015862@nfbcal.org>
References:  <202404190559.43J5x9eZ015862@nfbcal.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 18, 2024 at 10:59:09PM -0700, Brian Buhrow wrote:
> 	Hello.  I'm running FreeBSD-13.1 as a domu on xen-4.16.0 and I find I cannot use multiple
> virtual disks on  the same virtual guest.
> 
> 
> The problem appears to be related to the way the geom layer sorts the disks.  Somehow it thinks
> the first and second disks are related.  
> 
> Here is the configuration of the disks for the virtual machine:
> 
> 
> disk = [
> 'file:/var/xen/nfbcal/fbsd_dev/disk0,0x1,rw',
> 'file:/var/xen/nfbcal/fbsd_dev/disk1,0x2,rw'
>  ]

The vdev syntax that you are using is not a valid one, see:

https://xenbits.xen.org/docs/unstable/man/xen-vbd-interface.7.html

That wants to be:

disk = [
'file:/var/xen/nfbcal/fbsd_dev/disk0,xvda,rw',
'file:/var/xen/nfbcal/fbsd_dev/disk1,xvdb,rw'
 ]

Or hd{a,b}.

I've tried using 0x1 and 0x2 as your example, and it results in some
errors in geom.

> Here's what the virtual guest reports when it boots:
> 
> 
> xbd0: 51200MB <Virtual Block Device> at device/vbd/1 on xenbusb_front0
> xbd0: features: flush, write_barrier
> xbd0: synchronize cache commands enabled.
> xbd1: 100000MB <Virtual Block Device> at device/vbd/2 on xenbusb_front0
> xbd1: features: flush, write_barrier
> xbd1: synchronize cache commands enabled.
> Trying to mount root from ufs:/dev/gpt/root []...
> sysctl_warn_reuse: can't re-use a leaf (kern.geom.disk.xbd0.led)!
> sysctl_warn_reuse: can't re-use a leaf (kern.geom.disk.xbd0.flags)!
> g_dev_taste: make_dev_p() failed (gp->name=xbd0, error=17)
> 
> 
> Any ideas what I'm doing wrong?  this must work, right?

It does work for me when using xvd{a,b}:

[...]
xbd0: 6176MB <Virtual Block Device> at device/vbd/51712 on xenbusb_front0
xbd0: features: flush, write_barrier
xbd0: synchronize cache commands enabled.
xbd1: 6176MB <Virtual Block Device> at device/vbd/51728 on xenbusb_front0
xbd1: features: flush, write_barrier
xbd1: synchronize cache commands enabled.
Trying to mount root from ufs:/dev/xbd0p4 []...
WARNING: WITNESS option enabled, expect reduced performance.
random: unblocking device.
Setting hostuuid: 116f6f55-b478-11ee-a8a1-48210b35a577.
Setting hostid: 0xa6037d1b.
Starting file system checks:
/dev/xbd0p4: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/xbd0p4: clean, 331160 free (2664 frags, 41062 blocks, 0.2% fragmentation)
/dev/gpt/efiesp: FILESYSTEM CLEAN; SKIPPING CHECKS
Mounting local filesystems:.
[...]

Regards, Roger.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZiJnFg4LGvui87R9>