Closed powerfooI closed 2 months ago
Are you able to run the program for non-gluster file? The flag "FALLOC_FL_ZERO_RANGE" does not support by all the file system, If filesystem does not support it it gives an error. If you will try to run the program without using flag it should work fine.
Yes, the program could work on non-glusterfs file. It wrote to /tmp/testfile which was not on gluster successfully.
Are you able to run a program without using the flag (FALLOC_FL_ZERO_RANGE) for glusterfs?
Yes, fallocate could work without FALLOC_FL_ZERO _RANGE flag. It seems that this flag is not supported well.
It seems the flag was implemented in fuse(2.31) so you would be able to use only the flag after the version(2.31). https://lore.kernel.org/all/20210615103357.GP26415@redhat.com/T/
Thank you so much! This information helps a lot. I could not find fuse
code in version 2.31, while actually found the support for FALLOC_FL_ZERO_RANGE
flag appears only after linux kernel v5.14 and the support was not patched backwards any older version kernel.
My kernel is of version 3.10 which is too old.
Thanks for confirming the same.
Description of problem:
One of our application runs in kubernetes, mounting a glusterfs volume which was set up with glustefs-kubernetes. The application uses syscall fallocate with flag
FALLOC_FL_ZERO_RANGE
to set zero a file storage, but the application failed here.The exact command to reproduce the issue: We wrote a simple test file
try_zero_range.cpp
as follows,Then we compile and execute the program,
The full output of the command that failed:
Expected results:
- The operating system / glusterfs version:
uname -a
: Linux node2 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxos version
: CentOS Linux release 7.9.2009 (Core)glusterfs version
: 7.1Note: Please hide any confidential data which you don't want to share in public like IP address, file name, hostname or any other configuration