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 1448021

Summary: When set "physical/logical block size" to "4096_512", wrong block size displayed in guest
Product: Red Hat Enterprise Linux 7 Reporter: aihua liang <aliang>
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
virtio-win sub component: virtio-win-prewhql QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ailan, aliang, chayang, coli, juzhang, lijin, michen, phou, qzhang, vrozenfe, xuwei
Version: 7.4   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-12 09:50:51 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 aihua liang 2017-05-04 11:58:57 UTC
Description of problem:
 When set "physical/logical block size" to "4096_512", wrong block size displayed in guest

Version-Release number of selected component (if applicable):
kernel version:3.10.0-657.el7.x86_64
qemu-kvm-rhev version:qemu-kvm-rhev-2.9.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Start win2012 guest with physical/logical block size set to "4096_512", qemu cmds as bellow:
/usr/libexec/qemu-kvm \
-name 'avocado-vt-vm1'  \
-sandbox off  \
-machine pc \
-nodefaults  \
-vga std  \
-chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/monitor-qmpmonitor1-20170124-161452-WcepYpO8,server,nowait \
-mon chardev=qmp_id_qmpmonitor1,mode=control  \
-chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/monitor-catch_monitor-20170124-161452-WcepYpO8,server,nowait \
-mon chardev=qmp_id_catch_monitor,mode=control \
-device pvpanic,ioport=0x505,id=idqap0h5  \
-chardev socket,id=serial_id_serial0,path=/var/tmp/serial-serial0-20170124-161452-WcepYpO8,server,nowait \
-device isa-serial,chardev=serial_id_serial0  \
-chardev socket,id=seabioslog_id_20170124-161452-WcepYpO8,path=/var/tmp/seabios-20170124-161452-WcepYpO8,server,nowait \
-device isa-debugcon,chardev=seabioslog_id_20170124-161452-WcepYpO8,iobase=0x402 \
-drive id=drive_image1,if=none,snapshot=on,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/win2012-64r2-virtio.qcow2 \
-device virtio-blk-pci,id=image1,drive=drive_image1,bus=pci.0 \
-drive id=data_image1,if=none,snapshot=on,aio=native,cache=none,format=qcow2,file=/home/test.qcow2 \
-device virtio-blk-pci,id=data1,drive=data_image1,bus=pci.0,physical_block_size=4096,logical_block_size=512 \
-device virtio-net-pci,mac=9a:b2:b3:b4:b5:b6,id=iduCv1Ln,vectors=4,netdev=idKgexFk,bus=pci.0,addr=05  \
-netdev tap,id=idKgexFk,vhost=on \
-m 4096  \
-smp 4,maxcpus=4,cores=2,threads=1,sockets=2  \
-cpu host \
-vnc :1  \
-rtc base=localtime,clock=host,driftfix=slew  \
-boot order=cdn,menu=on,strict=off \
-enable-kvm \
-monitor stdio \
-spice ipv4,port=5000,disable-ticketing \
   
2.Check block size in guest via "powershell 'get-disk|format-list'"

Actual results:
 Wrong block size displayed in guest.
   ......
   LogicalSectorSize:512
   PhysicalSectorSize:512
   ......

Expected results:
   ......
   LogicalSectorSize:512
   PhysicalSectorSize:4096
   ......

Additional info:
   It's a regression bug.
   
 Test on rhel7.4, it works ok.

Comment 2 Xueqiang Wei 2017-05-04 12:42:52 UTC
Tested with virtio-scsi not hit this issue, so it only occurred on virtio-blk.

cmd:
-device virtio-scsi-pci,id=scsi1,bus=pci.0 \
-drive file=/home/scsi/disk2.qcow2,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native,media=disk,werror=stop,rerror=stop \
-device scsi-hd,bus=scsi1.0,drive=drive-virtio-disk1,id=virtio-scsi-pci1,physical_block_size=4096,logical_block_size=512 \


kernel-3.10.0-656.el7.x86_64
qemu-kvm-rhev-2.9.0-2.el7.x86_64
guest: win10 x86_64

