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 1134679 - [virtio-win][virtio scsi] fail to specify the physical_block_size/logical_block_size value not 512 for virtio-scsi disk
Summary: [virtio-win][virtio scsi] fail to specify the physical_block_size/logical_blo...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virtio-win
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Vadim Rozenfeld
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1558351
TreeView+ depends on / blocked
 
Reported: 2014-08-28 05:19 UTC by Sibiao Luo
Modified: 2018-08-07 08:27 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-07 08:27:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot for the Error. (55.96 KB, image/png)
2014-08-28 05:23 UTC, Sibiao Luo
no flags Details

Description Sibiao Luo 2014-08-28 05:19:02 UTC
Description of problem:
fail to specify the physical_block_size/logical_block_size=1024|2048... for scsi-hd disk, it will prompt that "Error:  The parameter is incorrect." if check it with "fsutil fsinfo ntfsinfo E:" in guest and also fail to format it with "the system cannot find the files specified." info.
BTW, also tried the virtio-blk driver for windows which has not hit this issue.
RHEL7 guest did not hit this issue.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev && rpm -q seabios
3.10.0-145.el7.x86_64
qemu-kvm-rhev-1.5.3-60.el7ev.x86_64
seabios-1.7.5-4.el7.x86_64
guest info:
windows: win2012-R2
virtio-win-prewhql-0.1-89

How reproducible:
100%

Steps to Reproduce:
1.launch a KVM guest with physical_block_size/logical_block_size=1024|2048 specified for IDE disk.
e.g.:...-drive file=/home/my-data-disk3.qcow2,if=none,id=drive-data-disk3,format=qcow2,cache=none,aio=native -device virtio-scsi-pci,bus=pci.0,addr=0x8,id=scsi1 -device scsi-hd,drive=drive-data-disk3,id=data-disk3,bus=scsi1.0,physical_block_size=1024,logical_block_size=1024
2.login guest and check the physical_block_size/logical_block_size value.
C:\Windows\system32>fsutil fsinfo ntfsinfo E:

Expected results:
after step 2, it will prompt that "Error:  The parameter is incorrect." if check it with "fsutil fsinfo ntfsinfo E:" in guest and also fail to format it with "the system cannot find the files specified." info. I will attach the screen-shot for it later.
C:\Windows\system32>fsutil fsinfo ntfsinfo E:
Error:  The parameter is incorrect.

iThe FSUTIL utility requires a local NTFS volume.

Additional info:
Also tried the virtio-blk virtio-win driver:
C:\Windows\system32>fsutil fsinfo ntfsinfo E:
NTFS Volume Serial Number :       0x24b4fac7b4fa9b0e
NTFS Version   :                  3.1
LFS Version    :                  1.1
Number Sectors :                  0x00000000009fffff
Total Clusters :                  0x000000000027ffff
Free Clusters  :                  0x000000000027abbb
Total Reserved :                  0x0000000000000000
Bytes Per Sector  :               1024       <-----------logical block size
Bytes Per Physical Sector :       1024       <-----------physical block size
Bytes Per Cluster :               4096
Bytes Per FileRecord Segment    : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length :           0x0000000000040000
Mft Start Lcn  :                  0x00000000000c0000
Mft2 Start Lcn :                  0x0000000000000002
Mft Zone Start :                  0x00000000000c0040
Mft Zone End   :                  0x00000000000cc840
Resource Manager Identifier :     8E466AE0-2E42-11E4-B0D3-E2DB9ED0D22B

Comment 1 Sibiao Luo 2014-08-28 05:20:25 UTC
Also tried the rhel guest with the same testing which did not hit it.
# cat /sys/block/sdb/queue/logical_block_size 
1024
# cat /sys/block/sdb/queue/physical_block_size 
1024

Best Regards,
sluo

Comment 2 Sibiao Luo 2014-08-28 05:23:03 UTC
Created attachment 931723 [details]
screenshot for the Error.

Comment 3 Sibiao Luo 2014-08-28 05:28:38 UTC
Also tried the physical_block_size/logical_block_size=4096 with bcao's request for windows guest which also hit the same issue.

Comment 4 Ronen Hod 2014-09-01 14:32:21 UTC
Sibiao,
I would expect 512 and 4096 to work. These are the standard real hardware sizes.
Vadim will probably have better answers.
Postponed to 7.2, as we are out of capacity for 7.1

Comment 8 Vadim Rozenfeld 2017-02-23 11:57:36 UTC
can we please check if the problem still exists?
Just don't forget to re-format disk after changing physical or logical block size.

