pastebin - collaborative debugging tool
rovema.kpaste.net RSS


NFSv4 shared file mutual exclusion
Posted by Anonymous on Wed 28th Jun 2023 12:32
raw | new post
view followups (newest first): nfsv4_num_locking_fun1.sh by Anonymous

  1. # Mutual exclusion of multiple writers working on a file shared via NFSv4
  2. # init with $ printf '0\n' >'foo'
  3. bash -c 'for ((i=0 ; i < 100 ; i++ )) ; do while ! mkdir mylock ; do sleep 5 ; done ; typeset -i x ; x=$( tail -n 1 foo ) ; sleep 3 ; (( x++ )) ; echo "$x" >>foo ; rmdir mylock ; echo "WRITE $x" ; sleep 7 ; done'

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at