HowTo: Verify the mounted filesystem supports file locking

Howto verify a filesystem supports file locking

On the Linux client mounting the share:

cd /SHARE/TO/TEST
touch testfile
flock ./testfile true && echo ok || echo nok

If the filesystem supports locks you will get an “ok” as result, otherwise:
flock: ./test: No locks available

Mastodon