Description of problem: As subject Version-Release number of selected component (if applicable): libvirt-5.0.0-7.module+el8+2887+effa3c42.x86_64 libiscsi-1.18.0-6.module+el8+2547+34fca794.x86_64 How reproducible: 100% Steps to Reproduce: 1. Prepare a iscsi target with lun > 4G 2. Create a iscsi-direct pool # cat /tmp/iscsi-direct.xml <pool type="iscsi-direct"> <name>iscsi-direct</name> <source> <host name="xxxx"/> <device path="iqn.2019-03.org.libvirt:noauth:1"/> <initiator> <iqn name='iqn.2013-06.com.example:iscsi-initiator'/> </initiator> </source> </pool> # virsh pool-create /tmp/iscsi-direct.xml Pool iscsi-direct created from /tmp/iscsi-direct.xml 3. List the volume size: # virsh vol-list iscsi-direct --details Name Path Type Capacity Allocation --------------------------------------------------------------------------------------------------------------------------------------------------- unit:0:0:1 ip-vm-10-0-77-62.hosted.upshift.rdu2.redhat.com:3260-iscsi-iqn.2019-03.org.libvirt:noauth:1-lun-1 network 4.00 GiB 4.00 GiB Actual results: As above Expected results: Get the actual size. Additional info: upstream commit: commit 5de5432e34e097fde32b2b1ad96b8b8b1186dec1 Author: Jiri Denemark <jdenemar> Date: Thu Feb 28 15:12:31 2019 +0100 storage: Fix iscsi-direct volume size for volumes > 4GiB Both block_size and nb_block are unit32_t and multiplying them overflows at 4GiB. Moreover, the iscsi_10_ APIs use 32bit number of blocks and thus they can only address images up to 2TiB with 512B blocks. Let's use 64b iscsi_16_ APIs instead. Signed-off-by: Jiri Denemark <jdenemar> commit bf5cf610f206d5d54914e8f8b0764b2b37ddf50c Author: Michal Privoznik <mprivozn> Date: Thu Feb 28 15:08:19 2019 +0100
Verified Version: libvirt-5.4.0-1.module+el8.1.0+3304+7eb41d5f.x86_64 qemu-kvm-4.0.0-4.module+el8.1.0+3356+cda7f1ee.x86_64 kernel-4.18.0-107.el8.x86_64 Verified Steps: 1. Prepare a iscsi target with lun > 4G. # qemu-img info iscsi://**IP*/iqn.2017-12.com.virttest:emulated-iscsi-noauth.target2/0 image: json:{"driver": "raw", "file": {"lun": "0", "portal": "**IP**", "driver": "iscsi", "transport": "tcp", "target": "iqn.2017-12.com.virttest:emulated-iscsi-noauth.target2"}} file format: raw virtual size: 30G (32212254720 bytes) disk size: unavailable 2. Prepare a related pool xml. # cat iscsi-direct.pool <pool type='iscsi-direct'> <name>iscsi-direct</name> <source> <host name='**IP**' port='3260'/> <device path='iqn.2017-12.com.virttest:emulated-iscsi-noauth.target2'/> <initiator> <iqn name='iqn.2013-06.com.example:iscsi-initiator'/> </initiator> </source> </pool> 3. Create a iscsi-direct pool. # virsh pool-create iscsi-direct.pool Pool iscsi-direct created from iscsi-direct.pool 4. Check vol info. # virsh vol-list iscsi-direct --details Name Path Type Capacity Allocation ------------------------------------------------------------------------------------------------------------------------------------------ unit:0:0:0 ip-**IP**:3260-iscsi-iqn.2017-12.com.virttest:emulated-iscsi-noauth.target2-lun-0 network 30.00 GiB 30.00 GiB # virsh vol-info unit:0:0:0 iscsi-direct Name: unit:0:0:0 Type: network Capacity: 30.00 GiB Allocation: 30.00 GiB So move this bug to be verified.
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://access.redhat.com/errata/RHBA-2019:3723