Redhat cluster clusvcadm cheat sheet Part – 3

Continuing from previous posts Part -1 and Part – 2

Case 7 :  Restarting the service

Before Status

Service Information
——- ———–

Service Name      : service:IP_sg1
Current State   : started (112)
Flags           : none (0)
Owner           : 192.168.111.150
Last Owner      : 192.168.111.152
Last Transition : Sun Oct  5 11:15:32 2014

Command Used

[root@Node1 ~]# clusvcadm -R service:IP_sg1
Local machine trying to restart service:IP_sg1…Success

After used

Service Information
——- ———–

Service Name      : service:IP_sg1
Current State   : started (112)
Flags           : none (0)
Owner           : 192.168.111.150
Last Owner      : 192.168.111.150
Last Transition : Sun Oct  5 11:16:25 2014

Now as we have restarted the service on same node hence Last owner and current owner become same.

Messages in log file.

Oct  5 11:16:15 Node1 rgmanager[2051]: Stopping service service:IP_sg1
Oct  5 11:16:15 Node1 rgmanager[3570]: [ip] Removing IPv4 address 192.168.111.160/24 from eth0
Oct  5 11:16:25 Node1 rgmanager[2051]: Service service:IP_sg1 is stopped
Oct  5 11:16:25 Node1 rgmanager[2051]: Starting stopped service service:IP_sg1
Oct  5 11:16:25 Node1 rgmanager[3658]: [ip] Adding IPv4 address 192.168.111.160/24 to eth0
Oct  5 11:16:28 Node1 rgmanager[2051]: Service service:IP_sg1 started

Case 8 : Locking resource group

Before status

Service Information
——- ———–

Service Name      : service:IP_sg1
Current State   : started (112)
Flags           : none (0)
Owner           : 192.168.111.150
Last Owner      : 192.168.111.150
Last Transition : Sun Oct  5 11:16:25 2014

Command Used

[root@Node1 ~]# clusvcadm -l service:IP_sg1
Resource groups locked

After Status

Service Information
——- ———–

Service Name      : service:IP_sg1
Current State   : started (112)
Flags           : none (0)
Owner           : 192.168.111.150
Last Owner      : 192.168.111.150
Last Transition : Sun Oct  5 11:16:25 2014

Note : No difference in before and after output. How can we verify whether our service is in lock mode or not.

[root@Node1 ~]# clusvcadm -S service:IP_sg1
Resource groups locked

Disabling the service. Yes we can.

[root@Node1 ~]# clusvcadm -d service:IP_sg1
Local machine disabling service:IP_sg1…Success

Still the status is locked.

[root@Node1 ~]# clusvcadm -S service:IP_sg1
Resource groups locked

But we can’t enable the service in locked mode. In same words opposite of freeze service shown in Part – 2.

[root@Node1 ~]# clusvcadm -e service:IP_sg1
Local machine trying to enable service:IP_sg1…Temporary failure; try again

Not able to migrate it.

[root@Node1 ~]# clusvcadm -r service:IP_sg1 -m 192.168.111.151
Trying to relocate service:IP_sg1 to 192.168.111.151…Invalid operation for resource

Step 9 : Unlocking resource group.

Before Status

Service Information
——- ———–

Service Name      : service:IP_sg1
Current State   : disabled (119)
Flags           : none (0)
Owner           : none
Last Owner      : 192.168.111.150
Last Transition : Sun Oct  5 11:24:12 2014

Command Used

[root@Node1 log]# clusvcadm -u service:IP_sg1
Resource groups unlocked

After Status

Service Information
——- ———–

Service Name      : service:IP_sg1
Current State   : disabled (119)
Flags           : none (0)
Owner           : none
Last Owner      : 192.168.111.150
Last Transition : Sun Oct  5 11:24:12 2014

Verification command.

[root@Node1 log]# clusvcadm -S service:IP_sg1
Resource groups unlocked

Nothing will get logged in log file.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s