Bug #7810

libdiksmgmt does not report about all virtio block devices

Added by Denis Kozadaev 12 months ago. Updated 11 months ago.

Status:NewStart date:2017-01-27
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Difficulty:Medium Tags:needs-triage

Description

I tried to install OI hipster into a KVM (under smartos), but the list of available devices was incomplete.

11:37 < alp> pfexec  /tmp/diskinfo
11:37 < alp> TYPE    DISK                    VID      PID              SIZE          RMV SSD
11:37 < alp> -       c3t0d0                  Virtio   Block Device      100.00 GiB   no  no

oi_install01.png - Installer of OI (14.8 KB) Denis Kozadaev, 2017-01-27 08:44 AM

oi_install02.png - iostat -En from the VM (23.2 KB) Denis Kozadaev, 2017-01-27 08:44 AM

vm.json - Configuration of the VM (335 Bytes) Denis Kozadaev, 2017-01-27 08:49 AM

History

#1 Updated by Alexander Pyhalov 12 months ago

Some clarifications concerning this bug.
Both installer and diskinfo use libdiskmgmt to look up disk devices

ddm_drive_desc =dm_get_descriptors(DM_DRIVE, NULL, &errn);
...

And both omit c2t0d0 from output:
$ pfexec iostat -En
c2t0d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: Virtio Product: Block Device Revision: 0000 Serial No: 0                
Size: 21.47GB <21474836480 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 0 Predictive Failure Analysis: 0 
c3t0d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: Virtio Product: Block Device Revision: 0000 Serial No: 0                
Size: 107.37GB <107374182400 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 0 Predictive Failure Analysis: 0 
c1t0d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: QEMU     Product: QEMU DVD-ROM     Revision: 0.14 Serial No:  
Size: 0.42GB <415178752 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 29 Predictive Failure Analysis: 0 

$ pfexec /tmp/diskinfo 
TYPE    DISK                    VID      PID              SIZE          RMV SSD
-       c3t0d0                  Virtio   Block Device      100.00 GiB   no  no 

#2 Updated by Alexander Pyhalov 12 months ago

Also format sees this disk:

pfexec format 
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c2t0d0 <drive type unknown>
          /pci@0,0/pci1af4,2@4/blkdev@0,0
       1. c3t0d0 <drive type unknown>
          /pci@0,0/pci1af4,2@5/blkdev@0,0

#3 Updated by Michal Nowak 11 months ago

This happens to me when I add two VirtIO block devices in QEMU without serial numbers. QEMU won't generate them on their own. `ptrconf` won't generate any `inquiry-serial-no` property. With AnySerialNumber per device it works fine.

Also available in: Atom