Release File System Locks (RLSIFSLCK)

The Release File System Locks (RLSIFSLCK) command can be used to:

This command should only be used to free resources that cannot be freed using normal means.

For more information about byte range locks, see the fcntl API in APIs topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/ or i5/OS Network File System Support book, SC41-5714

Restrictions:

Parameters

Keyword Description Choices Notes
RMTLOCNAME Remote location Character value Optional, Positional 1
OBJ Object Path name Optional, Positional 2
NFSSVRLCK NFS Server locks *NO, *YES Optional
LCLBRNGLCK Local byte-range locks *NO, *YES Optional
OBJMFS Object's file system *NO, *YES Optional

Remote location (RMTLOCNAME)

Specifies the host name or internet address of a remote system whose NFS-related locks on local files are to be released.

To be successful, the remote system name must be valid. The user can assign host names to an internet address with the Work with TCP/IP host table entries option on the Configure TCP/IP menu (CFGTCP) command. Also, a remote name server can be used to map remote system names to internet addresses. Use the Change remote name server option on the CFGTCP menu to specify a remote name server.

Host names must follow these conventions:

'remote-location-name'
Specifies the host name or internet address of a remote system whose NFS-related locks on local files are to be released.

Note: Either the RMTLOCNAME or Object (OBJ) parameter must be specified, but not both.

Object (OBJ)

Specifies the path name of an object or an object's file system whose locks are to be released. The NFS Server locks (NFSSVRLCK) and Local byte-range locks (LCLBRNGLCK) parameters specify which locks are to be released. The Object's file system (OBJMFS) parameter specifies if the OBJ parameter represents the actual object or the file system of the actual object.

'path-name'
Specifies the path name of the object representing whose locks are to be released.

Note: Either the Remote location (RMTLOCNAME) or OBJ parameter must be specified, but not both.

For more information on specifying path names, refer to "Object naming rules" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

Note: This parameter is Unicode-enabled. See "Unicode support in CL" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/ for additional information.

NFS Server locks (NFSSVRLCK)

Specifies whether all NFS version 4 locks and state for the specified object are to be released. If the RMTLOCNAM parameter is specified, this parameter will be ignored.

*YES
All NFS version 4 locks and state held by the NFS server will be released for the object.
*NO
NFS version 4 locks and state held by the NFS server will not be released.

Local byte-range locks (LCLBRNGLCK)

Specifies whether all local byte-range locks of the specified object are to be released. This will release all locks on that object, regardless of the type of lock or the type of process that is holding them. If the RMTLOCNAM parameter is specified, this parameter will be ignored.

Note: You can specify either the LCLBRNGLCK parameter or the Object's file system (OBJMFS) parameter, but not both.

*YES
All local byte-range locks on the specified object are to be released.
*NO
Local byte-range locks on the specified object are not to be released.

Object's file system (OBJMFS)

Specifies whether all NFS version 4 locks and state are to be released for the mounted file system that the specified object is within. If the RMTLOCNAM parameter is specified, this parameter will be ignored.

Note: You can specify either the OBJMFS parameter or the Local byte-range locks (LCLBRNGLCK) parameter, but not both.

*NO
NFS version 4 locks and state for the file system that the specified object is within are not to be released.
*YES
All NFS version 4 locks and state for the file system that the specified object is within are to be released.

Examples

Example 1: Releasing Locks for a Remote System

RLSIFSLCK   RMTLOCNAME('rainbow1')

This command releases the NFS-related locks held on local files by the system named rainbow1.

Example 2: Releasing Locks for a Local Object

RLSIFSLCK   OBJ('/CustAccounts/May')

This command releases all byte-range locks held on the object /CustAccounts/May.

Example 3: Releasing Locks for a File System

RLSIFSLCK OBJ('/CustAccounts/April') NFSSVRLCK(*YES)
          LCLBRNGLCK(*NO) OBJMFS(*YES)

This command releases all NFS version 4 locks and state for the file system that /CustAccounts/April is within.

Error messages

*ESCAPE Messages

CPFA09C
Not authorized to object. Object is &1.
CPFA0A9
Object not found. Object is &1.
CPFA1B6
Unable to release locks, reason code &1. Object is &3.
CPFA1B8
*IOSYSCFG authority required to use &1.