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.
Description of problem:
When enlarge disk with "block_resize" qemu command, it failed for raw format image on an iscsi disk. Has discussed this with some develop guys in virt-devel, create this issue to track this issue. Assign to Paolo directly as he required in the mail.
Version-Release number of selected component (if applicable):
2.6.32-220.el6.x86_64
qemu-kvm-0.12.1.2-2.213.el6.x86_64
How reproducible:
Always
Steps to Reproduce:
1. On host:
# iscsiadm -m discovery -t sendtargets -p 10.66.11.239
10.66.11.239:3260,1 intel_migration
# iscsiadm --mode node --targetname intel_migration --portal 10.66.11.239:3260,1 --login
#fdisk -l
(Shows there's a new disk /dev/sdb1 with 80GB)
#pvcreate /dev/sdb1
#vgcreate vgtest-qzhang /dev/sdb1
#lvcreate -n lvtest-2k8r2 -L 25G vtest-qzhang
#lvcreate -n lv-ide-raw -L 1G vgtest-qzhang
#lvcreate -n lv-ide-qcow2 -L 1G vgtest-qzhang
#lvcreate -n lv-virtio-raw -L 1G vgtest-qzhang
#lvcreate -n lv-virtio-qcow2 -L 1G vgtest-qzhang
#qemu-img create -f qcow2 /dev/vgtest-qzhang/lvtest-2k8r2 25G
#qemu-img create -f raw /dev/vgtest-qzhang/lv-ide-raw 1G
#qemu-img create -f qcow2 /dev/vgtest-qzhang/lv-ide-qcow2 1G
#qemu-img create -f raw /dev/vgtest-qzhang/lv-virtio-raw 1G
#qemu-img create -f qcow2 /dev/vgtest-qzhang/lv-virtio-qcow2 1G
2. Boot a win2k8-r2 guest pre-installed and attach a secondary disk using the 1G iscsi lvm I just created.
I test 4 scenarios: ide-raw, ide-qcow2, virtio-raw, virtio-qcow2.
Boot the guest with the 4 iscsi disk one by one.
Take the ide-raw for example:
#/usr/libexec/qemu-kvm ......-drive file=/dev/vgtest-qzhang/lv-ide-raw,if=none,id=drive-ide0-0-1,werror=stop,rerror=stop,cache=none,format=raw -device ide-drive,drive=drive-ide0-0-1,id=ide0-0-1,bus=ide.1,unit=0
3. After boot the 2k8 guest, checked in the device manager. There's a system disk and a 1G data disk.
4. (qemu)info block
drive-ide0-0-0: removable=0 file=/dev/vgtest-qzhang/lvtest-2k8r2 ro=0 drv=qcow2 encrypted=0
drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=/opt/virtio-win-1.4.0.vfd ro=1 drv=raw encrypted=0
drive-ide0-0-1: removable=0 file=/dev/vgtest-qzhang/lv-ide-raw ro=0 drv=raw encrypted=0
5. Enlarge the lv-ide-raw disk:
On host: #lvextend -L +1G /dev/vgtest-qzhang/lv-ide-raw
Extending logical volume lv-ide-raw to 2.00 GiB
Logical volume lv-ide-raw successfully resized
(qemu)block_resize drive-ide0-0-1 2G
An undefined error has ocurred
6. Test ide-qcow2, virtio-raw, virtio-qcow2 separately.
Results:
(1)ide.raw (iscsi):
enlarge/shrink: An undefined error has occurred
ide.raw(retest with a local file):
enlarge/decrease: Need to shutdown guest then boot again, the disk changes to the new size.
(2)ide.qcow2(iscsi):
enlarge:
Need to shutdown guest and boot again, then the disk changes to the new size.
shrink:
An undefined error has occurred (It is expected, qcow2 don't support shrink)
(3)virtio.raw:
iscsi: Enlarge/shrink: An undefined error has occurred
local file: Can enlarge/shrink successfully and no need to reboot guest.
(4)virtio.qcow2:
Enlarge:
Succeed and no need reboot.
Shrink:
An undefined error has occurred. (It is expected, qcow2 don't support shrink)
Actual results:
Raw format image on iscsi disk failed to resize with "block_resize" command.
Expected results:
Resize raw format image on iscsi disk should work.
Additional info:
Comment 4RHEL Program Management
2012-07-10 06:27:26 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 5RHEL Program Management
2012-07-11 02:02:07 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
This is because the iSCSI target does not report changes to the capacity of the disk. I'm not sure that this can be fixed, so let's reassign the bug for triaging.
Comment 7RHEL Program Management
2012-09-07 05:23:43 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.
Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
I don't think this is an iscsi target issue because we're only using iscsi to export the entire 80G LUN to the guest. From tgt's perspective nothing is getting resized.
I'm not a qemu expert but using 'qemu-img create' on block devices (the LVs) instead of files seems unconventional. You don't need qemu-img to create a raw image in the LV because the LV already is a block device you can give to the guest. The most straightforward way would be to create a 1G LV like you're doing, and then to resize later, use lvresize, and then the guest would see a 2G volume and then could extend any fs or partition in the volume from the original size.
Rassigning back to qemu.
Description of problem: When enlarge disk with "block_resize" qemu command, it failed for raw format image on an iscsi disk. Has discussed this with some develop guys in virt-devel, create this issue to track this issue. Assign to Paolo directly as he required in the mail. Version-Release number of selected component (if applicable): 2.6.32-220.el6.x86_64 qemu-kvm-0.12.1.2-2.213.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. On host: # iscsiadm -m discovery -t sendtargets -p 10.66.11.239 10.66.11.239:3260,1 intel_migration # iscsiadm --mode node --targetname intel_migration --portal 10.66.11.239:3260,1 --login #fdisk -l (Shows there's a new disk /dev/sdb1 with 80GB) #pvcreate /dev/sdb1 #vgcreate vgtest-qzhang /dev/sdb1 #lvcreate -n lvtest-2k8r2 -L 25G vtest-qzhang #lvcreate -n lv-ide-raw -L 1G vgtest-qzhang #lvcreate -n lv-ide-qcow2 -L 1G vgtest-qzhang #lvcreate -n lv-virtio-raw -L 1G vgtest-qzhang #lvcreate -n lv-virtio-qcow2 -L 1G vgtest-qzhang #qemu-img create -f qcow2 /dev/vgtest-qzhang/lvtest-2k8r2 25G #qemu-img create -f raw /dev/vgtest-qzhang/lv-ide-raw 1G #qemu-img create -f qcow2 /dev/vgtest-qzhang/lv-ide-qcow2 1G #qemu-img create -f raw /dev/vgtest-qzhang/lv-virtio-raw 1G #qemu-img create -f qcow2 /dev/vgtest-qzhang/lv-virtio-qcow2 1G 2. Boot a win2k8-r2 guest pre-installed and attach a secondary disk using the 1G iscsi lvm I just created. I test 4 scenarios: ide-raw, ide-qcow2, virtio-raw, virtio-qcow2. Boot the guest with the 4 iscsi disk one by one. Take the ide-raw for example: #/usr/libexec/qemu-kvm ......-drive file=/dev/vgtest-qzhang/lv-ide-raw,if=none,id=drive-ide0-0-1,werror=stop,rerror=stop,cache=none,format=raw -device ide-drive,drive=drive-ide0-0-1,id=ide0-0-1,bus=ide.1,unit=0 3. After boot the 2k8 guest, checked in the device manager. There's a system disk and a 1G data disk. 4. (qemu)info block drive-ide0-0-0: removable=0 file=/dev/vgtest-qzhang/lvtest-2k8r2 ro=0 drv=qcow2 encrypted=0 drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=/opt/virtio-win-1.4.0.vfd ro=1 drv=raw encrypted=0 drive-ide0-0-1: removable=0 file=/dev/vgtest-qzhang/lv-ide-raw ro=0 drv=raw encrypted=0 5. Enlarge the lv-ide-raw disk: On host: #lvextend -L +1G /dev/vgtest-qzhang/lv-ide-raw Extending logical volume lv-ide-raw to 2.00 GiB Logical volume lv-ide-raw successfully resized (qemu)block_resize drive-ide0-0-1 2G An undefined error has ocurred 6. Test ide-qcow2, virtio-raw, virtio-qcow2 separately. Results: (1)ide.raw (iscsi): enlarge/shrink: An undefined error has occurred ide.raw(retest with a local file): enlarge/decrease: Need to shutdown guest then boot again, the disk changes to the new size. (2)ide.qcow2(iscsi): enlarge: Need to shutdown guest and boot again, then the disk changes to the new size. shrink: An undefined error has occurred (It is expected, qcow2 don't support shrink) (3)virtio.raw: iscsi: Enlarge/shrink: An undefined error has occurred local file: Can enlarge/shrink successfully and no need to reboot guest. (4)virtio.qcow2: Enlarge: Succeed and no need reboot. Shrink: An undefined error has occurred. (It is expected, qcow2 don't support shrink) Actual results: Raw format image on iscsi disk failed to resize with "block_resize" command. Expected results: Resize raw format image on iscsi disk should work. Additional info: