Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xbd and large sectors



On Thu, 20 Jul 2023, Greg Troxel wrote:
> Over on netbsd-users@, we have been discussing a problem where a dom0
> has a disk with 4K sectors and it is being provided to a domU.  Things

Thank you Greg for taking this to port-xen! For everyone else, this is my 
initial post: https://mail-index.netbsd.org/netbsd-users/2023/07/20/msg029875.html

Some more details were requested over there. So, for example when booting 
NetBSD 9.3 in Xen HVM mode, the disk is represented as wd(4) instead and 
the disk size (8 GB) is recognized correctly:

 wd0 at atabus0 drive 0
 wd0: <QEMU HARDDISK>
 wd0: drive supports 16-sector PIO transfers, LBA48 addressing
 wd0: 8192 MB, 16644 cyl, 16 head, 63 sec, 512 bytes/sect x 16777216 sectors
 wd0: 32-bit data port
 wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
 wd0(piixide0:0:0): using PIO mode 4, DMA mode 2 (using DMA)

Curiously enough, when booting boot.iso from NetBSD-daily (202307191930Z) 
in HVM mode again, the disk appears to be accessed via xbd(4), and shows 
an incorrect disk size, and errors too:

 xbd0 at xenbusO id 51712
 xbd0: using event channel 13
 xbd0: 65536 MB, 512 bytes/sect x 134217726 sectors
 xbd0: backend features 0xc<PERSISTENT, INDIRECT>
 unknown type vkbdxbd0d: error reading fsbn 0 (xbd0 bn 0; cn 0 tn 0 sn 0)
   at xenbus0xbd0: dos partition I/0 error
   id 0xbd0d: error reading fsbn 0 of 0-31 (xbd0 bn 0; ch 0 tn 0 sn 0)
 xbd0d: error reading fsbn 1 (xbd0 bn 1; cn 0 tn 0 sn 1)
 xbd0d: error reading fsbn 0 (xbd0 bn 0; cn 0 tn 0 sn 0)
 xbd0: dos partition I/0 error

Let's find out if I'm allowed to attach files here: I've attached the 
output of "xenstore-ls" on the Dom0 domain, the running NetBSD domain 
(still in HVM mode) has id "35", with three disks attached:

 disk = [ 'format=raw, vdev=xvda, access=rw, target=/dev/vg0/netbsd-disk0',
          'format=raw, vdev=xvdb, access=rw, target=/dev/vg0/netbsd-disk1',
          'format=raw, vdev=xvdc, access=ro, devtype=cdrom, target=/var/local/vm/boot/netbsd/netbsd-boot.iso.202307191930Z',

I hope this helps with debugging somehow.

Thank you for your efforts here,
Christian.
-- 
BOFH excuse #248:

Too much radiation coming from the soil.


Home | Main Index | Thread Index | Old Index