Bug 1166971

Summary: virtio-scsi disks and cd-roms with nonzero LUN are rejected with errors
Product: Red Hat Enterprise Linux 7 Reporter: Laszlo Ersek <lersek>
Component: ovmfAssignee: Laszlo Ersek <lersek>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: areis, crobinso, ddutile, drjones, juzhang, lersek, virt-bugs, xwei
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: OVMF-20140822-7.git9ece15a.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 05:36:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Laszlo Ersek 2014-11-22 05:58:59 UTC
*** Description of problem:
FAT32 filesystems on virtio-scsi disk and cd-roms cannot be read if the device has LUN > 0.

*** Version-Release number of selected component (if applicable):
OVMF-20140822-4.git9ece15a.el7

*** How reproducible:
100%

*** Steps to Reproduce:
1. start an OVMF virtual machine with a virtio-scsi disk or cd-rom having
   nonzero LUN (eg. LUN==1)
2. the disk image should contain at least one FAT32 partition, or, if using a
   cd-rom, the cd-rom should contain a FAT32 ElTorito boot image
3. Enter the UEFI shell, and issue "dir" on the appropriate FSx: handle

*** Actual results:
The FAT32 filesystem on the disk or cd-rom is not recognized, and the OVMF debug log contains the following:

      ScsiDiskRead10: Check Condition happened!
      ScsiDisk: Sense Key = 0x5 ASC = 0x24!
      ScsiDiskRead10: Check Condition happened!
      ScsiDisk: Sense Key = 0x5 ASC = 0x24!
      ScsiDiskRead10: Check Condition happened!
      ScsiDisk: Sense Key = 0x5 ASC = 0x24!
      ScsiDiskRead10: Check Condition happened!
      ScsiDisk: Sense Key = 0x5 ASC = 0x24!
      FatOpenDevice: read of part_lba failed Device Error

*** Expected results:
The filesystem should be recognized; no SCSI errors should be reported.

Comment 3 Laszlo Ersek 2014-11-22 06:38:13 UTC
Posted upstream series
Subject: [PATCH 0/3] turn 'LUN encoding in CDB' into an explicit feature
Date: Sat, 22 Nov 2014 07:35:18 +0100
Message-Id: <1416638121-2658-1-git-send-email-lersek>

Comment 4 Laszlo Ersek 2014-11-25 09:01:08 UTC
Upstream v2:
http://thread.gmane.org/gmane.comp.bios.tianocore.devel/11410

Comment 5 Laszlo Ersek 2014-11-25 10:50:30 UTC
Upstream v3:
http://thread.gmane.org/gmane.comp.bios.tianocore.devel/11413

Comment 6 Laszlo Ersek 2014-11-26 16:10:15 UTC
Upstream v4:
http://thread.gmane.org/gmane.comp.bios.tianocore.devel/11455

Comment 9 Laszlo Ersek 2014-11-28 14:56:11 UTC
Upstream commits:

1 c128d52 MdePkg: UefiScsiLib: do not encode LUN in CDB for READ and WRITE
2 b04a63a MdePkg: UefiScsiLib: do not encode LUN in CDB for other SCSI commands

Comment 11 Laszlo Ersek 2014-11-28 15:56:11 UTC
QE, the issue is easily reproducible with the following command line:

  virt-install \
    --name rhel7 \
    --memory 2048 \
    --os-variant rhel7.0 \
    --boot hd,cdrom,loader=/usr/share/OVMF/OVMF_CODE.fd,loader_ro=yes,loader_type=pflash \
    --disk size=10,bus=scsi \
    --disk path=/mnt/data/isos/RHEL-7.0-20140507.0-Server-x86_64-dvd1.iso,device=cdrom,shareable=on,bus=scsi \
    --controller scsi,model=virtio-scsi \
    --network network=default,model=virtio

Comment 12 Miroslav Rezanina 2014-12-05 11:12:40 UTC
Fix included in OVMF-20140822-7.git9ece15a.el7

Comment 17 Xiaoqing Wei 2015-01-15 08:43:01 UTC
with steps on https://bugzilla.redhat.com/show_bug.cgi?id=1166971#c11

OVMF-20140822-4.git9ece15a.el7.x86_64.rpm -> fail to enter installation screen
OVMF-20140822-7.git9ece15a.el7.x86_64.rpm -> success to enter installation screen

Based on above test, moving to VERIFIED.

Comment 19 errata-xmlrpc 2015-03-05 05:36:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-0293.html