Re: xbd attach as ada
- Reply: Roger Pau Monné : "Re: xbd attach as ada"
- In reply to: Echo Nar : "xbd attach as ada"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Jan 2023 00:21:36 UTC
On Jan 19, 2023, at 1:48 AM, Echo Nar <echo@lethedata.com> wrote: > Hello, > > I've been trying to understand a bit more about how FreeBSD handles xvd (xbd) > disks due to Bug 269023. I was wondering why does xbd blocks attach as ada > devices rather than just act as xbd devices directly. > > > dmesg snipit: > xbd0: 16384MB <Virtual Block Device> at device/vbd/768 on xenbusb_front0 > xbd0: attaching as ada0 > xbd0: features: write_barrier > xbd0: synchronize cache commands enabled. I can’t speak to that — it’s probably related to how emulated ATA devices get “taken over” by the blkfront (xbd) driver — but one detail I can provide is that depending on how you configure the VM, it is possible for the device to show up as _only_ an xbd device and not adaN. For example, from one of my VMs (Linux Dom0, FreeBSD 12.3 VM), using the xl.cfg(5)/xl-disk-configuration(5) syntax: # hda/ada0: LV in xen_san VG # xvdb/xbd1: permanent device ID (rather than sdc) for LUN 2 from SAN disk=[ 'phy:/dev/xen_san/backup,hda,w', 'phy:/dev/disk/by-id/wwn-0x60004d9...,xvdb,w', ] Inside the VM, they show up like this: xbd0: 12288MB <Virtual Block Device> at device/vbd/768 on xenbusb_front0 xbd0: attaching as ada0 xbd0: features: flush, write_barrier xbd0: synchronize cache commands enabled. xbd1: 1933233MB <Virtual Block Device> at device/vbd/51728 on xenbusb_front0 xbd1: features: flush, write_barrier xbd1: synchronize cache commands enabled. Note that xbd1 does not attach as an ada device. When I upgraded the OS on the Dom0 (which included upgrading Xen from 4.4 to 4.12; there was no change inside the VM at this time), one change was that I could no longer attach different virtual disks as 'hda' and 'xvda' (aka ada0 and xbd0) or I’d get a similar issue to what you’re experiencing. I had to change the VM config to use xvdb instead. In the old days you needed ATA devices for your VM’s boot drive (so SeaBIOS could see it), but if you’re using UEFI that may not be necessary. -Andrew