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@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
[root@specscale01 IBM_REPO]#

Ystävällisin terveisin / Kind regards / Saludos cordiales / Salutations
Luis Bolinches
Consultant IT Specialist
Mobile Phone: +358503112585

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

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


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,

gpfsug-discuss mailing list
gpfsug-discuss at spectrumscale.org

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
gpfsug-discuss mailing list
gpfsug-discuss at spectrumscale.org

Reply via email to