Bug 1345830
Summary: | [RHEL.7.3] [thin-provisioning] guest got io-error when I dd a file in it | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Yang Meng <meyang> |
Component: | qemu-kvm-rhev | Assignee: | Fam Zheng <famz> |
Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.3 | CC: | chayang, huding, juzhang, knoel, meyang, ngu, pbonzini, shuang, virt-maint, xutian |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-06-22 11:36:34 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Yang Meng
2016-06-13 09:32:44 UTC
polarion cases steps: 1.Boot guest with **/dev/sdc** (generaled as **setup**) with virtio serial and start guest agent inside guest. Refer to case: <https://tcms.engineering.redhat.com/case/135941/>. e.g:...-drive file=/dev/sdc,if=none,id=drive-data-disk,format=**raw**,cache=no ne,aio=native,werror=stop,rerror=stop****,**discard=on **-device virtio-scsi- pci,id=scsi1,bus=pci.0,addr=0x8-device **scsi-block**,drive=drive-data- disk,bus=scsi1.0,id=data-disk \ -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 1.after step 1, boot guest successfully. 2.Make file system to the disk in the guest. # mkfs.ext4 /dev/sdb 2.after step 3, # cat /sys/bus/pseudo/drivers/scsi_debug/map 1-616,16257-16383 3. On the host # cat /sys/bus/pseudo/drivers/scsi_debug/map 3.after step 5, # cat /sys/bus/pseudo/drivers/scsi_debug/map 1-616,645-1588,1599-4026,4029-16383 4.On the guest # mount /dev/sdb /home/test # dd if=/dev/zero of=/home/test/file 4.after step 7, {"execute":"guest-fstrim"} {"return": {}} 5.cat map in host. # cat /sys/bus/pseudo/drivers/scsi_debug/map 5.after step 8, # cat /sys/bus/pseudo/drivers/scsi_debug/map **1-612** 6.in guest. # rm /home/test/file 7.connect the chardev socket in host side and send "guest-fstrim" command in the host side: # nc -U /tmp/qga.sock {"execute":"guest-fstrim"} 8.cat map in host. # cat /sys/bus/pseudo/drivers/scsi_debug/map i followed the case steps to find this problem ,if it is wrong ,please help to correct me ,thanks. Your command line has two "-drive": -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=/home/RHEL-Server-7.3-64-virtio-scsi.qcow2 \ ... -drive file=/home/100M.qcow2,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop,discard=on \ both of which are qcow2 images under /home, how is it related to scsi_debug and thin-provisioning? Also please make check that your host filesystem is not 100% full, because if so, the stop is expected (werror=stop). (In reply to Fam Zheng from comment #3) > Your command line has two "-drive": > > -drive > id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2, > file=/home/RHEL-Server-7.3-64-virtio-scsi.qcow2 \ > ... > -drive > file=/home/100M.qcow2,if=none,id=drive-data-disk,format=raw,cache=none, > aio=native,werror=stop,rerror=stop,discard=on \ > > both of which are qcow2 images under /home, how is it related to scsi_debug > and thin-provisioning? sorry ,i paste the wrong commandline, modified it to: modify the qemu commandline to: MALLOC_PERTURB_=1 /usr/libexec/qemu-kvm \ -name 'avocado-vt-vm1' \ -sandbox off \ -machine pc \ -nodefaults \ -vga cirrus \ -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/monitor-qmpmonitor1,server,nowait \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/omonitor-catch_monitor-20160613-034403-23Mgrt5K,server,nowait \ -mon chardev=qmp_id_catch_monitor,mode=control \ -device pvpanic,ioport=0x505,id=id7sDMld \ -device ich9-usb-ehci1,id=usb1,addr=1d.7,multifunction=on,bus=pci.0 \ -device ich9-usb-uhci1,id=usb1.0,multifunction=on,masterbus=usb1.0,addr=1d.0,firstport=0,bus=pci.0 \ -device ich9-usb-uhci2,id=usb1.1,multifunction=on,masterbus=usb1.0,addr=1d.2,firstport=2,bus=pci.0 \ -device ich9-usb-uhci3,id=usb1.2,multifunction=on,masterbus=usb1.0,addr=1d.4,firstport=4,bus=pci.0 \ -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=03,disable-legacy=off,disable-modern=on \ -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=/home/RHEL-Server-7.3-64-virtio-scsi.qcow2 \ -device scsi-hd,id=image1,drive=drive_image1 \ -device virtio-net-pci,mac=9a:e8:e9:ea:eb:ec,id=idPUX3Se,vectors=4,netdev=id70bfyc,bus=pci.0,addr=04,disable-legacy=off,disable-modern=on \ -netdev tap,id=id70bfyc,vhost=on \ -m 8192 \ -smp 8,maxcpus=8,cores=4,threads=1,sockets=2 \ -cpu 'Opteron_G3',+kvm_pv_unhalt \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -vnc :0 \ -rtc base=utc,clock=host,driftfix=slew \ -boot order=cdn,once=c,menu=off,strict=off \ -enable-kvm \ -monitor stdio \ -drive file=/dev/sdb,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=enospc,rerror=report,discard=on \ -device virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x8 \ -device scsi-block,drive=drive-data-disk,bus=scsi1.0,id=data-disk \ -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \ -device virtio-serial \ -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \ (In reply to Fam Zheng from comment #4) > Also please make check that your host filesystem is not 100% full, because > if so, the stop is expected (werror=stop). when i issue dd command ,the guest hangs ,can you provide a way to check the filesystem ,thanks. and do you mean if i use werror=stop,rerror=stop ,it will hang and the hmp monitor should show io-error when i issue "info status" i think it should show like the following and the guest should not hang. [root@bootp-73-199-1 home]# mount /dev/sdb /home/test [root@bootp-73-199-1 home]# dd if=/dev/zero of=/home/test/file dd: writing to ‘/home/test/file’: No space left on device 976777+0 records in 976776+0 records out 500109312 bytes (500 MB) copied, 6.79864 s, 73.6 MB/s BTW: if use werror=enospc,rerror=report , guset will not hang and just give warnings "No space left on device" if i was wrong, please help correct ,thanks. (In reply to Yang Meng from comment #6) > and do you mean if i use werror=stop,rerror=stop ,it will hang and the hmp > monitor should show io-error when i issue "info status" Yes, "stop" is expected, because your host filesystem is full, and it is an io-error which will be captured by werror=. And you werror= is 'stop'. (In reply to Fam Zheng from comment #7) > (In reply to Yang Meng from comment #6) > > and do you mean if i use werror=stop,rerror=stop ,it will hang and the hmp > > monitor should show io-error when i issue "info status" > > Yes, "stop" is expected, because your host filesystem is full, and it is an > io-error which will be captured by werror=. And you werror= is 'stop'. thanks for your explanation. BTW, i tried with image file like: -drive file=/home/1G.raw,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop \ -device virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x8 \ -device scsi-hd,drive=drive-data-disk,bus=scsi1.0,id=data-disk \ why it didn't cause io-error in hmp monitor and just got "dd: writing to ‘/home/test/file’: No space left on device",could you help to explain the difference,thanks This is because in this case, stop only happens when the _host_ disk is full. |