[gpfsug-discuss] Odd behavior with cat followed by grep.

Luis Bolinches luis.bolinches at fi.ibm.com
Wed Feb 14 06:49:42 GMT 2018


Hi

This seems to be setup specific

Care to explain a bit more of the setup. Number of nodes GPFS versions, 
number of FS, Networking, running from admin node, server / client, number 
of NSD, separated meta and data, etc?

I got interested and run a quick test on a gpfs far from powerful cluster 
of 3 nodes on KVM

[root at specscale01 IBM_REPO]# echo "a a a a a a a a a a" > test && grep 
ATAG test | wc -l && sleep 4 && grep ATAG test | wc -l
0
0
[root at specscale01 IBM_REPO]#


--
Ystävällisin terveisin / Kind regards / Saludos cordiales / Salutations
Luis Bolinches
Consultant IT Specialist
Mobile Phone: +358503112585
https://www.youracclaim.com/user/luis-bolinches

"If you always give you will always have" --  Anonymous



From:   John Hanks <griznog at gmail.com>
To:     gpfsug-discuss <gpfsug-discuss at spectrumscale.org>
Date:   14/02/2018 07:33
Subject:        [gpfsug-discuss] Odd behavior with cat followed by grep.
Sent by:        gpfsug-discuss-bounces at spectrumscale.org



Hi,

We have a GPFS filesystem mounted on CentOS 7.4 as type gpfs, pretty 
straightforward run of the mill stuff. But are seeing this odd behavior. 
If I do this in a shell script, given a file called "a"

cat a a a a a a a a a a > /path/to/gpfs/mount/test
grep ATAG /path/to/gpfs/mount/test | wc -l
sleep 4
grep ATAG /path/to/gpfs/mount/test | wc -l

The first grep | wc -l returns 1, because grep outputs  "Binary 
file /path/to/gpfs/mount/test matches"

The second grep | wc -l returns the correct count of ATAG in the file.

Why does it take 4 seconds (3 isn't enough) for that file to be properly 
recognized as a text file and/or why is it seen as a binary file in the 
first place since a is a plain text file?

Note that I have the same filesystem mounted via NFS and over an NFS mount 
it works as expected.

Any illumination is appreciated,

jbh_______________________________________________
gpfsug-discuss mailing list
gpfsug-discuss at spectrumscale.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=1mZ896psa5caYzBeaugTlc7TtRejJp3uvKYxas3S7Xc&m=ut35qIIMxjZMX3obFJ2xtUMng4MtGtKz4YHxpkgQbak&s=cNt66GjRD6rVhq7nGcvT76l-0_u2C3UTz9SfwzHf1xw&e=





Ellei edellä ole toisin mainittu: / Unless stated otherwise above:
Oy IBM Finland Ab
PL 265, 00101 Helsinki, Finland
Business ID, Y-tunnus: 0195876-3 
Registered in Finland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gpfsug.org/pipermail/gpfsug-discuss_gpfsug.org/attachments/20180214/22ba2096/attachment-0002.htm>


More information about the gpfsug-discuss mailing list