3.7.0 HP StorageWorks HP Scalable NAS File Serving Software administration guide - HP Scalable NAS 3.7 for Linux (AG513-96002, October 2009)
Create a semaphore
To create a PSFS command-line semaphore, use this command:
$ psfssema -i <filename>
This command creates the PSFS command-line semaphore file <filename> and the
supplemental file <filename.pid> if either file does not already exist. It then
initializes the files to create the PSFS command-line semaphore. <filename> must
be a path on a PSFS filesystem.
Lock a semaphore
To lock a PSFS command-line semaphore, use this command:
$ psfssema -g <filename>
This command locks the PSFS command-line semaphore associated with <filename>,
which is the name of a semaphore file created by psfssema -i. If the semaphore
is already locked by another node in the cluster, the calling process blocks until the
semaphore becomes available.
An error is returned if <filename> does not exist or has not been initialized by
psfssema -i, or if <filename.pid> does not exist.
Unlock a semaphore
To unlock a PSFS command-line semaphore, use this command:
$ psfssema -r <filename>
The command unlocks the PSFS command-line semaphore associated with
<filename>, which is a semaphore file created by psfssema -i. If other nodes
are blocked on the semaphore when psfssema-r is called, one of the blocked
psfssema -g processes will return successfully.
Delete a semaphore
To delete a PSFS command-line semaphore, use this command:
$ psfssema -d <filename>
HP Scalable NAS File Serving Software administration guide 159