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 852348 - fail to block_resize local data disk with IDE/AHCI disk_interface
Summary: fail to block_resize local data disk with IDE/AHCI disk_interface
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: John Snow
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 918831 (view as bug list)
Depends On: 852257
Blocks: 918831
TreeView+ depends on / blocked
 
Reported: 2012-08-28 09:02 UTC by Paolo Bonzini
Modified: 2015-03-05 09:41 UTC (History)
15 users (show)

Fixed In Version: qemu-kvm-rhev-2.1.2-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 852257
: 918831 (view as bug list)
Environment:
Last Closed: 2015-03-05 09:41:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0624 0 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2015-03-05 14:37:36 UTC

Comment 1 Sibiao Luo 2013-03-08 10:12:16 UTC
after this bug fixed, QE need to verify both the IDE and AHCI, both bug 918831 and bug 852348.

Comment 2 Ademar Reis 2013-11-05 19:37:03 UTC
*** Bug 918831 has been marked as a duplicate of this bug. ***

Comment 4 John Snow 2014-08-01 19:37:21 UTC
I've patched this as far as the size will be updated on a soft reboot, but currently despite the rescan command (and observing that new, updated IDENTIFY information was resent to the guest OS) fdisk -l does not recognize the new updated size.

#1 - echo 1 > /sys/block/sda/device/rescan does not trigger a new IDENTIFY packet to be requested.
#2 - partprobe, however, does.
#3 - after running both, in either order, Linux refuses to observe a change in size until a soft reboot.

Guest is Linux 3.11.10-301.fc20.x86_64

I can actually get fdisk to see the new values if I do this:
# echo "- - -" > /sys/class/scsi_host/host5/scan
but that has the unsavory effect of re-materializing the drive as /dev/sdb instead of /dev/sda, which gums up the works pretty badly.

Comment 5 John Snow 2014-08-19 18:06:45 UTC
fix is posted upstream, will backport pending review.

Comment 6 Miroslav Rezanina 2014-09-18 15:31:29 UTC
Fix included in qemu-kvm-1.5.3-71.el7

Comment 7 Miroslav Rezanina 2014-09-24 13:27:45 UTC
Revert to post as patch built in incorrect package.

Comment 10 Miroslav Rezanina 2014-10-10 07:34:04 UTC
Fix included in qemu-kvm-rhev-2.1.2-2.el7

Comment 12 mazhang 2014-10-28 07:10:41 UTC
Reproduce this bug on qemu-kvm-rhev-2.1.0-1.el7.

Result:
After block resize, then rescan scsi host/reboot guest the size of ide disk didn't change.


Test this bug on qemu-kvm-rhev-2.1.2-5.el7.x86_64.

Host:
qemu-kvm-rhev-2.1.2-5.el7.x86_64
qemu-img-rhev-2.1.2-5.el7.x86_64
qemu-kvm-common-rhev-2.1.2-5.el7.x86_64
qemu-kvm-rhev-debuginfo-2.1.2-5.el7.x86_64
qemu-kvm-tools-rhev-2.1.2-5.el7.x86_64
kernel-3.10.0-191.el7.x86_64

Guest:
kernel-3.10.0-189.el7.x86_64

Result:
1. Boot vm with ide disk.
...
-drive file=/home/storage0.raw,format=raw,if=none,id=ide-disk,cache=none,werror=stop,rerror=stop,aio=native \
-device ide-drive,bus=ide.0,unit=0,drive=ide-disk,id=ide_data \

2. block_resize.
(qemu) block_resize ide-disk 20G

3. Check the size of disk image.
[root@dhcp-11-16 home]# qemu-img info storage0.raw 
image: storage0.raw
file format: raw
virtual size: 20G (21474836480 bytes)
disk size: 454M

4. Rescan scsi host inside guest.
# echo "- - -" > /sys/class/scsi_host/host0/scan

5. Check the size in guest by "fdisk -l"
...
Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Also tested qcow2 format.
For raw format, both shrink and enlarge works well.
For qcow2 format, enlarge works well.

Comment 13 mazhang 2014-10-28 07:23:54 UTC
Also test ahci interface on qemu-kvm-rhev-2.1.2-5.el7.x86_64.

Command line:
/usr/libexec/qemu-kvm \
-M q35 \
-cpu SandyBridge \
-m 2G \
-smp 4,maxcpus=160,cores=2,threads=1,sockets=2 \
-enable-kvm \
-name rhel7 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-rtc base=localtime,clock=host,driftfix=slew \
-nodefaults \
-monitor stdio \
-qmp tcp:0:5555,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-monitor unix:/tmp/monitor2,server,nowait \
-vga qxl \
-spice port=5900,disable-ticketing \
-usb \
-device usb-tablet,id=tablet0 \
-drive file=gluster://10.66.106.25/gv0/rhel7-64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,scsi=off,bus=pcie.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-drive file=/home/storage0.qcow2,format=qcow2,if=none,id=ide-disk,cache=none,werror=stop,rerror=stop,aio=native \
-device ide-drive,bus=ide.0,unit=0,drive=ide-disk,id=ide_data \

For raw format, both shrink and enlarge works well.
For qcow2 format, enlarge works well.

Comment 14 mazhang 2014-10-28 07:27:37 UTC
Base on comment#12 and comment#13, this bug has been fixed.

Comment 17 errata-xmlrpc 2015-03-05 09:41:47 UTC
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://rhn.redhat.com/errata/RHSA-2015-0624.html


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