Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2043493

Summary: Failed format a 100G volume with virtio-blk-pci on windows server
Product: Red Hat Enterprise Linux 9 Reporter: Peixiu Hou <phou>
Component: qemu-kvmAssignee: Vadim Rozenfeld <vrozenfe>
qemu-kvm sub component: virtio-blk,scsi QA Contact: Peixiu Hou <phou>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: high    
Priority: high CC: qinwang, qizhu, virt-maint, vrozenfe
Version: 9.0Keywords: Upstream
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-21 11:23:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peixiu Hou 2022-01-21 11:08:56 UTC
Description of problem:
Failed format a 100G volume with virtio-blk-pci on windows server, but with a 10G volume, format can be succeed.

Version-Release number of selected component (if applicable):
qemu-kvm-6.1.0-5.el9.x86_64
kernel-5.14.0-21.el9.x86_64
virtio-win-prewhql-215
seabios-bin-1.14.0-7.el9.noarch

How reproducible:
100%

Steps to Reproduce:
1. Prepare a iscsi server with a 100G lun disk first:
$ targetcli
targetcli shell version 2.1.53
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/> ls
o- / ......................................................................................... [...]
  o- backstores .............................................................................. [...]
  | o- block .................................................................. [Storage Objects: 0]
  | o- fileio ................................................................. [Storage Objects: 1]
  | | o- one ................................ [/home/iscsi/onex.img (120.0GiB) write-back activated]
  | |   o- alua ................................................................... [ALUA Groups: 1]
  | |     o- default_tg_pt_gp ....................................... [ALUA state: Active/optimized]
  | o- pscsi .................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................ [Storage Objects: 0]
  o- iscsi ............................................................................ [Targets: 1]
  | o- iqn.2016-06.one.server:one-a ...................................................... [TPGs: 1]
  |   o- tpg1 ............................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................... [ACLs: 3]
  |     | o- iqn.1994-05.com.redhat:7bd6da1a0a4 ................................... [Mapped LUNs: 1]
  |     | | o- mapped_lun0 .................................................. [lun0 fileio/one (rw)]
  |     | o- iqn.1994-05.com.redhat:clienta ....................................... [Mapped LUNs: 1]
  |     | | o- mapped_lun0 .................................................. [lun0 fileio/one (rw)]
  |     | o- iqn.1994-05.com.redhat:clientb ....................................... [Mapped LUNs: 1]
  |     |   o- mapped_lun0 .................................................. [lun0 fileio/one (rw)]
  |     o- luns .......................................................................... [LUNs: 1]
  |     | o- lun0 ........................... [fileio/one (/home/iscsi/onex.img) (default_tg_pt_gp)]
  |     o- portals .................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 ..................................................................... [OK]
  o- loopback ......................................................................... [Targets: 0]
/>

2. Login this targetcli to host:
$ iscsiadm -m discovery -t sendtargets -p 10.73.73.9
$ iscsiadm --mode node --targetname iqn.2016-06.one.server:one-a --portal 10.73.73.9:3260 --login
$ fdisk -l
Disk /dev/sdc: 120 GiB, 128849018880 bytes, 251658240 sectors
Disk model: one             
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 8388608 bytes
Disklabel type: dos
Disk identifier: 0xcd88f394
$ lsscsi
[0:0:0:0]    disk    Generic- SD/MMC CRW       1.00  /dev/sda 
[1:0:0:0]    enclosu HPE      Smart Adapter    1.66  -        
[1:1:0:0]    disk    HPE      LOGICAL VOLUME   1.66  /dev/sdb 
[1:2:0:0]    storage HPE      P408i-a SR Gen10 1.66  -        
[2:0:0:0]    disk    LIO-ORG  one              4.0   /dev/sdc

