how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Jiri B-2
Hi,

it seems virtio-scsi is not working correctly in OpenBSD, I gave it
a try today and OpenBSD VM was killed with:

  2017-03-13T15:29:00.814657Z qemu-kvm: wrong size for virtio-scsi headers

on EL7 with qemu-kvm-rhev-2.6.0-28.el7_3.6.x86_64.

I found a bug stating it is OpenBSD's fault
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768517

I'd like to provide more info but could you give me some hints
please? I tried to attach debugger to qemu-kvm process but I get
only this :/

  [Thread 0x7f6035207700 (LWP 10766) exited]
  [Thread 0x7f5feedff700 (LWP 10769) exited]
  [Thread 0x7f604a9a8c80 (LWP 10761) exited]
  [Inferior 1 (process 10761) exited with code 01]

j.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Stefan Fritsch
Hi,

On Mon, 13 Mar 2017, Jiri B wrote:

>
> it seems virtio-scsi is not working correctly in OpenBSD, I gave it
> a try today and OpenBSD VM was killed with:
>
>   2017-03-13T15:29:00.814657Z qemu-kvm: wrong size for virtio-scsi headers
>
> on EL7 with qemu-kvm-rhev-2.6.0-28.el7_3.6.x86_64.
>
> I found a bug stating it is OpenBSD's fault
>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768517
>
> I'd like to provide more info but could you give me some hints
> please? I tried to attach debugger to qemu-kvm process but I get
> only this :/


last time I looked at this I found a bug how vioscsi uses
virtio_dequeue_commit(). After that was fixed, it did not cause qemu to
complain anymore but there were occasional data errors that would result
in filesystem corruption. I don't have a really good idea how to debug
that. Maybe write a test program that writes known patterns to the raw
disk and then reads them again and shows the diffs. Or does anyone know a
program that does this? In any case, I ran out of time before I got any
further.

The attached diff fixes the bug and adds lots of debug output. If you
comment out the printfs, you could try if you have more luck. But this is
probably more a topic for tech@

Cheers,
Stefan

diff --git sys/dev/pv/vioscsi.c sys/dev/pv/vioscsi.c
index 6a8bb55..1783bd5 100644
--- sys/dev/pv/vioscsi.c
+++ sys/dev/pv/vioscsi.c
@@ -32,12 +32,23 @@
 enum { vioscsi_debug = 0 };
 #define DPRINTF(f...) do { if (vioscsi_debug) printf(f); } while (0)
 
+#define STATE_ASSERT(vr, want) do { \
+ if (vr->vr_state != want) { \
+ panic("%s:%d: vr_state is %d should be %d\n", \
+    __func__, __LINE__, vr->vr_state, want); \
+ } \
+ } while (0)
+
+
+enum vioscsi_req_state { FREE, ALLOC, INQUEUE, DONE };
+
 struct vioscsi_req {
  struct virtio_scsi_req_hdr vr_req;
  struct virtio_scsi_res_hdr vr_res;
  struct scsi_xfer *vr_xs;
  bus_dmamap_t vr_control;
  bus_dmamap_t vr_data;
+ enum vioscsi_req_state vr_state;
 };
 
 struct vioscsi_softc {
@@ -166,16 +177,19 @@ vioscsi_scsi_cmd(struct scsi_xfer *xs)
  struct virtio_scsi_req_hdr *req = &vr->vr_req;
  struct virtqueue *vq = &sc->sc_vqs[2];
  int slot = vr - sc->sc_reqs;
+ int ec = 0;
 
  DPRINTF("vioscsi_scsi_cmd: enter\n");
+ STATE_ASSERT(vr, ALLOC);
 
  // TODO(matthew): Support bidirectional SCSI commands?
  if ((xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT))
     == (SCSI_DATA_IN | SCSI_DATA_OUT)) {
+ ec = __LINE__;
  stuffup:
  xs->error = XS_DRIVER_STUFFUP;
  xs->resid = xs->datalen;
- DPRINTF("vioscsi_scsi_cmd: stuffup\n");
+ printf("vioscsi_scsi_cmd: stuffup l.%d\n", ec);
  scsi_done(xs);
  return;
  }
@@ -187,16 +201,20 @@ vioscsi_scsi_cmd(struct scsi_xfer *xs)
  * 1, second byte set to target, third and fourth byte representing a
  * single level LUN structure, followed by four zero bytes."
  */
- if (xs->sc_link->target >= 256 || xs->sc_link->lun >= 16384)
+ if (xs->sc_link->target >= 256 || xs->sc_link->lun >= 16384) {
+ ec = __LINE__;
  goto stuffup;
+ }
  req->lun[0] = 1;
  req->lun[1] = xs->sc_link->target;
  req->lun[2] = 0x40 | (xs->sc_link->lun >> 8);
  req->lun[3] = xs->sc_link->lun;
  memset(req->lun + 4, 0, 4);
 
- if ((size_t)xs->cmdlen > sizeof(req->cdb))
+ if ((size_t)xs->cmdlen > sizeof(req->cdb)) {
+ ec = __LINE__;
  goto stuffup;
+ }
  memset(req->cdb, 0, sizeof(req->cdb));
  memcpy(req->cdb, xs->cmd, xs->cmdlen);
 
@@ -207,16 +225,21 @@ vioscsi_scsi_cmd(struct scsi_xfer *xs)
  if (bus_dmamap_load(vsc->sc_dmat, vr->vr_data,
     xs->data, xs->datalen, NULL,
     ((isread ? BUS_DMA_READ : BUS_DMA_WRITE) |
-     BUS_DMA_NOWAIT)))
+     BUS_DMA_NOWAIT))) {
+ ec = __LINE__;
  goto stuffup;
+ }
  nsegs += vr->vr_data->dm_nsegs;
  }
 
  int s = splbio();
  int r = virtio_enqueue_reserve(vq, slot, nsegs);
  splx(s);