Comment 3 aihua liang 2017-05-05 07:21:02 UTC
Additional info:
   Test on win10 guest with virtio-win-prewhql-0.1-136.iso, the same issue also exist.
   
   Test on RHEL7.4 guest(kernel version:3.10.0-648.el7.x86_64), not hit this problem.

Comment 4 Peixiu Hou 2018-07-11 08:03:27 UTC
Hi aliang,

Could this issue duplicate to this one Bug 1428641 - [virtio-win][viostor]Windows guest's physical block size change to "512" after installation with the size "4096"?

Thanks~
Peixiu

Comment 5 aihua liang 2018-07-11 08:25:30 UTC
I'm not sure it has the same root cause with https://bugzilla.redhat.com/show_bug.cgi?id=1428641.

In this bug, i test the data disk and in https://bugzilla.redhat.com/show_bug.cgi?id=1428641, i test the system disk.

So i think if their root cause is the same, it can be tagged as "duplicated".

Comment 6 Peixiu Hou 2018-07-11 08:58:14 UTC
(In reply to aihua liang from comment #5)
> I'm not sure it has the same root cause with
> https://bugzilla.redhat.com/show_bug.cgi?id=1428641.
> 
> In this bug, i test the data disk and in
> https://bugzilla.redhat.com/show_bug.cgi?id=1428641, i test the system disk.
> 
> So i think if their root cause is the same, it can be tagged as "duplicated".

OK, aliang, thanks for your reply~

Hi vadim,

Could you help to confirm if this bug is duplicate to Bug 1428641 - [virtio-win][viostor]Windows guest's physical block size change to "512" after installation with the size "4096"?

Thanks a lot~
Peixiu

Comment 7 Vadim Rozenfeld 2018-07-12 05:25:14 UTC
(In reply to Peixiu Hou from comment #6)
> (In reply to aihua liang from comment #5)
> > I'm not sure it has the same root cause with
> > https://bugzilla.redhat.com/show_bug.cgi?id=1428641.
> > 
> > In this bug, i test the data disk and in
> > https://bugzilla.redhat.com/show_bug.cgi?id=1428641, i test the system disk.
> > 
> > So i think if their root cause is the same, it can be tagged as "duplicated".
> 
> OK, aliang, thanks for your reply~
> 
> Hi vadim,
> 
> Could you help to confirm if this bug is duplicate to Bug 1428641 -
> [virtio-win][viostor]Windows guest's physical block size change to "512"
> after installation with the size "4096"?
> 
> Thanks a lot~
> Peixiu

Hi Peixiu,
Yes it seems to be the same problem. I'll try to see is I can come up with a quick fix for this issue.

Best regards,
Vadim.

Comment 8 Peixiu Hou 2018-07-12 09:50:51 UTC
(In reply to Vadim Rozenfeld from comment #7)
> (In reply to Peixiu Hou from comment #6)
> > (In reply to aihua liang from comment #5)
> > > I'm not sure it has the same root cause with
> > > https://bugzilla.redhat.com/show_bug.cgi?id=1428641.
> > > 
> > > In this bug, i test the data disk and in
> > > https://bugzilla.redhat.com/show_bug.cgi?id=1428641, i test the system disk.
> > > 
> > > So i think if their root cause is the same, it can be tagged as "duplicated".
> > 
> > OK, aliang, thanks for your reply~
> > 
> > Hi vadim,
> > 
> > Could you help to confirm if this bug is duplicate to Bug 1428641 -
> > [virtio-win][viostor]Windows guest's physical block size change to "512"
> > after installation with the size "4096"?
> > 
> > Thanks a lot~
> > Peixiu
> 
> Hi Peixiu,
> Yes it seems to be the same problem. I'll try to see is I can come up with a
> quick fix for this issue.
> 
Ok, thank for your confirm, then I marked this bug duplicate to this one:
Bug 1428641 - [virtio-win][viostor]Windows guest's physical block size change to "512" after installation with the size "4096".

*** This bug has been marked as a duplicate of bug 1428641 ***