How to unlock a Tivoli SAMP resource group
Problem(Abstract)
Tivoli SAMP resource group shows "Request=Lock", and Tivoli SAMP fails to automate resources in an IBM Smart Analytics System
Cause
The Tivoli SAMP Resource Group (RG) shows "Request=Lock"
When a resource group is locked, Tivoli SAMP will not automate the resources. The lock prevents Tivoli SAMP from controlling the resource and will behave as if automation is turned off for any locked resource group.
The "db2stop" command is an example of a known command to introduce a lock.
Environment
IBM Smart Analytics System with Tivoli SAMP enabled.
Diagnosing the problem
Use the lssam command to identify a locked resource.
Note: You must run the "lssam" command as the root user to see locks.
In the following example is a partial output of the "lssam" command. Notice the resource group "db2_db2admin01_0-rg" is locked.
-----> lssam -nocolor <-----
Pending online IBM.ResourceGroup:db2_db2admin01_server_admin01-rg Nominal=Online
- |- Pending online IBM.ResourceGroup:db2_db2admin01_0-rg Request= Lock Nominal=Online
- |- Offline IBM.Application:db2_db2admin01_0-rs Control=SuspendedPropagated
- |- Offline IBM.Application:db2_db2admin01_0-rs:admin01
'- Offline IBM.Application:db2_db2admin01_0-rs:standby01
- |- Offline IBM.Application:db2mnt-db2fs_db2admin01_NODE0000-rs:admin01
'- Offline IBM.Application:db2mnt-db2fs_db2admin01_NODE0000-rs:standby01
- |- Offline IBM.Application:db2mnt-db2mlog_db2admin01_NODE0000-rs:admin01
'- Offline IBM.Application:db2mnt-db2mlog_db2admin01_NODE0000-rs:standby01
- |- Offline IBM.Application:db2mnt-db2path_db2admin01_NODE0000-rs:admin01
'- Offline IBM.Application:db2mnt-db2path_db2admin01_NODE0000-rs:standby01
- |- Offline IBM.Application:db2mnt-db2plog_db2admin01_NODE0000-rs:admin01
'- Offline IBM.Application:db2mnt-db2plog_db2admin01_NODE0000-rs:standby01
- |- Online IBM.ServiceIP:db2ip_1_115_15_115-rs:admin01
'- Offline IBM.ServiceIP:db2ip_1_115_15_115-rs:standby01
Resolving the problem
If a resource group is locked, it can be manually unlocked using the following command:
rgreq –o unlock <resource group>
If there are multiple locked resource groups, use the following script to unlock them:
#!/usr/bin/ksh
for rg_name in `lssam -nocolor | awk '/Lock/ {print $4e}' | awk -F\: '{print $2}'`
do
- #echo "rgreq -o unlock $rg_name && echo rgreq -o unlock $rg_name"
echo "rgreq -o unlock $rg_name "
rgreq -o unlock $rg_name
done