- NFSv4
- Have
all_squash
in/etc/exports
, like so:
/opt/vmlocks 10.0.1.38(rw,sync,all_squash) 10.0.1.244(rw,sync,all_squash)
- Mount
/opt/vmlocks
under/mnt
(lock
option should be there by default) - Copy
t.sh
contents (see below) - Copy
runner.sh
contents (see below) - Run test sequence in different machines:
echo {1..50} | xargs -n 1 -P 2 flock -o /mnt/a ./t.sh
- Keep it running for some time
- There is a certain delay before a remote senses file unlocking by another machine