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 1314635 - The value of "offset" reduced when mirroring which the source have no enough space
Summary: The value of "offset" reduced when mirroring which the source have no enough ...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.8
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: John Snow
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1314682
TreeView+ depends on / blocked
 
Reported: 2016-03-04 06:34 UTC by jingzhao
Modified: 2017-01-17 17:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1314682 (view as bug list)
Environment:
Last Closed: 2017-01-17 17:19:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description jingzhao 2016-03-04 06:34:14 UTC
Description of problem:
Hit two issues mirroring when the source have no enough space
1. The value of "offset" reduced untill the I/O error occurred
2. The base file didn't change when mirror completed 


Version-Release number of selected component (if applicable):
kernel-2.6.32-620.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.489.el6.x86_64

How reproducible:
1. The value of "offset" reduced untill the I/O error occurred (3/6)
2. The base file didn't change when mirror complete  (2/6)

Steps to Reproduce:

Pre: 
1.The path which contain the image is limited, such as 12G
2.The image 10G

1. Boot vm with following cli:
/usr/libexec/qemu-kvm \
-name rhel6.6.0 \
-machine rhel6.6.0,accel=kvm \
-realtime mlock=off \
-cpu SandyBridge \
-m 4G   \
-smp 4,cores=1,threads=1,sockets=4  \
-uuid 49a3438a-70a3-4ba8-92ce-3a05e0934608 \
-nodefaults \
-rtc base=utc,driftfix=slew \
-monitor unix:/tmp/monitor-unix,server,nowait \
-serial unix:/tmp/serial0,server,nowait \
-global kvm-pit.lost_tick_policy=discard \
-global PIIX4_PM.disable_s3=1 \
-global PIIX4_PM.disable_s4=1 \
-boot order=c,menu=on,strict=on \
-device virtio-scsi-pci,id=scsi \
-drive file=/mnt/rhel68bk.qcow2,if=none,format=qcow2,id=drive-virtio-scsi,werror=stop,rerror=stop \
-device scsi-hd,drive=drive-virtio-scsi,id=virtio-scsi,bus=scsi.0,scsi-id=0 \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,vectors=0,mac=00:1a:4a:42:0a:00 \
-monitor stdio \
-qmp tcp:0:4466,server,nowait -serial unix:/tmp/ttym,server,nowait \
-vga qxl \
-spice port=5910,password=redhat-vga,disable-ticketing \
-k en-us \


2. In guest, dd a large file, make sure large file+ image file > the path space
such as "dd if=/dev/urandom of=/home/test.raw bs=3G"

3. Im qmp, mirror the base to a path which have enough space

{ "execute" : "__com.redhat_drive-mirror", "arguments" : { "device" : "drive-virtio-scsi","target" : "/home/0223/target/sn1", "format": "qcow2"} }

4. query the mirror job in qmp
{ "execute" : "query-block-jobs", "arguments" : {} }

5. In qmp:
{ "execute": "__com.redhat_drive-reopen", "arguments": {"device": "drive-virtio-scsi", "new-image-file": "/home/0223/target/sn1" } }
and check the disk in hmp "info block"

Actual results:
1. After step4, theγ€€"offset" value reduced until the I/O error occurred and the "offset" value increased after the I/O error occurred.

{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 13071941632, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 13071941632, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 13071941632, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 12816023552, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 12801015808, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 12801015808, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 12774146048, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 12774146048, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 12660047872, "speed": 0, "type": "mirror"}]}
{"timestamp": {"seconds": 1457072345, "microseconds": 365927}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-virtio-scsi", "__com.redhat_debug_info": {"message": "No space left on device", "errno": 28}, "__com.redhat_reason": "enospc", "operation": "write", "action": "stop"}}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 19245105152, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 19266928640, "speed": 0, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-scsi", "len": 21474836480, "offset": 20651966464, "speed": 0, "type": "mirror"}]}

2. After the "len" value equal to the "offset" value

{ "execute": "__com.redhat_drive-reopen", "arguments": {"device": "drive-virtio-scsi", "new-image-file": "/home/0223/target/sn1" } }
and check the disk in hmp "info block"
drive-virtio-scsi: removable=0 io-status=nospace file=/mnt/rhel68bk.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
(qemu) info bl
block       blockstats  block-jobs  
(qemu) info block-jobs 
No active jobs
(qemu) info block
drive-virtio-scsi: removable=0 io-status=nospace file=/mnt/rhel68bk.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
(qemu) c
(qemu) block I/O error in device 'drive-virtio-scsi': No space left on device (28)
block I/O error in device 'drive-virtio-scsi': No space left on device (28)
block I/O error in device 'drive-virtio-scsi': No space left on device (28)
block I/O error in device 'drive-virtio-scsi': No space left on device (28)



Expected results:
1. After step4, the "offset" value increased 
2. After step5. the disk file can change to the target file and No I/O error

Additional info:

Comment 2 Ademar Reis 2016-09-07 13:08:32 UTC
This is not being fixed in RHEL-7.3 and given it's also a low-prio BZ, it should not be fixed in RHEL-6.9. I'm reflagging it 6.10.

I'm also taking the liberty of removing it from the 6.9-qe-wishlist tracker.

Comment 3 Ademar Reis 2017-01-17 17:19:39 UTC
This is a corner case with low priority which we might fix upstream at some point, but I'm closing it in RHEL6.


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