3. Boot a vm up with 100G volume /dev/sdc, qemu command line as follows:
$ cat instance.sh 
/usr/libexec/qemu-kvm -name guest=instance-00000007,debug-threads=on \
	-machine pc-i440fx-rhel7.6.0,usb=off,dump-guest-core=off \
	-accel kvm -cpu host,ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,umip=on,pku=on,md-clear=on,stibp=on,arch-capabilities=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,rdctl-no=on,ibrs-all=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,tsx-ctrl=on,hle=off,rtm=off \
	-m 8192 \
	-overcommit mem-lock=off \
	-smp 4,sockets=4,dies=1,cores=1,threads=1 \
	-uuid 0905830f-496c-40b4-bd7e-7c00cb350fd0 \
	-smbios type=1,manufacturer="OpenStack Foundation",product="OpenStack Nova",version=24.0.1,serial=0905830f-496c-40b4-bd7e-7c00cb350fd0,uuid=0905830f-496c-40b4-bd7e-7c00cb350fd0,family="Virtual Machine" \
	-no-user-config -nodefaults \
	-rtc base=utc,driftfix=slew \
	-global kvm-pit.lost_tick_policy=delay \
	-boot strict=on \
	-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
	-blockdev '{"driver":"file","filename":"/home/kvm_autotest_root/images/win2022-64-virtio.qcow2","node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
	-blockdev '{"node-name":"libvirt-2-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-2-storage"}' \
	-device ide-hd,drive=libvirt-2-format,id=ide0-0-0,bus=ide.0,unit=0,bootindex=1 \
	-blockdev '{"driver":"host_device","filename":"/dev/sdc","aio":"native","node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
	-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \
	-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=libvirt-1-format,id=virtio-disk1,write-cache=on,serial=e520a974-4bbf-4f0c-ace3-475d44be83bb \
	-netdev tap,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:59:f6:7a,bus=pci.0,addr=0x3 \
	-device usb-tablet,id=input0,bus=usb.0,port=1 \
	-vnc :1 \
	-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
	-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 \
	-device vmcoreinfo \
	-cdrom /home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-215.iso \
        -msg timestamp=on \
	-monitor stdio
4. Do disk format for new attahced 100G disk  ----> will show Formating... long times

Actual results:
Format failed

Expected results:
Format success

Additional info:

Comment 1 Peixiu Hou 2022-01-21 11:23:45 UTC
Tried to test this issue again with qemu-kvm-6.2.0-4.el9.x86_64, steps as comment#0, cannot reproduce this issue, 100G volume can be formated successfully, and we can write data on this disk. It should be fixed in qemu-kvm-6.2.0 version.
So close this issue as current release now and will add a new case for this scenario~

Thanks~

Comment 2 Peixiu Hou 2022-01-28 03:08:22 UTC
*** Bug 2043494 has been marked as a duplicate of this bug. ***

Comment 3 Vadim Rozenfeld 2022-02-23 01:43:46 UTC
In case if the problem will be reproduce in the future, and
for the sake of testing, can we try ",indirect_desc=off' configuration
to see it it solves the problem?

Thanks,
Vadim.

