z/VSE lock file placement
Ingolf24 120000DRN3 Visits (389)
About 5 years ago I had a blog post bout this subject. Just yesterday our Level 2 service team got questions about the placement of the lock file. Therefore I repost the old blog entry with additional information.
If you are running multiple z/VSE system, you may share data between those systems. z/VSE provides DASD sharing through a lock file for that purpose, which is provided by the lock manager in the Supervisor.
A few words about DASD sharing: In an application you may lock a resource - defined by the DTL (Define the Lock) macro - e.g. to be locked for exclusive use. That is you may synchronize access to a specific code path or access to data on a disk. You may lock resources locally within one z/VSE system, or you may lock a resource across z/VSE systems in z/VM guests, LPARs or CECs. If you share across z/VSE systems, you have to define a lock file during IPL via the DLF command. Disks you want to share need to have the SHR parameter on the IPL ADD statement.
Recommendation: Do not allocate the lock file on the system disks DOSRES or SYSWK1. For a SCSI disk such a DLF command would be rejected. I would allocate it on a small disk with just the lock file on it, but that is your choice. All systems that want to participate in sharing need to have access to that lock file and a corresponding IPL DLF statement. If an application locks a resource, the CPU id of that system, the resource name and the lock option (e.g. exclusive lock) are written to the lock file. That is you have to ensure, that CPU ids are unique for all z/VSE systems that access the lock file. I/O to the lock file is controlled by the reserve / release channel commands (exclusive access to the lock file - and to the corresponding disk).
If you are running your z/VSE systems in z/VM guests of the same z/VM, you may define the lock file on a minidisks with multiple write (MWV). In that case you may also allocate the lock file on a z/VM virtual disk.
However, if you want to share resources with z/VM guests on different z/VM systems, LPARs or CECs, a z/VM guest need to use the lock file as dedicated disk.
More information on DASD sharing is in the z/VSE Guide to System Function, which can be downloaded from the z/VSE documentation web page - here, see section "DASD Sharing with Multiple VSE Systems".