Bug 1021544 - fail to do block_resize for passthrough iSCSI LUN via scsi-block interface
fail to do block_resize for passthrough iSCSI LUN via scsi-block interface
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
Depends On: 1021540
  Show dependency treegraph
Reported: 2013-10-21 09:30 EDT by Sibiao Luo
Modified: 2013-10-24 19:08 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1021540
Last Closed: 2013-10-24 19:08:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 1 Sibiao Luo 2013-10-21 09:34:20 EDT
host info:
# uname -r && rpm -q qemu-kvm

# 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,
Comment 3 Paolo Bonzini 2013-10-24 19:08:15 EDT
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.