Bug 1743360
| Summary: | qemu, qemu-img fail to detect alignment with XFS and Glsuter/XFS on 4k block device | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Nir Soffer <nsoffer> | ||||
| Component: | qemu-kvm | Assignee: | Hanna Czenczek <hreitz> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | CongLi <coli> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | --- | CC: | aliang, areis, coli, jinzhao, juzhang, mtessun, rbalakri, timao, virt-maint, vjuranek, xuwei | ||||
| Target Milestone: | rc | Flags: | knoel:
mirror+
|
||||
| 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: | 2019-09-05 02:08:30 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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1744207 | ||||||
| Attachments: |
|
||||||
|
Description
Nir Soffer
2019-08-19 17:53:44 UTC
See also bug 1743365 for RHEL 7.8. I can reproduce this bug in scenarios of installation and convert.
Tested with:
qemu-kvm-4.1.0-4.module+el8.1.0+4020+16089f93
kernel-4.18.0-134.el8
Scenario 1(Installation)
1. Create a raw image on the xfs with 4k sectors
# qemu-img create -f raw base.img 20G
2. Install guest on it
# /usr/libexec/qemu-kvm \
-name 'guest-rhel8.0' \
-machine q35 \
-nodefaults \
-vga qxl \
-drive id=drive_cd1,if=none,snapshot=off,aio=threads,cache=unsafe,media=cdrom,file=/mnt/hucheng/RHEL8.0.0-BaseOS-x86_64.iso \
-device ide-cd,id=cd1,drive=drive_cd1,bus=ide.0,unit=0 \
-drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=raw,file=base.img \
-device virtio-blk-pci,id=virtio_blk_pci0,drive=drive_image1,bus=pcie.0,addr=05,bootindex=0 \
-vnc :0 \
-monitor stdio \
-m 8192 \
-smp 8 \
-device virtio-net-pci,mac=9a:b5:b6:b1:b2:b3,id=idMmq1jH,vectors=4,netdev=idxgXAlm,bus=pcie.0,addr=0x9 \
-netdev tap,id=idxgXAlm \
-chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/hucheng/monitor-qmpmonitor1-20180220-094308-h9I6hRsI,server,nowait \
-mon chardev=qmp_id_qmpmonitor1,mode=control \
Result:
When the process in 'create xfs', install will hit error. And there is I/O error in QMP. The PrtSc is attached.
{"timestamp": {"seconds": 1566385831, "microseconds": 937572}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive_image1", "nospace": false, "node-name": "#block398", "reason": "Invalid argument", "operation": "read", "action": "report"}}
{"timestamp": {"seconds": 1566385831, "microseconds": 938011}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive_image1", "nospace": false, "node-name": "#block398", "reason": "Invalid argument", "operation": "write", "action": "report"}}
Scenario 2(Convert)
1. Create a test image on the xfs with 4k sectors
# dd if=/dev/urandom of=test.img bs=1M count=2048
2. Convert the image to the xfs with 512 bytes sectors
# qemu-img convert -f raw -O raw test.img /home/tgt.img -t none -T none -p
(100.00/100%)
3. Convert back to xfs with 4k sectors
# qemu-img convert -f raw -O raw /home/tgt.img tgt.img -t none -T none -p
qemu-img: error while writing sector 4190208: Invalid argument
Additional info:
1. Disk info.
# fdisk -l
Disk /dev/sda: 372 GiB, 399431958528 bytes, 780140544 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xb768558d
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 780140543 778041344 371G 8e Linux LVM
Disk /dev/sdb: 558.4 GiB, 599550590976 bytes, 1170997248 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
Disklabel type: gpt
Disk identifier: 44B4C16F-E8F3-4AB0-9ED8-EB99E1452090
Device Start End Sectors Size Type
/dev/sdb1 34 19531250 19531217 9.3G Microsoft basic data
Disk /dev/sdc: 558.4 GiB, 599550590976 bytes, 146374656 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa2466bb0
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 256 262399 262144 1G 83 Linux
/dev/sdc2 262400 146374655 146112256 557.4G 8e Linux LVM
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 372G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 371G 0 part
├─rhel_dell--per740xd--01-root 253:0 0 50G 0 lvm /
├─rhel_dell--per740xd--01-swap 253:1 0 31.4G 0 lvm [SWAP]
└─rhel_dell--per740xd--01-home 253:5 0 289.6G 0 lvm /home
sdb 8:16 0 558.4G 0 disk
└─sdb1 8:17 0 9.3G 0 part
sdc 8:32 0 558.4G 0 disk
├─sdc1 8:33 0 1G 0 part
└─sdc2 8:34 0 557.4G 0 part
├─rhel_dell--per740xd--0101-swap 253:2 0 31.4G 0 lvm
├─rhel_dell--per740xd--0101-home 253:3 0 476G 0 lvm /mnt
└─rhel_dell--per740xd--0101-root 253:4 0 50G 0 lvm
2. Mount info
# mount | grep mnt
/dev/mapper/rhel_dell--per740xd--0101-home on /mnt type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
3. The director I operated.
# pwd
/mnt/test
Created attachment 1606458 [details]
PrtSc for install error
*** This bug has been marked as a duplicate of bug 1749134 *** |