Thank you,
Vadim.

Comment 9 lijin 2017-02-27 08:09:22 UTC
For system disk:
 - with logical_block_size=512,guest can be installed correctly,"fsutil fsinfo ntfsinfo " can show correct info;
 - with logical_block_size=1024/2048/4096,guest can NOT be installed(please check the attachment)
 - with physical_block_size=512/1024/2048/4096,guest can be installed correctly,"fsutil fsinfo ntfsinfo " can show correct info;


For data disk
 - physical_block_size and logical_block_size=512/1024/2048/4096,all work well,"fsutil fsinfo ntfsinfo " can show correct info


Testing package info:
   virtio-win-prewhql-132
   qemu-kvm-rhev-2.8.0-4.el7.x86_64
   kernel-3.10.0-563.el7.x86_64
   seabios-1.9.1-5.el7_3.1.x86_64
   guest:windows 2016  

Vadim,
scsi system disk logical_block_size does NOT support 1024/2048/4096,could you help to check is it normal?

Thanks

Comment 11 Vadim Rozenfeld 2017-02-27 12:15:36 UTC
(In reply to lijin from comment #9)
> For system disk:
>  - with logical_block_size=512,guest can be installed correctly,"fsutil
> fsinfo ntfsinfo " can show correct info;
>  - with logical_block_size=1024/2048/4096,guest can NOT be installed(please
> check the attachment)
>  - with physical_block_size=512/1024/2048/4096,guest can be installed
> correctly,"fsutil fsinfo ntfsinfo " can show correct info;
> 
> 
> For data disk
>  - physical_block_size and logical_block_size=512/1024/2048/4096,all work
> well,"fsutil fsinfo ntfsinfo " can show correct info
> 
> 
> Testing package info:
>    virtio-win-prewhql-132
>    qemu-kvm-rhev-2.8.0-4.el7.x86_64
>    kernel-3.10.0-563.el7.x86_64
>    seabios-1.9.1-5.el7_3.1.x86_64
>    guest:windows 2016  
> 
> Vadim,
> scsi system disk logical_block_size does NOT support 1024/2048/4096,could
> you help to check is it normal?
>
 
Thanks a lot Lijin.
Will do it soon. Could you please tell me if logical size was always equal
or bigger than physical size for this case?

Best regards,
Vadim.

> Thanks

Comment 12 lijin 2017-02-28 03:25:35 UTC
(In reply to Vadim Rozenfeld from comment #11)
> (In reply to lijin from comment #9)
> > For system disk:
> >  - with logical_block_size=512,guest can be installed correctly,"fsutil
> > fsinfo ntfsinfo " can show correct info;
> >  - with logical_block_size=1024/2048/4096,guest can NOT be installed(please
> > check the attachment)
> >  - with physical_block_size=512/1024/2048/4096,guest can be installed
> > correctly,"fsutil fsinfo ntfsinfo " can show correct info;
> > 
> > 
> > For data disk
> >  - physical_block_size and logical_block_size=512/1024/2048/4096,all work
> > well,"fsutil fsinfo ntfsinfo " can show correct info
> > 
> > 
> > Testing package info:
> >    virtio-win-prewhql-132
> >    qemu-kvm-rhev-2.8.0-4.el7.x86_64
> >    kernel-3.10.0-563.el7.x86_64
> >    seabios-1.9.1-5.el7_3.1.x86_64
> >    guest:windows 2016  
> > 
> > Vadim,
> > scsi system disk logical_block_size does NOT support 1024/2048/4096,could
> > you help to check is it normal?
> >
>  
> Thanks a lot Lijin.
> Will do it soon. Could you please tell me if logical size was always equal
> or bigger than physical size for this case?

I tried with following matrix,all hit the sam issue:
physical_block_size=512,logical_block_size=1024
physical_block_size=1024,logical_block_size=1024
physical_block_size=2048,logical_block_size=1024


BTW,I saw a comment "Windows can be installed/booted only from GPT 4K sector size disk." in https://bugzilla.redhat.com/show_bug.cgi?id=664659#c6.
I'm not sure if this also apply to other sector size.

Comment 13 Yu Wang 2017-02-28 06:45:21 UTC
Hi Vadim,

1 For virtio-scsi device(data disk):
when  logical_block_size > physical_block_size , "Bytes Per Sector" and "Bytes Per Physical Sector" show the "logical_block_size"

when logical_block_size < physical_block_size , "Bytes Per Sector" shows logical size and  "Bytes Per Physical Sector" shows physical size.

2 For virtio-blk device (data disk):
No matter > or < , "Bytes Per Sector" and "Bytes Per Physical Sector" both show the "logical_block_size"

Is that normal or a bug (vioscsi and viostor)?

Thanks
Yu Wang

Comment 14 Vadim Rozenfeld 2017-02-28 10:15:24 UTC
(In reply to lijin from comment #12)
> (In reply to Vadim Rozenfeld from comment #11)
> > (In reply to lijin from comment #9)
> > > For system disk:
> > >  - with logical_block_size=512,guest can be installed correctly,"fsutil
> > > fsinfo ntfsinfo " can show correct info;
> > >  - with logical_block_size=1024/2048/4096,guest can NOT be installed(please
> > > check the attachment)
> > >  - with physical_block_size=512/1024/2048/4096,guest can be installed
> > > correctly,"fsutil fsinfo ntfsinfo " can show correct info;
> > > 
> > > 
> > > For data disk
> > >  - physical_block_size and logical_block_size=512/1024/2048/4096,all work
> > > well,"fsutil fsinfo ntfsinfo " can show correct info
> > > 
> > > 
> > > Testing package info:
> > >    virtio-win-prewhql-132
> > >    qemu-kvm-rhev-2.8.0-4.el7.x86_64
> > >    kernel-3.10.0-563.el7.x86_64
> > >    seabios-1.9.1-5.el7_3.1.x86_64
> > >    guest:windows 2016  
> > > 
> > > Vadim,
> > > scsi system disk logical_block_size does NOT support 1024/2048/4096,could
> > > you help to check is it normal?
> > >
> >  
> > Thanks a lot Lijin.
> > Will do it soon. Could you please tell me if logical size was always equal
> > or bigger than physical size for this case?
> 
> I tried with following matrix,all hit the sam issue:
> physical_block_size=512,logical_block_size=1024
> physical_block_size=1024,logical_block_size=1024
> physical_block_size=2048,logical_block_size=1024
> 
> 
> BTW,I saw a comment "Windows can be installed/booted only from GPT 4K sector
> size disk." in https://bugzilla.redhat.com/show_bug.cgi?id=664659#c6.
> I'm not sure if this also apply to other sector size.

It's still relevant.
As far as I remember, for the system disk we supposed to be able to support the following matrix:

logical size/physical size 
4096/4096
512/512
512/4096

Comment 19 Peixiu Hou 2018-08-02 09:45:05 UTC
Hi vadim,

For virtio scsi, I tested some configuration on rhel7.6 host.
I checked this issue https://bugzilla.redhat.com/show_bug.cgi?id=566785, and combined your answer in the comment#14, have a question want to confirm:
For system disk, If it's only support follow configurations?
logical size/physical size 
512/512
512/4096
if yes, for 4096/4096 configuration, could tell the reason why not support?

For data disk, if only support follows? 
logical size/physical size 
4096/4096
512/512
512/4096

Test summary:
Guest os: win2016

1. Tested with logical_block_size=512,physical_block_size=4096 on system disk, can get the system disk information in the guest:
LogicalSectorSize  : 512
PhysicalSectorSize : 4096

2. Tested with logical_block_size=512,physical_block_size=512 on system disk, can get the system disk information in the guest:
LogicalSectorSize  : 512
PhysicalSectorSize : 512

3. Tried with logical_block_size=4096,physical_block_size=4096 on system disk, cannot boot in the guest.

4. Tested with logical_block_size=512,physical_block_size=4096 on data disk, can get the data disk information in the guest:
LogicalSectorSize  : 512
PhysicalSectorSize : 4096

5. Tested with logical_block_size=512,physical_block_size=512 on data disk, can get the data disk information in the guest:
LogicalSectorSize  : 512
PhysicalSectorSize : 512

6. Tested with logical_block_size=4096,physical_block_size=4096 on data disk, can get the data disk information in the guest:
LogicalSectorSize  : 4096
PhysicalSectorSize : 4096

Used virtio-win prewhql-157 build.

Thanks a lot~
Peixiu

Comment 20 Vadim Rozenfeld 2018-08-03 01:41:32 UTC
(In reply to Peixiu Hou from comment #19)
> Hi vadim,
> 
> For virtio scsi, I tested some configuration on rhel7.6 host.
> I checked this issue https://bugzilla.redhat.com/show_bug.cgi?id=566785, and
> combined your answer in the comment#14, have a question want to confirm:
> For system disk, If it's only support follow configurations?
> logical size/physical size 
> 512/512
> 512/4096
> if yes, for 4096/4096 configuration, could tell the reason why not support?

I guess it might be a BIOS (SeaBios) problem, but we need to check it. What about UEFI? Can you give it a try to see if it works or not?


Thanks, 
Vadim.

> 
> For data disk, if only support follows? 
> logical size/physical size 
> 4096/4096
> 512/512
> 512/4096
> 
> Test summary:
> Guest os: win2016
> 
> 1. Tested with logical_block_size=512,physical_block_size=4096 on system
> disk, can get the system disk information in the guest:
> LogicalSectorSize  : 512
> PhysicalSectorSize : 4096
> 
> 2. Tested with logical_block_size=512,physical_block_size=512 on system
> disk, can get the system disk information in the guest:
> LogicalSectorSize  : 512
> PhysicalSectorSize : 512
> 
> 3. Tried with logical_block_size=4096,physical_block_size=4096 on system
> disk, cannot boot in the guest.
> 
> 4. Tested with logical_block_size=512,physical_block_size=4096 on data disk,
> can get the data disk information in the guest:
> LogicalSectorSize  : 512
> PhysicalSectorSize : 4096
> 
> 5. Tested with logical_block_size=512,physical_block_size=512 on data disk,
> can get the data disk information in the guest:
> LogicalSectorSize  : 512
> PhysicalSectorSize : 512
> 
> 6. Tested with logical_block_size=4096,physical_block_size=4096 on data
> disk, can get the data disk information in the guest:
> LogicalSectorSize  : 4096
> PhysicalSectorSize : 4096
> 
> Used virtio-win prewhql-157 build.
> 
> Thanks a lot~
> Peixiu

Comment 21 Peixiu Hou 2018-08-03 06:35:29 UTC
(In reply to Vadim Rozenfeld from comment #20)
> (In reply to Peixiu Hou from comment #19)
> > Hi vadim,
> > 
> > For virtio scsi, I tested some configuration on rhel7.6 host.
> > I checked this issue https://bugzilla.redhat.com/show_bug.cgi?id=566785, and
> > combined your answer in the comment#14, have a question want to confirm:
> > For system disk, If it's only support follow configurations?
> > logical size/physical size 
> > 512/512
> > 512/4096
> > if yes, for 4096/4096 configuration, could tell the reason why not support?
> 
> I guess it might be a BIOS (SeaBios) problem, but we need to check it. What
> about UEFI? Can you give it a try to see if it works or not?
> 
Hi Vadim

I tried test with UEFI(under q35+ovmf), guest can be installed successfully with logical_block_size=4096,physical_block_size=4096 for system disk. and check in guest the logical block size and physical block size, both report correct. related commands as follows:

-drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.secboot.fd \
-drive if=pflash,format=raw,file=/home/kvm_autotest_root/images/win2016-64-virtio-scsi.qcow2.fd \
-device virtio-scsi-pci,num_queues=4,id=virtio_scsi_pci0,bus=pcie.0-root-port-6,addr=0x0 \
-drive id=drive_stg,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/check_block_size_image.qcow2 \
device scsi-hd,id=stg,drive=drive_stg,logical_block_size=4096,physical_block_size=4096,serial=TARGET_DISK0 \

Also tried with q35+seabios again, guest cannot be installed successfully with logical_block_size=4096,physical_block_size=4096 for system disk, the detected disk report error message "Windows cannot be installed to this disk. This computer's hardware may not support booting to this disk. Ensure that the disk's comtroller is enabled in the computer's BIOS menu"

Could it mean the seabios doesn't support this configure?

Best Regards~
Peixiu

Comment 22 Vadim Rozenfeld 2018-08-03 09:09:26 UTC
(In reply to Peixiu Hou from comment #21)
> (In reply to Vadim Rozenfeld from comment #20)
> > (In reply to Peixiu Hou from comment #19)
> > > Hi vadim,
> > > 
> > > For virtio scsi, I tested some configuration on rhel7.6 host.
> > > I checked this issue https://bugzilla.redhat.com/show_bug.cgi?id=566785, and
> > > combined your answer in the comment#14, have a question want to confirm:
> > > For system disk, If it's only support follow configurations?
> > > logical size/physical size 
> > > 512/512
> > > 512/4096
> > > if yes, for 4096/4096 configuration, could tell the reason why not support?
> > 
> > I guess it might be a BIOS (SeaBios) problem, but we need to check it. What
> > about UEFI? Can you give it a try to see if it works or not?
> > 
> Hi Vadim
> 
> I tried test with UEFI(under q35+ovmf), guest can be installed successfully
> with logical_block_size=4096,physical_block_size=4096 for system disk. and
> check in guest the logical block size and physical block size, both report
> correct. related commands as follows:
> 
> -drive
> if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.secboot.fd \
> -drive
> if=pflash,format=raw,file=/home/kvm_autotest_root/images/win2016-64-virtio-
> scsi.qcow2.fd \
> -device
> virtio-scsi-pci,num_queues=4,id=virtio_scsi_pci0,bus=pcie.0-root-port-6,
> addr=0x0 \
> -drive
> id=drive_stg,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=/
> home/kvm_autotest_root/images/check_block_size_image.qcow2 \
> device
> scsi-hd,id=stg,drive=drive_stg,logical_block_size=4096,
> physical_block_size=4096,serial=TARGET_DISK0 \
> 
> Also tried with q35+seabios again, guest cannot be installed successfully
> with logical_block_size=4096,physical_block_size=4096 for system disk, the
> detected disk report error message "Windows cannot be installed to this
> disk. This computer's hardware may not support booting to this disk. Ensure
> that the disk's comtroller is enabled in the computer's BIOS menu"
> 
> Could it mean the seabios doesn't support this configure?

Looks like SeBIOS doen't support 4Kn native configuration. (But at least viostor
is working fine with UEFI). We can expect the same problems with virtio-blk device as well. I would go forward and close this bug as WONTFIX and keep in mind that for system disk 4Kn configuration we need to use UEFI.

Best regards,
Vadim.  
> 
> Best Regards~
> Peixiu

Comment 23 Peixiu Hou 2018-08-06 08:01:58 UTC
(In reply to Vadim Rozenfeld from comment #22)
> (In reply to Peixiu Hou from comment #21)
> > (In reply to Vadim Rozenfeld from comment #20)
> > > (In reply to Peixiu Hou from comment #19)
> > > > Hi vadim,
> > > > 
> > > > For virtio scsi, I tested some configuration on rhel7.6 host.
> > > > I checked this issue https://bugzilla.redhat.com/show_bug.cgi?id=566785, and
> > > > combined your answer in the comment#14, have a question want to confirm:
> > > > For system disk, If it's only support follow configurations?
> > > > logical size/physical size 
> > > > 512/512
> > > > 512/4096
> > > > if yes, for 4096/4096 configuration, could tell the reason why not support?
> > > 
> > > I guess it might be a BIOS (SeaBios) problem, but we need to check it. What
> > > about UEFI? Can you give it a try to see if it works or not?
> > > 
> > Hi Vadim
> > 
> > I tried test with UEFI(under q35+ovmf), guest can be installed successfully
> > with logical_block_size=4096,physical_block_size=4096 for system disk. and
> > check in guest the logical block size and physical block size, both report
> > correct. related commands as follows:
> > 
> > -drive
> > if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.secboot.fd \
> > -drive
> > if=pflash,format=raw,file=/home/kvm_autotest_root/images/win2016-64-virtio-
> > scsi.qcow2.fd \
> > -device
> > virtio-scsi-pci,num_queues=4,id=virtio_scsi_pci0,bus=pcie.0-root-port-6,
> > addr=0x0 \
> > -drive
> > id=drive_stg,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=/
> > home/kvm_autotest_root/images/check_block_size_image.qcow2 \
> > device
> > scsi-hd,id=stg,drive=drive_stg,logical_block_size=4096,
> > physical_block_size=4096,serial=TARGET_DISK0 \
> > 
> > Also tried with q35+seabios again, guest cannot be installed successfully
> > with logical_block_size=4096,physical_block_size=4096 for system disk, the
> > detected disk report error message "Windows cannot be installed to this
> > disk. This computer's hardware may not support booting to this disk. Ensure
> > that the disk's comtroller is enabled in the computer's BIOS menu"
> > 
> > Could it mean the seabios doesn't support this configure?
> 
> Looks like SeBIOS doen't support 4Kn native configuration. (But at least
> viostor
> is working fine with UEFI). We can expect the same problems with virtio-blk
> device as well. I would go forward and close this bug as WONTFIX and keep in
> mind that for system disk 4Kn configuration we need to use UEFI.
> 
Agree with you, thanks for your confirm~

Best Regards~
Peixiu

Comment 24 Vadim Rozenfeld 2018-08-07 08:27:24 UTC
4Kn installation works with UEFI but doesn't
work with SeaBIOS due to its limitations.


Note You need to log in before you can comment on or make changes to this bug.