Redhat cluster clusvcadm cheat sheet Part – 2

Continuing from my previous post. https://ervikrant06.wordpress.com/2014/10/05/redhat-cluster-clusvcadm-cheat-sheet-part-1/

Case 4 : Trying to migrate the service its not applicable for simple service only useful in case of VM. Read man page for this.
[root@Node1 ~]# clusvcadm -M service:IP_sg1 -m 192.168.111.151
Trying to migrate service:IP_sg1 to 192.168.111.151…Invalid operation for resource

Case 5 : Freezing 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.151
Last Transition : Sun Oct  5 10:43:45 2014

Command Used :

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

After status :

Service Information
——- ———–

Service Name      : service:IP_sg1
Current State   : started (112)
Flags           : frozen (1)
Owner           : 192.168.111.150
Last Owner      : 192.168.111.151
Last Transition : Sun Oct  5 10:43:45 2014

Nothing will come in message file during this operation.

Now lets try to migrate the frozen service.

[root@Node1 ~]# clusvcadm -r service:IP_sg1 -m 192.168.111.151
Trying to relocate service:IP_sg1 to 192.168.111.151…Failure: Service is frozen

I have initiated the reboot of Node1 on which service is in freezed status lets see what happens once the node come up.

Conclusion : Service will remain on that node only in running state.

Service Information
——- ———–

Service Name      : service:IP_sg1
Current State   : started (112)
Flags           : frozen (1)
Owner           : 192.168.111.150
Last Owner      : 192.168.111.151
Last Transition : Sun Oct  5 10:43:45 2014

  Case 6 Unfreezing the service. 

Before Status

Service Information
——- ———–

Service Name      : service:IP_sg1
Current State   : started (112)
Flags           : frozen (1)
Owner           : 192.168.111.150
Last Owner      : 192.168.111.151
Last Transition : Sun Oct  5 10:43:45 2014

Command Used

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

After Status

Service Information
——- ———–

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

As soon as I unfreezed the service it got moved to another Node of cluster. Because when we freeze the node cluster stop monitoring it. Once we unfreeze it some resource may not be available for service hence as soon as we unfreeze it got moved to other node to start. It may be not in all cases.

Message in log file of Node1

Oct  5 11:06:42 Node1 rgmanager[3102]: [ip] 192.168.111.160 is not configured
Oct  5 11:06:42 Node1 rgmanager[2051]: Stopping service service:IP_sg1
Oct  5 11:06:42 Node1 rgmanager[2051]: Service service:IP_sg1 is recovering
Oct  5 11:06:46 Node1 rgmanager[2051]: Service service:IP_sg1 is now running on member 3

Message in log file of Node3

Oct  5 11:06:44 Node3192 rgmanager[2964]: Recovering failed service service:IP_sg1
Oct  5 11:06:44 Node3192 rgmanager[6973]: [ip] Adding IPv4 address 192.168.111.160/24 to eth0
Oct  5 11:06:48 Node3192 rgmanager[2964]: Service service:IP_sg1 started

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