Bug 1021544 - fail to do block_resize for passthrough iSCSI LUN via scsi-block interface
Summary: fail to do block_resize for passthrough iSCSI LUN via scsi-block interface
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1021540
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-21 13:30 UTC by Sibiao Luo
Modified: 2013-10-24 23:08 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1021540
Environment:
Last Closed: 2013-10-24 23:08:15 UTC
Target Upstream Version:


Attachments (Terms of Use)

Comment 1 Sibiao Luo 2013-10-21 13:34:20 UTC
host info:
# uname -r && rpm -q qemu-kvm
3.10.0-34.el7.x86_64
qemu-kvm-1.5.3-9.el7.x86_64

iSCSI LUN:
# fdisk /dev/sdb

Disk /dev/sdb: 32.2 GB, 32212254720 bytes, 62914560 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
Disk label type: dos
Disk identifier: 0xc09bd2e5

e.g:...-drive file=/dev/sdb,if=none,id=drive-data-disk,format=raw,aio=native -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi0 -device scsi-block,drive=drive-data-disk,id=data-disk,bus=scsi0.0 -vnc :1 -monitor stdio
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) info block
drive-data-disk: removable=0 io-status=ok file=/dev/sdb ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu) block_resize drive-data-disk 10G
(qemu) block_resize drive-data-disk 20G
(qemu) block_resize drive-data-disk 30G
(qemu) block_resize drive-data-disk 40G
Could not resize: Invalid argument

But checked that there was no any info about disk changes in guest.

Best Regards,
sluo

Comment 3 Paolo Bonzini 2013-10-24 23:08:15 UTC
This is expected behavior.  Because the capacity is retrieved directly from the disk, block_resize cannot change it (there is no "resize" SCSI command to send to the disk).  "Do not shrink" is safe but "do not enlarge" is unsafe, so QEMU is simply checking that you are not asking for more space than allowed.


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