Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: This is similar to bug 1976730 but observed while uploading the image using virtctl and fs overhead is not involved. An image with a size of 32214352384 bytes was uploaded using virtctl. ~~~ # qemu-img info disk.qcow2 image: disk.qcow2 file format: qcow2 virtual size: 30G (32214352384 bytes) disk size: 22G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false # virtctl image-upload dv dv1 --size=50Gi --image-path=disk.qcow2 ~~~ The storage used was "Azure files" and block size is 1 MB. And it is not aligned (32214352384/1048576 = 30722.0004883). So converting to raw failed with the error below. ~~~ E0831 13:24:56.377963 1 prlimit.go:176] qemu-img: Could not open '/data/disk.img': Cannot get 'write' permission without 'resize': Image size is not a multiple of request alignment E0831 13:24:56.389158 1 data-processor.go:229] exit status 1 qemu-img execution failed ~~~ We were able to upload the image after resizing the image to 32225886208. ~~~ # qemu-img resize -f qcow2 disk.qcow2 32225886208 ~~~ Version-Release number of selected component (if applicable): Openshift Virtualization 2.6. How reproducible: 100% Steps to Reproduce: Use virtctl to upload an image which is not aligned with the storage blocks. Actual results: Uploading images fails with error "Cannot get 'write' permission without 'resize': Image size is not a multiple of request alignment" Expected results: We may need to resize the disk automatically to align it with block size like we are aligning to 1 MB here https://github.com/kubevirt/containerized-data-importer/pull/1873/commits/c9029e4fd79920066677387203d1f6eb322d7bd2 Additional info: Also, I can see that cache is changed to writeback as per https://github.com/kubevirt/containerized-data-importer/pull/1919. I think alignment is only checked with cache=none. So we may already have the fix(?). Also, there is a related qemu patch https://www.mail-archive.com/qemu-block@nongnu.org/msg88017.html
Alexander, it seems we may need that block size detection code after all.
I don't know if I want to revive it, it doesn't work on NFS for instance, it only worked for local storage.
Ok, which block size should we align to in order to satisfy all users?
Looking at the bug description, this is similar but not the same as the alignment bug we fixed. It seems to fail on the initial conversion and not the resize part (which is the part we fixed). Without seeing the entire log I am unsure if it failed on the conversion or resize step.
So looking at the bug description again, I think I am going to agree with the submitter that we already mitigated the problem when switching cache mode. The problem occurred in the conversion step from the scratch space to the target volume. That is now no longer using direct io, so we should be good. I am going to move this to on qe so it can be retested.
@nashok Hi, can you give us any additional information regarding the setup of the storage class on 'Azure files'. How did they configure the "Azure files" to 1MB block size Also the output of: oc get sc oc get sc <azure-storage> -oyaml
we believe we have fixed this issue, but we are unable to verify since we don't have an env where we can reproduce