3.1.2 Matrix Server Administration Guide
Chapter 7: Configure PSFS Filesystems 118
Copyright © 1999-2006 PolyServe, Inc. All rights reserved.
2. Populate the new directories with the appropriate files.
3. Create the CDSL:
ln -s /etc/{HOSTNAME} /oracle/etc
When you are logged in on serv1, the /oracle/etc symbolic link will point to
/etc/serv1.xvz.com. On serv2, it will point to /etc/serv2.xvz.com.
Matrix-Wide File Locking
Matrix Server supports matrix-wide locks on files located on PSFS
filesystems. The locks are implemented with the standard Linux flock()
system call, which is also known as the BSD flock interface.
The psfssema command-line semaphore utility provides a simple
synchronization mechanism for managing matrix-wide file locks. The
utility can be used in shell scripts on different nodes of a matrix and takes
advantage of the PSFS filesystem and its internode communication
abilities. For example, you might want to use matrix-wide file locking in a
Start or Stop script for a service or device monitor.
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 matrix, the
calling process blocks until the semaphore becomes available.