- if (r)
+ if (r) {
+ ec = __LINE__;
+ printf("nsegs: %d seg_max: %d datalen %d isread %d\n", nsegs, sc->sc_seg_max, xs->datalen, isread);
  goto stuffup;
+ }
 
  bus_dmamap_sync(vsc->sc_dmat, vr->vr_control,
     offsetof(struct vioscsi_req, vr_req),
@@ -245,6 +268,7 @@ vioscsi_scsi_cmd(struct scsi_xfer *xs)
  virtio_enqueue(vq, slot, vr->vr_data, 0);
 
  virtio_enqueue_commit(vsc, vq, slot, 1);
+ vr->vr_state = INQUEUE;
 
  if (ISSET(xs->flags, SCSI_POLL)) {
  DPRINTF("vioscsi_scsi_cmd: polling...\n");
@@ -259,7 +283,7 @@ vioscsi_scsi_cmd(struct scsi_xfer *xs)
  // TODO(matthew): Abort the request.
  xs->error = XS_TIMEOUT;
  xs->resid = xs->datalen;
- DPRINTF("vioscsi_scsi_cmd: polling timeout\n");
+ panic("vioscsi_scsi_cmd: polling timeout\n");
  scsi_done(xs);
  }
  DPRINTF("vioscsi_scsi_cmd: done (timeout=%d)\n", timeout);
@@ -272,8 +296,8 @@ vioscsi_req_done(struct vioscsi_softc *sc, struct virtio_softc *vsc,
     struct vioscsi_req *vr)
 {
  struct scsi_xfer *xs = vr->vr_xs;
-
- DPRINTF("vioscsi_req_done: enter\n");
+ STATE_ASSERT(vr, INQUEUE);
+ DPRINTF("vioscsi_req_done: enter vr: %p xs: %p\n", vr, xs);
 
  int isread = !!(xs->flags & SCSI_DATA_IN);
  bus_dmamap_sync(vsc->sc_dmat, vr->vr_control,
@@ -291,7 +315,7 @@ vioscsi_req_done(struct vioscsi_softc *sc, struct virtio_softc *vsc,
  if (vr->vr_res.response != VIRTIO_SCSI_S_OK) {
  xs->error = XS_DRIVER_STUFFUP;
  xs->resid = xs->datalen;
- DPRINTF("vioscsi_req_done: stuffup: %d\n", vr->vr_res.response);
+ printf("vioscsi_req_done: stuffup: %d\n", vr->vr_res.response);
  goto done;
  }
 
@@ -307,6 +331,7 @@ vioscsi_req_done(struct vioscsi_softc *sc, struct virtio_softc *vsc,
 
 done:
  vr->vr_xs = NULL;
+ vr->vr_state = DONE;
  scsi_done(xs);
 }
 
@@ -374,6 +399,8 @@ vioscsi_req_get(void *cookie)
  goto err4;
 
  DPRINTF("vioscsi_req_get: %p, %d\n", vr, slot);
+ STATE_ASSERT(vr, FREE);
+ vr->vr_state = ALLOC;
 
  return (vr);
 
@@ -383,6 +410,7 @@ err3:
  bus_dmamap_destroy(vsc->sc_dmat, vr->vr_control);
 err2:
  s = splbio();
+ printf("%s: virtio_enqueue_abort\n", __func__);
  virtio_enqueue_abort(vq, slot);
  splx(s);
 err1:
@@ -404,7 +432,14 @@ vioscsi_req_put(void *cookie, void *io)
  bus_dmamap_destroy(vsc->sc_dmat, vr->vr_data);
 
  int s = splbio();
- virtio_dequeue_commit(vq, slot);
+ if (vr->vr_state == DONE) {
+ virtio_dequeue_commit(vq, slot);
+ } else if (vr->vr_state == ALLOC) {
+ // virtio_enqueue_abort(vq, slot);
+ } else {
+ panic("invalid vr_state[%d]: %d", slot, vr->vr_state);
+ }
+ vr->vr_state = FREE;
  splx(s);
 }

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Jiri B-2
In reply to this post by Jiri B-2
Recent dmesg, and VM exits because of virtio-scsi issue when it is installing
'bsd.mp'.

j.

Copyright (c) 1982, 1986, 1989, 1991, 1993
          The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2017 OpenBSD. All rights reserved.
https://www.OpenBSD.org

OpenBSD 6.0-current (RAMDISK_CD) #163: Sat Feb 11 19:41:57 MST 2017
    [hidden email]:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 250470400 (238MB)
avail mem = 239251456 (228MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf7170 (10 entries)
bios0: vendor SeaBIOS version "1.9.1-5.el7_3.1" date 04/01/2014
bios0: Red Hat KVM
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: QEMU Virtual CPU version 2.5+, 2394.37 MHz
cpu0:
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MM
X,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,HV,NXE,LONG,LAHF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line
16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: apic clock running at 999MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu at acpi0 not configured
"ACPI0006" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0F13" at acpi0 not configured
"PNP0700" at acpi0 not configured
"PNP0501" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"ACPI0010" at acpi0 not configured
pvbus0 at mainbus0: KVM
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
"Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0
wired to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
"Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio0: address 52:54:00:15:b0:a3
virtio0: msix shared
virtio1 at pci0 dev 3 function 0 "Qumranet Virtio SCSI" rev 0x00
vioscsi0 at virtio1: qsize 128
scsibus0 at vioscsi0: 255 targets
sd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU HARDDISK, 2.5+> SCSI3 0/direct
fixed
sd0: 20480MB, 512 bytes/sector, 41943040 sectors, thin
virtio1: msix shared
uhci0 at pci0 dev 4 function 0 "Intel 82801I USB" rev 0x03: apic 0 int 11
uhci1 at pci0 dev 4 function 1 "Intel 82801I USB" rev 0x03: apic 0 int 10
uhci2 at pci0 dev 4 function 2 "Intel 82801I USB" rev 0x03: apic 0 int 10
ehci0 at pci0 dev 4 function 7 "Intel 82801I USB" rev 0x03: apic 0 int 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
addr 1
virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00
virtio2: no matching child driver; not configured
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0 mux 1
softraid0 at root
scsibus1 at softraid0: 256 targets
PXE boot MAC address 52:54:00:15:b0:a3, interface vio0
root on rd0a swap on rd0b dump on rd0b
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/amd64 6.0 installation program.
Starting non-interactive mode in 5 seconds...
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
DHCPDISCOVER on vio0 - interval 1
DHCPDISCOVER on vio0 - interval 1
DHCPOFFER from 192.168.1.1 (00:25:90:60:8f:1e)
DHCPREQUEST on vio0 to 255.255.255.255
DHCPACK from 192.168.1.1 (00:25:90:60:8f:1e)
bound to 192.168.1.118 -- renewal in 1800 seconds.
Fetching
http://192.168.1.2/52:54:00:15:b0:a3-install.conf?path=snapshots/amd64
Performing non-interactive install...
Terminal type? [vt220] vt220
System hostname? (short form, e.g. 'foo') test1

Available network interfaces are: vio0 vlan0.
Which network interface do you wish to configure? (or 'done') [vio0] vio0
IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] dhcp
DHCPREQUEST on vio0 to 255.255.255.255
DHCPACK from 192.168.1.1 (00:25:90:60:8f:1e)
bound to 192.168.1.118 -- renewal in 1800 seconds.
IPv6 address for vio0? (or 'rtsol' or 'none') [none] none
Available network interfaces are: vio0 vlan0.
Which network interface do you wish to configure? (or 'done') [done] done
Using DNS domainname internal
Using DNS nameservers at 192.168.1.1

Password for root account? <provided>
Public ssh key for root account? [none] none
Start sshd(8) by default? [yes] yes
Change the default console to com0? [yes] yes
Available speeds are: 9600 19200 38400 57600 115200.
Which speed should com0 use? (or 'done') [115200] 115200
Setup a user? (enter a lower-case loginname, or 'no') [no] jirib
Full name for user jirib? [jirib] jirib
Password for user jirib? <provided>
Public ssh key for user jirib [none] ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQC7deq1vJOnb+/Ee1hL2+z+D6UbiI+Ww8sAoMl62PSJfKa7x
gYG+B3pArtoa7lc9krs9hKQ+L7gh65ekaXNRCY+CrCWgrT8+rnPGFubbxiVzYS2z+koA+nZ/1RTu7
GPFupsQUutQniG4X3kurUlLQldhm9wsoA8Fyc2Se//Fr0uqJw4LrLraGRS4cLaAh1dIv78/ymZyWj
4V7xB5B9/Fq9J3+SA/UR1px3TKM9/V5SyzbJJ9d5I/2PjYv8AAtmzqA87PwNtfMGFEtM3ze1MlaQn
zsYAOg84TM9UYieiUeVdpfnM7hIhHiqSTTNTaN0mtsGAA2g2lf+kccft6CeichAb jirib@
WARNING: root is targeted by password guessing attacks, pubkeys are safer.
Allow root ssh login? (yes, no, prohibit-password) [no] no
What timezone are you in? ('?' for list) [Europe/Prague] Europe/Prague

Available disks are: sd0.
Which disk is the root disk? ('?' for details) [sd0] sd0
Disk: sd0       geometry: 2610/255/63 [41943040 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-----------------------------------------------------------------------------
--
 0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
*3: A6      0   1   2 -   2609 254  63 [          64:    41929586 ] OpenBSD
Use (W)hole disk MBR, whole disk (G)PT, (O)penBSD area or (E)dit? [OpenBSD]
OpenBSD
URL to autopartitioning template for disklabel? [none]
http://192.168.1.2/52:54:00:15:b0:a3-install.tmpl
Fetching http://192.168.1.2/52:54:00:15:b0:a3-install.tmpl
/dev/rsd0a: 256.0MB in 524288 sectors of 512 bytes
4 cylinder groups of 64.00MB, 4096 blocks, 8192 inodes each
/dev/rsd0e: 64.0MB in 131072 sectors of 512 bytes
4 cylinder groups of 16.00MB, 1024 blocks, 2048 inodes each
/dev/rsd0d: 1024.0MB in 2097152 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0f: 1024.0MB in 2097152 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0h: 1024.0MB in 2097152 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0g: 128.0MB in 262144 sectors of 512 bytes
4 cylinder groups of 32.00MB, 2048 blocks, 4096 inodes each
/dev/rsd0i: 16441.4MB in 33672032 sectors of 512 bytes
82 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/sd0a (8952f1c29399384b.a) on /mnt type ffs (rw, asynchronous, local)
/dev/sd0e (8952f1c29399384b.e) on /mnt/home type ffs (rw, asynchronous, local,
nodev, nosuid)
/dev/sd0d (8952f1c29399384b.d) on /mnt/tmp type ffs (rw, asynchronous, local,
nodev, nosuid)
/dev/sd0f (8952f1c29399384b.f) on /mnt/usr type ffs (rw, asynchronous, local,
nodev)
/dev/sd0h (8952f1c29399384b.h) on /mnt/usr/local type ffs (rw, asynchronous,
local, nodev)
/dev/sd0g (8952f1c29399384b.g) on /mnt/var type ffs (rw, asynchronous, local,
nodev, nosuid)
/dev/sd0i (8952f1c29399384b.i) on /mnt/var/log type ffs (rw, asynchronous,
local, nodev, nosuid)

Let's install the sets!
Location of sets? (disk http or 'done') [http] http
HTTP proxy URL? (e.g. '<a href="http://proxy:8080'">http://proxy:8080', or 'none') [none] none
HTTP Server? (hostname, list#, 'done' or '?') [192.168.1.2] 192.168.1.2
Server directory? [///////pub/OpenBSD/snapshots/amd64]
///////pub/OpenBSD/snapshots/amd64
Unable to connect using https. Use http instead? [no] yes

Select sets by entering a set name, a file name pattern or 'all'. De-select
sets by prepending a '-' to the set name, file name pattern or 'all'.
Selected
sets are labelled '[X]'.
    [X] bsd           [X] base60.tgz    [X] game60.tgz    [X] xfont60.tgz
    [X] bsd.rd        [X] comp60.tgz    [X] xbase60.tgz   [X] xserv60.tgz
    [X] bsd.mp        [X] man60.tgz     [X] xshare60.tgz
Set name(s)? (or 'abort' or 'done') [done] done
Get/Verify SHA256.sig   100% |**************************|  2152       00:00
Signature Verified
Get/Verify bsd          100% |**************************| 10424 KB    00:00
Get/Verify bsd.rd       100% |**************************|  9215 KB    00:00
Get/Verify bsd.mp       100% |**************************| 10490 KB    00:00
Get/Verify base60.tgz   100% |**************************| 52124 KB    00:01
Get/Verify comp60.tgz   100% |**************************| 46094 KB    00:01
Get/Verify man60.tgz    100% |**************************|  8780 KB    00:00
Get/Verify game60.tgz   100% |**************************|  2707 KB    00:00
Get/Verify xbase60.tgz  100% |**************************| 23372 KB    00:00
Get/Verify xshare60.tgz 100% |**************************|  4414 KB    00:00
Get/Verify xfont60.tgz  100% |**************************| 39342 KB    00:01
Get/Verify xserv60.tgz  100% |**************************| 22610 KB    00:00
Installing bsd          100% |**************************| 10424 KB    00:00
Installing bsd.rd       100% |**************************|  9215 KB    00:00
Installing bsd.mp       100% |**************************| 10490 KB    00:00
Connection closed by foreign host.

LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name guest=test1,debug-threads=on
-S -object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-30-test1/ma
ster-key.aes -machine pc-i440fx-rhel7.3.0,accel=kvm,usb=off,vmport=off -m 256
-realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid
2ce6206b-fdf6-40ae-b3ba-5a90d2f39348 -nographic -no-user-config -nodefaults
-device sga -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-30-test1/monitor.sock
,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc
base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet
-no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot
menu=on,strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 -device
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -drive
file=/var/lib/libvirt/images/test1.img,format=raw,if=none,id=drive-scsi0-0-0-0
-device
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi
0-0-0-0 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=30 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:15:b0:a3,bus=pci.0,addr=0
x2,bootindex=1 -chardev
socket,id=charserial0,host=127.0.0.1,port=4555,telnet,server,nowait -device
isa-serial,chardev=charserial0,id=serial0 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on
2017-03-14T23:13:17.289782Z qemu-kvm: wrong size for virtio-scsi headers
2017-03-14 23:13:17.499+0000: shutting down

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Mike Larkin
On Tue, Mar 14, 2017 at 08:16:17PM -0400, Jiri B wrote:
> Recent dmesg, and VM exits because of virtio-scsi issue when it is installing
> 'bsd.mp'.
>
> j.
>

What are you trying to achieve here? Why not just use a device that doesn't
cause errors. You could choose virtio-blk or even a non-PV storage device.

-ml

> Copyright (c) 1982, 1986, 1989, 1991, 1993
>  The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2017 OpenBSD. All rights reserved.
> https://www.OpenBSD.org
>
> OpenBSD 6.0-current (RAMDISK_CD) #163: Sat Feb 11 19:41:57 MST 2017
>     [hidden email]:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
> real mem = 250470400 (238MB)
> avail mem = 239251456 (228MB)
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf7170 (10 entries)
> bios0: vendor SeaBIOS version "1.9.1-5.el7_3.1" date 04/01/2014
> bios0: Red Hat KVM
> acpi0 at bios0: rev 0
> acpi0: tables DSDT FACP APIC
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: QEMU Virtual CPU version 2.5+, 2394.37 MHz
> cpu0:
> FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MM
> X,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,HV,NXE,LONG,LAHF
> cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line
> 16-way L2 cache
> cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
> cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
> cpu0: apic clock running at 999MHz
> cpu at mainbus0: not configured
> ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpicpu at acpi0 not configured
> "ACPI0006" at acpi0 not configured
> "PNP0303" at acpi0 not configured
> "PNP0F13" at acpi0 not configured
> "PNP0700" at acpi0 not configured
> "PNP0501" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "ACPI0010" at acpi0 not configured
> pvbus0 at mainbus0: KVM
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
> "Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
> pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0
> wired to compatibility, channel 1 wired to compatibility
> pciide0: channel 0 disabled (no drives)
> pciide0: channel 1 disabled (no drives)
> "Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
> virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00
> vio0 at virtio0: address 52:54:00:15:b0:a3
> virtio0: msix shared
> virtio1 at pci0 dev 3 function 0 "Qumranet Virtio SCSI" rev 0x00
> vioscsi0 at virtio1: qsize 128
> scsibus0 at vioscsi0: 255 targets
> sd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU HARDDISK, 2.5+> SCSI3 0/direct
> fixed
> sd0: 20480MB, 512 bytes/sector, 41943040 sectors, thin
> virtio1: msix shared
> uhci0 at pci0 dev 4 function 0 "Intel 82801I USB" rev 0x03: apic 0 int 11
> uhci1 at pci0 dev 4 function 1 "Intel 82801I USB" rev 0x03: apic 0 int 10
> uhci2 at pci0 dev 4 function 2 "Intel 82801I USB" rev 0x03: apic 0 int 10
> ehci0 at pci0 dev 4 function 7 "Intel 82801I USB" rev 0x03: apic 0 int 11
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
> addr 1
> virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00
> virtio2: no matching child driver; not configured
> usb1 at uhci0: USB revision 1.0
> uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
> addr 1
> usb2 at uhci1: USB revision 1.0
> uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
> addr 1
> usb3 at uhci2: USB revision 1.0
> uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
> addr 1
> isa0 at mainbus0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> com0: console
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0 mux 1
> softraid0 at root
> scsibus1 at softraid0: 256 targets
> PXE boot MAC address 52:54:00:15:b0:a3, interface vio0
> root on rd0a swap on rd0b dump on rd0b
> erase ^?, werase ^W, kill ^U, intr ^C, status ^T
>
> Welcome to the OpenBSD/amd64 6.0 installation program.
> Starting non-interactive mode in 5 seconds...
> (I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
> DHCPDISCOVER on vio0 - interval 1
> DHCPDISCOVER on vio0 - interval 1
> DHCPOFFER from 192.168.1.1 (00:25:90:60:8f:1e)
> DHCPREQUEST on vio0 to 255.255.255.255
> DHCPACK from 192.168.1.1 (00:25:90:60:8f:1e)
> bound to 192.168.1.118 -- renewal in 1800 seconds.
> Fetching
> http://192.168.1.2/52:54:00:15:b0:a3-install.conf?path=snapshots/amd64
> Performing non-interactive install...
> Terminal type? [vt220] vt220
> System hostname? (short form, e.g. 'foo') test1
>
> Available network interfaces are: vio0 vlan0.
> Which network interface do you wish to configure? (or 'done') [vio0] vio0
> IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] dhcp
> DHCPREQUEST on vio0 to 255.255.255.255
> DHCPACK from 192.168.1.1 (00:25:90:60:8f:1e)
> bound to 192.168.1.118 -- renewal in 1800 seconds.
> IPv6 address for vio0? (or 'rtsol' or 'none') [none] none
> Available network interfaces are: vio0 vlan0.
> Which network interface do you wish to configure? (or 'done') [done] done
> Using DNS domainname internal
> Using DNS nameservers at 192.168.1.1
>
> Password for root account? <provided>
> Public ssh key for root account? [none] none
> Start sshd(8) by default? [yes] yes
> Change the default console to com0? [yes] yes
> Available speeds are: 9600 19200 38400 57600 115200.
> Which speed should com0 use? (or 'done') [115200] 115200
> Setup a user? (enter a lower-case loginname, or 'no') [no] jirib
> Full name for user jirib? [jirib] jirib
> Password for user jirib? <provided>
> Public ssh key for user jirib [none] ssh-rsa
> AAAAB3NzaC1yc2EAAAADAQABAAABAQC7deq1vJOnb+/Ee1hL2+z+D6UbiI+Ww8sAoMl62PSJfKa7x
> gYG+B3pArtoa7lc9krs9hKQ+L7gh65ekaXNRCY+CrCWgrT8+rnPGFubbxiVzYS2z+koA+nZ/1RTu7
> GPFupsQUutQniG4X3kurUlLQldhm9wsoA8Fyc2Se//Fr0uqJw4LrLraGRS4cLaAh1dIv78/ymZyWj
> 4V7xB5B9/Fq9J3+SA/UR1px3TKM9/V5SyzbJJ9d5I/2PjYv8AAtmzqA87PwNtfMGFEtM3ze1MlaQn
> zsYAOg84TM9UYieiUeVdpfnM7hIhHiqSTTNTaN0mtsGAA2g2lf+kccft6CeichAb jirib@
> WARNING: root is targeted by password guessing attacks, pubkeys are safer.
> Allow root ssh login? (yes, no, prohibit-password) [no] no
> What timezone are you in? ('?' for list) [Europe/Prague] Europe/Prague
>
> Available disks are: sd0.
> Which disk is the root disk? ('?' for details) [sd0] sd0
> Disk: sd0       geometry: 2610/255/63 [41943040 Sectors]
> Offset: 0       Signature: 0xAA55
>             Starting         Ending         LBA Info:
>  #: id      C   H   S -      C   H   S [       start:        size ]
> -----------------------------------------------------------------------------
> --
>  0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
>  1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
>  2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
> *3: A6      0   1   2 -   2609 254  63 [          64:    41929586 ] OpenBSD
> Use (W)hole disk MBR, whole disk (G)PT, (O)penBSD area or (E)dit? [OpenBSD]
> OpenBSD
> URL to autopartitioning template for disklabel? [none]
> http://192.168.1.2/52:54:00:15:b0:a3-install.tmpl
> Fetching http://192.168.1.2/52:54:00:15:b0:a3-install.tmpl
> /dev/rsd0a: 256.0MB in 524288 sectors of 512 bytes
> 4 cylinder groups of 64.00MB, 4096 blocks, 8192 inodes each
> /dev/rsd0e: 64.0MB in 131072 sectors of 512 bytes
> 4 cylinder groups of 16.00MB, 1024 blocks, 2048 inodes each
> /dev/rsd0d: 1024.0MB in 2097152 sectors of 512 bytes
> 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
> /dev/rsd0f: 1024.0MB in 2097152 sectors of 512 bytes
> 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
> /dev/rsd0h: 1024.0MB in 2097152 sectors of 512 bytes
> 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
> /dev/rsd0g: 128.0MB in 262144 sectors of 512 bytes
> 4 cylinder groups of 32.00MB, 2048 blocks, 4096 inodes each
> /dev/rsd0i: 16441.4MB in 33672032 sectors of 512 bytes
> 82 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
> /dev/sd0a (8952f1c29399384b.a) on /mnt type ffs (rw, asynchronous, local)
> /dev/sd0e (8952f1c29399384b.e) on /mnt/home type ffs (rw, asynchronous, local,
> nodev, nosuid)
> /dev/sd0d (8952f1c29399384b.d) on /mnt/tmp type ffs (rw, asynchronous, local,
> nodev, nosuid)
> /dev/sd0f (8952f1c29399384b.f) on /mnt/usr type ffs (rw, asynchronous, local,
> nodev)
> /dev/sd0h (8952f1c29399384b.h) on /mnt/usr/local type ffs (rw, asynchronous,
> local, nodev)
> /dev/sd0g (8952f1c29399384b.g) on /mnt/var type ffs (rw, asynchronous, local,
> nodev, nosuid)
> /dev/sd0i (8952f1c29399384b.i) on /mnt/var/log type ffs (rw, asynchronous,
> local, nodev, nosuid)
>
> Let's install the sets!
> Location of sets? (disk http or 'done') [http] http
> HTTP proxy URL? (e.g. '<a href="http://proxy:8080'">http://proxy:8080', or 'none') [none] none
> HTTP Server? (hostname, list#, 'done' or '?') [192.168.1.2] 192.168.1.2
> Server directory? [///////pub/OpenBSD/snapshots/amd64]
> ///////pub/OpenBSD/snapshots/amd64
> Unable to connect using https. Use http instead? [no] yes
>
> Select sets by entering a set name, a file name pattern or 'all'. De-select
> sets by prepending a '-' to the set name, file name pattern or 'all'.
> Selected
> sets are labelled '[X]'.
>     [X] bsd           [X] base60.tgz    [X] game60.tgz    [X] xfont60.tgz
>     [X] bsd.rd        [X] comp60.tgz    [X] xbase60.tgz   [X] xserv60.tgz
>     [X] bsd.mp        [X] man60.tgz     [X] xshare60.tgz
> Set name(s)? (or 'abort' or 'done') [done] done
> Get/Verify SHA256.sig   100% |**************************|  2152       00:00
> Signature Verified
> Get/Verify bsd          100% |**************************| 10424 KB    00:00
> Get/Verify bsd.rd       100% |**************************|  9215 KB    00:00
> Get/Verify bsd.mp       100% |**************************| 10490 KB    00:00
> Get/Verify base60.tgz   100% |**************************| 52124 KB    00:01
> Get/Verify comp60.tgz   100% |**************************| 46094 KB    00:01
> Get/Verify man60.tgz    100% |**************************|  8780 KB    00:00
> Get/Verify game60.tgz   100% |**************************|  2707 KB    00:00
> Get/Verify xbase60.tgz  100% |**************************| 23372 KB    00:00
> Get/Verify xshare60.tgz 100% |**************************|  4414 KB    00:00
> Get/Verify xfont60.tgz  100% |**************************| 39342 KB    00:01
> Get/Verify xserv60.tgz  100% |**************************| 22610 KB    00:00
> Installing bsd          100% |**************************| 10424 KB    00:00
> Installing bsd.rd       100% |**************************|  9215 KB    00:00
> Installing bsd.mp       100% |**************************| 10490 KB    00:00
> Connection closed by foreign host.
>
> LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
> QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name guest=test1,debug-threads=on
> -S -object
> secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-30-test1/ma
> ster-key.aes -machine pc-i440fx-rhel7.3.0,accel=kvm,usb=off,vmport=off -m 256
> -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid
> 2ce6206b-fdf6-40ae-b3ba-5a90d2f39348 -nographic -no-user-config -nodefaults
> -device sga -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-30-test1/monitor.sock
> ,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc
> base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet
> -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot
> menu=on,strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 -device
> ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4
> -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1
> -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2
> -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -drive
> file=/var/lib/libvirt/images/test1.img,format=raw,if=none,id=drive-scsi0-0-0-0
> -device
> scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi
> 0-0-0-0 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=30 -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:15:b0:a3,bus=pci.0,addr=0
> x2,bootindex=1 -chardev
> socket,id=charserial0,host=127.0.0.1,port=4555,telnet,server,nowait -device
> isa-serial,chardev=charserial0,id=serial0 -device
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on
> 2017-03-14T23:13:17.289782Z qemu-kvm: wrong size for virtio-scsi headers
> 2017-03-14 23:13:17.499+0000: shutting down

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Jiri B-2
On Tue, Mar 14, 2017 at 05:58:29PM -0700, Mike Larkin wrote:

> On Tue, Mar 14, 2017 at 08:16:17PM -0400, Jiri B wrote:
> > Recent dmesg, and VM exits because of virtio-scsi issue when it is installing
> > 'bsd.mp'.
> >
> > j.
> >
>
> What are you trying to achieve here? Why not just use a device that doesn't
> cause errors. You could choose virtio-blk or even a non-PV storage device.
>
> -ml

Originally I had to use virtio-scsi as it was default when using > 2 disks in
our OpenStack env.

virtio-scsi also became default disk type in RHV/oVirt we use.

virtio-scsi does pass SCSI commands through so I'd like to see if I could have
direct lun attached to OpenBSD VM and if I could do SCSI reservation  etc...

I'm also interested to see if I could have virtio-scsi in mpath, although
reading mpath man page, mpath is not supported over vscsi now.

j.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Alexander Bochmann
In reply to this post by Jiri B-2
Hi,

...on Mon, Mar 13, 2017 at 11:26:42AM -0400, Jiri B wrote:

 > it seems virtio-scsi is not working correctly in OpenBSD, I gave it
 > a try today and OpenBSD VM was killed with:
 >   2017-03-13T15:29:00.814657Z qemu-kvm: wrong size for virtio-scsi headers
 > on EL7 with qemu-kvm-rhev-2.6.0-28.el7_3.6.x86_64.
 > I found a bug stating it is OpenBSD's fault
 >   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768517

Hrm - I've been running a OpenBSD 6.0-stable VM with a hosting
provider that seems to be using qemu-kvm for half a year, and
have yet to run into that problem. I don't have any information
about their platform except that their SeaBIOS identifies as debian:

 > bios0: vendor SeaBIOS version "debian/1.7.5-1-0-g506b58d-dirty-20140812_231322-gandalf" date 04/01/2014
 > bios0: QEMU Standard PC (i440FX + PIIX, 1996)
 [..]
 > virtio1 at pci0 dev 4 function 0 "Qumranet Virtio SCSI" rev 0x00
 > vioscsi0 at virtio1: qsize 128
 > scsibus2 at vioscsi0: 255 targets
 > probe(vioscsi0:0:0): Check Condition (error 0) on opcode 0x0
 > sd0 at scsibus2 targ 0 lun 0: <QEMU, QEMU HARDDISK, 2.1.> SCSI3 0/direct fixed
 > sd0: 61440MB, 512 bytes/sector, 125829120 sectors, thin
 > virtio1: msix shared

Maybe it is actually a Linux bug that has been fixed by everyone
except Red Hat in their undead backports kernel?

Alex.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Jiri B-2
On Wed, Mar 15, 2017 at 02:54:03PM +0100, Alexander Bochmann wrote:
>
>  > bios0: vendor SeaBIOS version "debian/1.7.5-1-0-g506b58d-dirty-20140812_231322-gandalf" date 04/01/2014
>  > bios0: QEMU Standard PC (i440FX + PIIX, 1996)

it doesn't say anything about qemu-kvm version :/

>  [..]
>  > virtio1 at pci0 dev 4 function 0 "Qumranet Virtio SCSI" rev 0x00
>  > vioscsi0 at virtio1: qsize 128
>  > scsibus2 at vioscsi0: 255 targets
>  > probe(vioscsi0:0:0): Check Condition (error 0) on opcode 0x0
>  > sd0 at scsibus2 targ 0 lun 0: <QEMU, QEMU HARDDISK, 2.1.> SCSI3 0/direct fixed
>  > sd0: 61440MB, 512 bytes/sector, 125829120 sectors, thin
>  > virtio1: msix shared
>
> Maybe it is actually a Linux bug that has been fixed by everyone
> except Red Hat in their undead backports kernel?

I could install Fedora or recent OpenSUSE and see :)

It would be maybe better to see how virtio-scsi involved in recent
qemu since virtio-scsi was imported into OpenBSD. IIRC there were
some header changes...

(I'm not a programmer but see comparisor below:)

https://github.com/qemu/qemu/blob/019adbd3715e98b5a09fab1370cc2c6904f79b6d/include/standard-headers/linux/virtio_scsi.h#L32
#define VIRTIO_SCSI_CDB_SIZE   32
#define VIRTIO_SCSI_SENSE_SIZE 96

vs

$ egrep 'VIRTIO.*(CDB|SENSE)_SIZE' cvs/openbsd-src/sys/dev/pv/vioscsireg.h
#define VIRTIO_SCSI_CONFIG_SENSE_SIZE           20 /* 32bit */
#define VIRTIO_SCSI_CONFIG_CDB_SIZE             24 /* 32bit */

And here https://github.com/qemu/qemu/commit/03325525c3a607825ab67bf36bffaa5cf8447df2

+/* Override CDB/sense data size: they are dynamic (guest controlled) in QEMU */
+#define VIRTIO_SCSI_CDB_SIZE 0
+#define VIRTIO_SCSI_SENSE_SIZE 0

j.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Alexander Bochmann
...on Wed, Mar 15, 2017 at 10:29:25AM -0400, Jiri B wrote:

 > >  > bios0: vendor SeaBIOS version "debian/1.7.5-1-0-g506b58d-dirty-20140812_231322-gandalf" date 04/01/2014
 > >  > bios0: QEMU Standard PC (i440FX + PIIX, 1996)
 > it doesn't say anything about qemu-kvm version :/

Nope, but:

 > >  > sd0 at scsibus2 targ 0 lun 0: <QEMU, QEMU HARDDISK, 2.1.> SCSI3 0/direct fixed

That sais "2.1", and that's actually the version of the qemu-kvm
package in Debian jessie.

The qemu harddisk in your dmesg reports "2.5", so I'm probably
wrong and you're actually on a newer qemu version than my VM.

Alex.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Stefan Fritsch
In reply to this post by Jiri B-2
On Tuesday, 14 March 2017 20:16:17 CET Jiri B wrote:
> Recent dmesg, and VM exits because of virtio-scsi issue when it is
> installing 'bsd.mp'.

I think I have fixed all the bugs, at least I could not get any corruption any
more. The changes are in -current, in r1.5 of sys/dev/pv/vioscsi.c . Please
try if that fixes your problems.

Cheers,
Stefan

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Jiri B-2
On Thu, Mar 16, 2017 at 10:15:21PM +0100, Stefan Fritsch wrote:

> On Tuesday, 14 March 2017 20:16:17 CET Jiri B wrote:
> > Recent dmesg, and VM exits because of virtio-scsi issue when it is
> > installing 'bsd.mp'.
>
> I think I have fixed all the bugs, at least I could not get any corruption any
> more. The changes are in -current, in r1.5 of sys/dev/pv/vioscsi.c . Please
> try if that fixes your problems.
>
> Cheers,
> Stefan

Hi,

it seems to pass installation and boots later on OK with

  OpenBSD 6.1-beta (RAMDISK_CD) #32: Fri Mar 17 02:55:20 MDT 2017

I suppose your diffs are in. Thank you, I'll try directly attach iSCSI
lun as vioscsi now...

j.

~~~
OpenBSD 6.1-beta (RAMDISK_CD) #32: Fri Mar 17 02:55:20 MDT 2017
    [hidden email]:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 250470400 (238MB)
avail mem = 239251456 (228MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf7170 (10 entries)
bios0: vendor SeaBIOS version "1.9.1-5.el7_3.1" date 04/01/2014
bios0: Red Hat KVM
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: QEMU Virtual CPU version 2.5+, 2394.45 MHz
cpu0: FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,HV,NXE,LONG,LAHF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: apic clock running at 1000MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu at acpi0 not configured
"ACPI0006" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0F13" at acpi0 not configured
"PNP0700" at acpi0 not configured
"PNP0501" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"ACPI0010" at acpi0 not configured
pvbus0 at mainbus0: KVM
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
"Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
"Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio0: address 52:54:00:15:b0:a3
virtio0: msix shared
virtio1 at pci0 dev 3 function 0 "Qumranet Virtio SCSI" rev 0x00
vioscsi0 at virtio1: qsize 128
scsibus0 at vioscsi0: 255 targets
sd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU HARDDISK, 2.5+> SCSI3 0/direct fixed
sd0: 20480MB, 512 bytes/sector, 41943040 sectors, thin
virtio1: msix shared
uhci0 at pci0 dev 4 function 0 "Intel 82801I USB" rev 0x03: apic 0 int 11
uhci1 at pci0 dev 4 function 1 "Intel 82801I USB" rev 0x03: apic 0 int 10
uhci2 at pci0 dev 4 function 2 "Intel 82801I USB" rev 0x03: apic 0 int 10
ehci0 at pci0 dev 4 function 7 "Intel 82801I USB" rev 0x03: apic 0 int 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00
virtio2: no matching child driver; not configured
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0 mux 1
softraid0 at root
scsibus1 at softraid0: 256 targets
PXE boot MAC address 52:54:00:15:b0:a3, interface vio0
root on rd0a swap on rd0b dump on rd0b
syncing disks... done
rebooting...
OpenBSD 6.1-beta (GENERIC.MP) #33: Fri Mar 17 02:51:54 MDT 2017
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 250470400 (238MB)
avail mem = 238321664 (227MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf7170 (10 entries)
bios0: vendor SeaBIOS version "1.9.1-5.el7_3.1" date 04/01/2014
bios0: Red Hat KVM
acpi0 at bios0: rev 0
acpi0: sleep states S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: QEMU Virtual CPU version 2.5+, 2394.37 MHz
cpu0: FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,HV,NXE,LONG,LAHF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 999MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: QEMU Virtual CPU version 2.5+, 2394.07 MHz
cpu1: FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,HV,NXE,LONG,LAHF
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache
cpu1: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu1: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu1: smt 0, core 0, package 1
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
"ACPI0006" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0F13" at acpi0 not configured
"PNP0700" at acpi0 not configured
"PNP0501" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"ACPI0010" at acpi0 not configured
pvbus0 at mainbus0: KVM
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: apic 0 int 9
iic0 at piixpm0
virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio0: address 52:54:00:15:b0:a3
virtio0: msix shared
virtio1 at pci0 dev 3 function 0 "Qumranet Virtio SCSI" rev 0x00
vioscsi0 at virtio1: qsize 128
scsibus1 at vioscsi0: 255 targets
sd0 at scsibus1 targ 0 lun 0: <QEMU, QEMU HARDDISK, 2.5+> SCSI3 0/direct fixed
sd0: 20480MB, 512 bytes/sector, 41943040 sectors, thin
virtio1: msix shared
uhci0 at pci0 dev 4 function 0 "Intel 82801I USB" rev 0x03: apic 0 int 11
uhci1 at pci0 dev 4 function 1 "Intel 82801I USB" rev 0x03: apic 0 int 10
uhci2 at pci0 dev 4 function 2 "Intel 82801I USB" rev 0x03: apic 0 int 10
ehci0 at pci0 dev 4 function 7 "Intel 82801I USB" rev 0x03: apic 0 int 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00
viomb0 at virtio2
virtio2: apic 0 int 10
isa0 at pcib0
isadma0 at isa0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 1: density unknown
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0 mux 1
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
vmm at mainbus0 not configured
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (e698765210c3fedd.a) swap on sd0b dump on sd0b
~~~

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to debug OpenBSD virtio-scsi killing qemu-kvm VM?

Jiri B-2
In reply to this post by Stefan Fritsch
Hi,

in the mail I was confirming that vioscsi works now I sent only dmesg,
and thus some info got stripped.

I tried vioscsi today with directly attach iscsi lun (but passed via iscsi
initiator on EL7 via block device) and I see following lines, are they OK?

...
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a]
Rounding size to bsize (32 sectors): 1526304
Rounding size to bsize (32 sectors): 2425696
Rounding size to bsize (32 sectors): 3706272
Rounding size to bsize (32 sectors): 3205664
Rounding size to bsize (32 sectors): 1866048
Rounding size to bsize (32 sectors): 6919232
Rounding size to bsize (32 sectors): 2642112
Rounding size to bsize (32 sectors): 3752352
Rounding size to bsize (32 sectors): 13297376
newfs: reduced number of fragments per cylinder group from 95392 to 95016 to enlarge last cylinder group
/dev/rsd0a: 745.3MB in 1526304 sectors of 512 bytes
...

Next comments are related to the installer but anyway. It is not really
distinguishable what disk I see (what would happen if I would add multiple same size luns?).

...
Available disks are: sd0.
Which disk is the root disk? ('?' for details) [sd0] ?
sd0: Celerra (20.0G)
Available disks are: sd0.
...

We have visible 'Celerra' - ID_MODEL and size only here. Here is SCSI info about the lun
obtained from EL7 for understanding more details about the disk.

# iscsi-inq -e 1 -c 0x80 -i iqn.1994-05.com.redhat:xxxxxx iscsi://10.34.63.200/iqn.1992-05.com.emc:ckm001201002300000-5-vnxe/5
Unit Serial Number:[EMC-Celerra-iSCSI-VLU-fs176_T5_LUN5_CKM00120100230]
[root@slot-5c ~]# /usr/lib/udev/scsi_id -x -g /dev/sde
ID_SCSI=1
ID_VENDOR=EMC
ID_VENDOR_ENC=EMC\x20\x20\x20\x20\x20
ID_MODEL=Celerra
ID_MODEL_ENC=Celerra\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_REVISION=0002
ID_TYPE=disk
ID_SERIAL=36006048c92fcbc2b82ce603f2373d2c5
ID_SERIAL_SHORT=6006048c92fcbc2b82ce603f2373d2c5
ID_WWN=0x6006048c92fcbc2b
ID_WWN_VENDOR_EXTENSION=0x82ce603f2373d2c5
ID_WWN_WITH_EXTENSION=0x6006048c92fcbc2b82ce603f2373d2c5
ID_SCSI_SERIAL=EMC-Celerra-iSCSI-VLU-fs176_T5_LUN5_CKM00120100230

Thus maybe it would be fine to have also serial there...

# sysctl hw.disknames
hw.disknames=cd0:,sd0:4af32eaf54527909,fd0:
# scsi -f /dev/rsd0c -c "12 0 0 0 64 0" -i 0x64 "s8 z8 z16 z4"
EMC Celerra 0002

sd0 at scsibus1 targ 0 lun 0: <EMC, Celerra, 0002> SCSI3 0/direct fixed naa.6006048c92fcbc2b82ce603f2373d2c5
                                             ^^^^ revision, is this useful? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Thank you for your help! Full dmesg and important part of the installation below.

j.


OpenBSD 6.1-beta (RAMDISK_CD) #32: Fri Mar 17 02:55:20 MDT 2017
    [hidden email]:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 1056817152 (1007MB)
avail mem = 1021091840 (973MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf7040 (10 entries)
bios0: vendor SeaBIOS version "1.9.1-5.el7_3.1" date 04/01/2014
bios0: Red Hat RHEV Hypervisor
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC SRAT
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Westmere E56xx/L56xx/X56xx (Nehalem-C), 2200.35 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPCNT,AES,HV,NXE,LONG,LAHF,ARAT
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: apic clock running at 999MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu at acpi0 not configured
"ACPI0006" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0F13" at acpi0 not configured
"PNP0700" at acpi0 not configured
"PNP0501" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"ACPI0010" at acpi0 not configured
pvbus0 at mainbus0: KVM
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
"Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives)
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: apic 0 int 11
"Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
vga1 at pci0 dev 2 function 0 "Red Hat QXL Video" rev 0x04
vga1: aperture needed
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio0: address 00:1a:4a:01:3f:54
virtio0: msix shared
"Intel 82801FB HD Audio" rev 0x01 at pci0 dev 4 function 0 not configured
virtio1 at pci0 dev 5 function 0 "Qumranet Virtio SCSI" rev 0x00
vioscsi0 at virtio1: qsize 128
scsibus1 at vioscsi0: 255 targets
sd0 at scsibus1 targ 0 lun 0: <EMC, Celerra, 0002> SCSI3 0/direct fixed naa.6006048c92fcbc2b82ce603f2373d2c5
sd0: 20480MB, 512 bytes/sector, 41943040 sectors
virtio1: msix shared
virtio2 at pci0 dev 6 function 0 "Qumranet Virtio Console" rev 0x00
virtio2: no matching child driver; not configured
virtio3 at pci0 dev 7 function 0 "Qumranet Virtio Memory" rev 0x00
virtio3: no matching child driver; not configured
virtio4 at pci0 dev 8 function 0 "Qumranet Virtio RNG" rev 0x00
viornd0 at virtio4
virtio4: apic 0 int 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay1
softraid0 at root
scsibus2 at softraid0: 256 targets
root on rd0a swap on rd0b dump on rd0b
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/amd64 6.1 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? I
At any prompt except password prompts you can escape to a shell by
typing '!'. Default answers are shown in []'s and are selected by
pressing RETURN.  You can exit this program at any time by pressing
Control-C, but this can leave your system in an inconsistent state.

Terminal type? [vt220]
System hostname? (short form, e.g. 'foo') foo

Available network interfaces are: vio0 vlan0.
Which network interface do you wish to configure? (or 'done') [vio0]
IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp]
DHCPDISCOVER on vio0 - interval 1
DHCPOFFER from 10.34.63.204 (e4:1f:13:69:12:b0)
DHCPREQUEST on vio0 to 255.255.255.255
DHCPACK from 10.34.63.202 (e4:1f:13:69:12:84)
bound to 10.34.61.238 -- renewal in 10800 seconds.
IPv6 address for vio0? (or 'rtsol' or 'none') [none]
Available network interfaces are: vio0 vlan0.
Which network interface do you wish to configure? (or 'done') [done]
Using DNS domainname rhev.example.com
Using DNS nameservers at 10.34.63.202 10.34.63.204

Password for root account? (will not echo)
Password for root account? (again)
Start sshd(8) by default? [yes]
Do you expect to run the X Window System? [yes] no
Change the default console to com0? [yes]
Available speeds are: 9600 19200 38400 57600 115200.
Which speed should com0 use? (or 'done') [115200]
Setup a user? (enter a lower-case loginname, or 'no') [no]
Since no user was setup, root logins via sshd(8) might be useful.
WARNING: root is targeted by password guessing attacks, pubkeys are safer.
Allow root ssh login? (yes, no, prohibit-password) [no] yes
What timezone are you in? ('?' for list) [Europe/Prague]

Available disks are: sd0.
Which disk is the root disk? ('?' for details) [sd0] ?
sd0: Celerra (20.0G)
Available disks are: sd0.
Which disk is the root disk? ('?' for details) [sd0]
Disk: sd0       geometry: 2610/255/63 [41943040 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
*3: A6      0   1   2 -   2609 254  63 [          64:    41929586 ] OpenBSD    
Use (W)hole disk MBR, whole disk (G)PT, (O)penBSD area or (E)dit? [OpenBSD]
The auto-allocated layout for sd0 is:
#                size           offset  fstype [fsize bsize   cpg]
  a:           745.3M               64  4.2BSD   2048 16384     1 # /
  b:          1263.9M          1526368    swap                    
  c:         20480.0M                0  unused                    
  d:          1184.4M          4114752  4.2BSD   2048 16384     1 # /tmp
  e:          1809.7M          6540448  4.2BSD   2048 16384     1 # /var
  f:          1565.3M         10246720  4.2BSD   2048 16384     1 # /usr
  g:           911.2M         13452384  4.2BSD   2048 16384     1 # /usr/X11R6
  h:          3378.5M         15318432  4.2BSD   2048 16384     1 # /usr/local
  i:          1290.1M         22237664  4.2BSD   2048 16384     1 # /usr/src
  j:          1832.2M         24879776  4.2BSD   2048 16384     1 # /usr/obj
  k:          6492.9M         28632128  4.2BSD   2048 16384     1 # /home
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a]
Rounding size to bsize (32 sectors): 1526304
Rounding size to bsize (32 sectors): 2425696
Rounding size to bsize (32 sectors): 3706272
Rounding size to bsize (32 sectors): 3205664
Rounding size to bsize (32 sectors): 1866048
Rounding size to bsize (32 sectors): 6919232
Rounding size to bsize (32 sectors): 2642112
Rounding size to bsize (32 sectors): 3752352
Rounding size to bsize (32 sectors): 13297376
newfs: reduced number of fragments per cylinder group from 95392 to 95016 to enlarge last cylinder group
/dev/rsd0a: 745.3MB in 1526304 sectors of 512 bytes
5 cylinder groups of 185.58MB, 11877 blocks, 23808 inodes each
/dev/rsd0k: 6492.9MB in 13297376 sectors of 512 bytes
33 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0d: 1184.4MB in 2425696 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0f: 1565.3MB in 3205664 sectors of 512 bytes
8 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0g: 911.2MB in 1866048 sectors of 512 bytes
5 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0h: 3378.5MB in 6919232 sectors of 512 bytes
17 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0j: 1832.2MB in 3752352 sectors of 512 bytes
10 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0i: 1290.1MB in 2642112 sectors of 512 bytes
7 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0e: 1809.7MB in 3706272 sectors of 512 bytes
9 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/sd0a (4af32eaf54527909.a) on /mnt type ffs (rw, asynchronous, local)
/dev/sd0k (4af32eaf54527909.k) on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0d (4af32eaf54527909.d) on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0f (4af32eaf54527909.f) on /mnt/usr type ffs (rw, asynchronous, local, nodev)
/dev/sd0g (4af32eaf54527909.g) on /mnt/usr/X11R6 type ffs (rw, asynchronous, local, nodev)
/dev/sd0h (4af32eaf54527909.h) on /mnt/usr/local type ffs (rw, asynchronous, local, nodev)
/dev/sd0j (4af32eaf54527909.j) on /mnt/usr/obj type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0i (4af32eaf54527909.i) on /mnt/usr/src type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0e (4af32eaf54527909.e) on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid)

...

Loading...