Getting "Binary file matches" issue using grep command on vxfs filesystem
Environment
- Red Hat Enterprise Linux (RHEL) 7.3
- VRTSvxfs-7.3.0.103-RHEL7
Issue
We are facing an issue where we are getting error message "Binary file matches" issue for few seconds while trying to grep
a string in a text file.
We are facing this issue on the server where the OS version is RHEL
7.3:
[root@server1 dir]# grep -hn "string" filename
Binary file filename matches
while on RHEL 7.2 node it works fine:
[root@server2 tmp]# grep -hn "string" filename
85: string
Resolution
Veritas
provides an update
https://sort.veritas.com/patch/detail/13738
fixing issue
- 3938258 (3938256) When checking file size through seek_hole, it will return incorrect offset/size when delayed allocation is enabled on the file.
Please consult Veritas
support for VRTSvxfs
packages update.
Root Cause
There is a known vxfs
issue present in VRTSvxfs-7.3.0.103-RHEL7
- call vx_seek_hole_data()
does not return offset/size correctly.
There is a visible difference in the grep
straces:
Working:
lseek(3</tmp/filename>, 32768, SEEK_HOLE) = 42697 <0.000010> <------- 42697
lseek(3</tmp/filename>, 32768, SEEK_SET) = 32768 <0.000009>
Non working:
lseek(3</mnt/vxfs/dir/filename>, 32768, SEEK_HOLE) = 32768 <0.000011> <------- 32768
lseek(3</mnt/vxfs/dir/filename>, 32768, SEEK_SET) = 32768 <0.000006>
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments