Bug 852257 - fail to block_resize local data disk with ide disk_interface
fail to block_resize local data disk with ide disk_interface
Status: CLOSED DEFERRED
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.4
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
:
Depends On:
Blocks: 852348 918831
  Show dependency treegraph
 
Reported: 2012-08-27 23:18 EDT by Sibiao Luo
Modified: 2013-03-06 21:49 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 852348 (view as bug list)
Environment:
Last Closed: 2013-01-11 12:37:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2012-08-27 23:18:50 EDT
Description of problem:
When enlarge a ide data disk with "block_resize" QEMU command, then reboot the guest, find this disk has no any size changes from guest, but use 'qemu-img info' checking the data disk has changed size in local host. Has discussed this with Paolo that ide fails to update some of the information passing to the guest, so create a bug to track this issue.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-303.el6.x86_64
qemu-kvm-0.12.1.2-2.307.el6.x86_64
guest info:
# uname -r
2.6.32-300.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.creat a data disk in local host.
# qemu-img create -f raw my-data-disk.raw 5G
Formatting 'my-data-disk.raw', fmt=raw size=5368709120
2.boot a guest attached the data disk with ide interface.
# <qemu-kvm-command-line>...-drive file=/home/my-data-disk.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
3.block_resize the data disk.
(qemu) info block
drive-disk: removable=0 io-status=ok file=/home/RHEL-Server-6.3-64-sluo.qcow2 ro=0 drv=qcow2 encrypted=0
ide-disk: removable=0 io-status=ok file=/home/my-data-disk.raw ro=0 drv=raw encrypted=0
...    
(qemu) block_resize ide-disk 10G
4.reboot the guest to check the disk size changes.
# fdisk -l

Actual results:
after the step 4, there is no any size changes of the data disk, but use 'qemu-img info' checking the data disk has changed size in local host.
# fdisk -l
Disk /dev/sda: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
...

# qemu-img info my-data-disk.raw 
image: my-data-disk.raw
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 0

Expected results:
online resize with block_resize successfully.
Paolo said that if this qemu-kvm bug is fixed, use "echo > rescan" should work, the guest can discover automatically.

Additional info:
1.if shutdown guest and then boot it again, the data disk changes to the new size, but that's not the meaning of online resizing.
2.I have tried '# echo 1 > /sys/block/sda/device/rescan', but have no any effectively now.
3.aslo have tried the scsi and virtio interface.
local file + virtio-scsi-pci + block_resize + 'echo 1 > /sys/block/sda/device/rescan' ---> 100% automatically discover for the guest, no need to reboot the guest.
local file + virtio-blk-pci + block_resize ---> 100% automatically discover for the guest, no need to reboot the guest.
Comment 2 Paolo Bonzini 2012-08-28 05:01:52 EDT
This happens because the IDENTIFY data is not updated after a resize.

Moving to 6.5 and cloning to RHEL7.
Comment 3 Paolo Bonzini 2013-01-11 12:37:19 EST
Low priority, deferring to RHEL7.

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