Comment 4 qing.wang 2022-02-23 02:07:27 UTC
(In reply to Vadim Rozenfeld from comment #3)
> In case if the problem will be reproduce in the future, and
> for the sake of testing, can we try ",indirect_desc=off' configuration
> to see it it solves the problem?
> 
> Thanks,
> Vadim.

The issue has gone in latest version according to #1.
Do the think indirect_desc is the test point of this issue :
-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=libvirt-1-format,id=virtio-disk1,write-cache=on,indirect_desc=off,serial=e520a974-4bbf-4f0c-ace3-475d44be83bb \

Comment 5 Vadim Rozenfeld 2022-02-23 03:00:29 UTC
(In reply to qing.wang from comment #4)
> (In reply to Vadim Rozenfeld from comment #3)
> > In case if the problem will be reproduce in the future, and
> > for the sake of testing, can we try ",indirect_desc=off' configuration
> > to see it it solves the problem?
> > 
> > Thanks,
> > Vadim.
> 
> The issue has gone in latest version according to #1.
> Do the think indirect_desc is the test point of this issue :
> -device
> virtio-blk-pci,bus=pci.0,addr=0x5,drive=libvirt-1-format,id=virtio-disk1,
> write-cache=on,indirect_desc=off,serial=e520a974-4bbf-4f0c-ace3-475d44be83bb
                 ^^^^^^^^^^^^^^^^^
                   Right. 
Thanks, Vadim.

> \

Comment 6 qing.wang 2022-02-23 07:10:57 UTC
No issue on

Red Hat Enterprise Linux release 9.0 Beta (Plow)
5.14.0-56.el9.x86_64
qemu-kvm-6.2.0-9.el9.x86_64
seabios-bin-1.15.0-1.el9.noarch
edk2-ovmf-20220126gitbb1bba3d77-2.el9.noarch
virtio-win-prewhql-0.1-215.iso


o- / ......................................................................................... [...]
  o- backstores .............................................................................. [...]
  | o- block .................................................................. [Storage Objects: 0]
  | o- fileio ................................................................. [Storage Objects: 1]
  | | o- one ..................................... [/home/iscsi/one (110.0GiB) write-back activated]
  | |   o- alua ................................................................... [ALUA Groups: 1]
  | |     o- default_tg_pt_gp ....................................... [ALUA state: Active/optimized]
  | o- pscsi .................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................ [Storage Objects: 0]
  o- iscsi ............................................................................ [Targets: 1]
  | o- iqn.2016-06.one.server:one-a ...................................................... [TPGs: 1]
  |   o- tpg1 ............................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................... [ACLs: 3]
  |     | o- iqn.1994-05.com.redhat:9bd26bf966c5 .................................. [Mapped LUNs: 1]
  |     | | o- mapped_lun0 .................................................. [lun0 fileio/one (rw)]
  |     | o- iqn.1994-05.com.redhat:clienta ....................................... [Mapped LUNs: 1]
  |     | | o- mapped_lun0 .................................................. [lun0 fileio/one (rw)]
  |     | o- iqn.1994-05.com.redhat:clientb ....................................... [Mapped LUNs: 1]
  |     |   o- mapped_lun0 .................................................. [lun0 fileio/one (rw)]
  |     o- luns .......................................................................... [LUNs: 1]
  |     | o- lun0 ................................ [fileio/one (/home/iscsi/one) (default_tg_pt_gp)]
  |     o- portals .................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 ..................................................................... [OK]
  o- loopback ......................................................................... [Targets: 0]


/usr/libexec/qemu-kvm -name guest=instance-00000007,debug-threads=on \
	-machine pc-i440fx-rhel7.6.0,usb=off,dump-guest-core=off \
	-accel kvm -cpu host,ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,umip=on,pku=on,md-clear=on,stibp=on,arch-capabilities=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,rdctl-no=on,ibrs-all=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,tsx-ctrl=on,hle=off,rtm=off \
	-m 8192 \
	-overcommit mem-lock=off \
	-smp 4,sockets=4,dies=1,cores=1,threads=1 \
	-uuid 0905830f-496c-40b4-bd7e-7c00cb350fd0 \
	-smbios type=1,manufacturer="OpenStack Foundation",product="OpenStack Nova",version=24.0.1,serial=0905830f-496c-40b4-bd7e-7c00cb350fd0,uuid=0905830f-496c-40b4-bd7e-7c00cb350fd0,family="Virtual Machine" \
	-no-user-config -nodefaults \
	-rtc base=utc,driftfix=slew \
	-global kvm-pit.lost_tick_policy=delay \
	-boot strict=on \
	-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
	-blockdev '{"driver":"file","filename":"/home/kvm_autotest_root/images/win2019-64-virtio.qcow2","node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
	-blockdev '{"node-name":"libvirt-2-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-2-storage"}' \
	-device ide-hd,drive=libvirt-2-format,id=ide0-0-0,bus=ide.0,unit=0,bootindex=1 \
	-blockdev '{"driver":"host_device","filename":"/dev/sdd","aio":"native","node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
	-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \
	-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=libvirt-1-format,id=virtio-disk1,write-cache=on,indirect_desc=off,serial=e520a974-4bbf-4f0c-ace3-475d44be83bb \
	-netdev tap,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:59:f6:7a,bus=pci.0,addr=0x3 \
	-device usb-tablet,id=input0,bus=usb.0,port=1 \
	-vnc :5 \
	-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
	-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 \
	-device vmcoreinfo \
	-cdrom /home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-215.iso \
        -msg timestamp=on \
	-monitor stdio