Sun Cluster 3.1 System Administration Guide

Chapter 7 Patching Sun Cluster Software and Firmware

This chapter provides the procedures for adding and removing patches for a Sun Cluster configuration.

This is a list of the procedures in this chapter.

Patching Sun Cluster Overview

Due to the nature of a cluster, all cluster member nodes must be at the same patch level for proper cluster operation. When patching a node with a Sun Cluster patch, you might need to temporarily remove a node from cluster membership or stop the entire cluster before installing the patch. This section describes these steps.

Before applying a Sun Cluster patch, check the Sun Cluster web page for any special instructions; for the current URL, see the Sun Cluster 3.1 Release Notes or contact Enterprise Services. If there aren't any special instructions, check the patch's README file.


Note –

For Sun Cluster patches, always defer to the patch's README file for instructions that supersede procedures in this chapter.


Patch installation on all cluster nodes falls into one of the following scenarios:


Note –

Underlying cluster protocols do not change due to a patch.


You use the patchadd command to apply a patch to the cluster, and patchrm to remove a patch (when possible).

Sun Cluster Patch Tips

Use the following tips to help you administer Sun Cluster patches more efficiently:

Patching Sun Cluster

Table 7–1 Task Map: Patching the Cluster

Task 

For Instructions, Go To... 

Apply a non-rebooting Sun Cluster patch to one node at a time without having to stop the node 

How to Apply a Non-Rebooting Sun Cluster Patch

Apply a rebooting Sun Cluster patch after taking the cluster member to non-cluster mode 

How to Apply a Rebooting Patch (Node)

 

How to Apply a Rebooting Patch (Cluster and Firmware)

Remove a Sun Cluster patch 

    - You can back out the patch if necessary 

How to Remove a Sun Cluster Patch

How to Apply a Rebooting Patch (Node)

Apply the patch to one node in the cluster at a time to keep the cluster itself operational during the patch process. With this procedure, you must first shut down the node and boot it to single-user mode using the boot -sx command, before applying the patch.

  1. Before applying the patch, check the Sun Cluster product web page for any special pre- or post-installation instructions.

  2. Become superuser on the node to which you are applying the patch.

  3. List the resource groups and device groups on the node being patched.


    # scrgadm -pv
    # scstat
    

  4. Switch all resource groups, resources, and device groups from the node being patched to other cluster members.


    # scswitch -S -h node[,...]
    

    -S

    Evacuates all device groups and resource groups from the specified node.

    -h node[,...]

    Specifies the node from which you are switching the resource groups and device groups.

  5. Shut down the node.


    # shutdown -g0 [-y] [-i0]

  6. Boot the node in non-cluster single-user mode.


    ok boot -sx
    

  7. Apply the patch.


    # patchadd -M patch-dir patch-id
    

    patch-dir

    Specifies the directory location of the patch.

    patch-id

    Specifies the patch number of a given patch.


    Note –

    Always defer to the instructions in the patch directory that supersede procedures in this chapter.


  8. Reboot the node into the cluster.


    # reboot
    

  9. Verify that the patch has been installed successfully.


    # showrev -p | grep patch-id
    

  10. Verify that the patch works, and that the node and cluster are operating normally.

  11. Repeat Step 2 through Step 10 for all remaining cluster nodes.

  12. Switch resource groups, resources, and device groups as needed.

    After rebooting all the nodes, the last node rebooted will not have the resource groups and device groups online.


    # scswitch -z -D  device-group[,...]-h node[,...]
    # scswitch -z -g  resource-group[,...]-h nod[,...]e
    

    -z

    Specifies the change in mastery of a resource group or device group.

    -h node[,...]

    Specifies the nodes to which you are switching the resource groups and device groups.

    -D

    Switches the specified device groups to the nodes identified by the -h option.

    -g

    Switches the specified resource groups to the nodes identified by the -h option. If -h is not specified, the resource groups are taken offline.

Example—Applying a Rebooting Patch (Node)

The following example shows the application of a rebooting Sun Cluster patch to a node.


# scrgadm -pv
...
RG Name: schost-sa-1
...
# scstat
...
Device Group Name:											dg-schost-1
...
# scswitch -S -h phys-schost-2
# shutdown -g0 -y -i0
...
ok boot -sx...
# patchadd -M /tmp/patches 234567-05
...
# reboot
...
# showrev -p | grep 234567-05
# scswitch -z -D dg-schost-1 -h phys-schost-1
# scswitch -z -g schost-sa-1 -h phys-schost-1

Where to Go From Here

If you need to back out a patch, see How to Remove a Sun Cluster Patch.

How to Apply a Rebooting Patch (Cluster and Firmware)

With this procedure, you must first shut down the cluster and boot each node to single-user mode using the boot -sx command, before applying the patch.

  1. Before applying the patch, check the Sun Cluster product web page for any special pre- or post-installation instructions.

  2. Become superuser on any node in the cluster.

  3. Shut down the cluster.


    # scshutdown -y -g grace-period message
    

    -y

    Specifies to answer yes to the confirmation prompt.

    -g grace-period

    Specifies, in seconds, the amount of time to wait before shutting down. Default grace period is 60 seconds.

    message

    Specifies the warning message to broadcast. Use quotes if message contains multiple words.

  4. Boot each node into non-cluster single-user mode.

    On the console of each node, run the following command.


    ok boot -sx
    

  5. Apply the software or firmware patch.

    On one node at a time, run the following command.


    # patchadd -M patch-dir patch-id
    

    patch-dir

    Specifies the directory location of the patch.

    patch-id

    Specifies the patch number of a given patch.


    Note –

    Always defer to the instructions in the patch directory that supersede procedures in this chapter.


  6. Verify that the patch has been installed successfully on each node.


    # showrev -p | grep patch-id
    

  7. After applying the patch to all nodes, reboot the nodes into the cluster.

    On each node, run the following command.


    # reboot
    

  8. Verify that the patch works, and that the nodes and cluster are operating normally.

Example—Applying a Rebooting Patch (Cluster)

The following example shows the application of a rebooting Sun Cluster patch to a cluster.


# scshutdown -g 0 -y
...
ok boot -sx
...
# patchadd -M /tmp/patches 234567-05
(Apply patch to other cluster nodes)
...
# showrev -p | grep 234567-05
# reboot

Where to Go From Here

If you need to back out a patch, see How to Remove a Sun Cluster Patch.

How to Apply a Non-Rebooting Sun Cluster Patch

Apply the patch to one node in the cluster at a time. When applying a non-rebooting patch, you do not need to first shut down the node receiving the patch.

  1. Before applying the patch, check the Sun Cluster product web page for any special pre- or post-installation instructions.

  2. If this is a data service patch, switch over the affected data service(s) from the node that you will be patching to a backup node, before applying the patch.


    # scswitch -z -g resource-group[,...] -h node[,...]
    
  3. Apply the patch on a single node.

    If you switched a data service in Step 2, perform the patch installation on the node from which you switched the data service.


    # patchadd -M patch-dir patch-id
    

    patch-dir

    Specifies the directory location of the patch.

    patch-id

    Specifies the patch number of a given patch.

  4. Verify that the patch has been installed successfully.


    # showrev -p | grep patch-id
    

  5. Verify that the patch works, and that the node and cluster are operating normally.

    If you switched a data service to a backup node in Step 2, you can now switch it back to the original primary node.

  6. Repeat Step 3 through Step 5 for the remaining cluster nodes.

Example—Applying a Non-Rebooting Sun Cluster Patch


# patchadd -M /tmp/patches 234567-05
...
# showrev -p | grep 234567-05

Where to Go From Here

If you need to back out a patch, see How to Remove a Sun Cluster Patch.

How to Remove a Sun Cluster Patch

If necessary, you can back out (remove) a Sun Cluster patch.

  1. Become superuser on the node from which you are removing the patch.

  2. List the resource groups and device groups on the node having the patch removed.


    # scrgadm -pv
    # scstat
    

  3. Switch all resource groups, resources, and device groups from the node having the patch removed to other cluster members.


    # scswitch -S -h node[,...]
    

    -S

    Evacuates all device services and resource groups from the specified node.

    -h node[,...]

    Specifies the nodes from which you are switching the resource groups and device groups.

  4. Shut down the node.


    # shutdown -g0 -y -i0 message
    

    -g0

    Specifies, in seconds, the amount of time to wait before shutting down. Default grace period is 60 seconds.

    -y

    Specifies to answer yes to the confirmation prompt.

    -i0

    Specifies init state of 0. This brings the node down to the OBP prompt.

    message

    Specifies the warning message to broadcast. Use quotes if message contains multiple words.

  5. Boot the node in non-cluster single-user mode.


    ok boot -sx
    

  6. Remove the patch.


    # patchrm patch-id
    

    patch-id

    Specifies the patch number of a given patch.

  7. Reboot the node.


    # reboot
    

  8. Verify that the patch has been removed successfully.


    # showrev -p | grep patch-id
    

  9. Verify that the node and cluster are operating normally.

  10. Repeat Step 1 through Step 9 for the remaining cluster nodes.

  11. Switch resource groups, resources, and device groups as needed (optional).

    After rebooting all the nodes, the last node rebooted will not have the resource groups and device groups online.


    # scswitch -z -Ddevice-group[,...]  -h node[,...]
    # scswitch -z -g resource-group[,...] -h node[,...]
    

    -z

    Specifies the change in mastery of a resource group or device group.

    -h node[,...]

    Specifies the nodes to which you are switching the resource groups and device groups.

    -D

    Switches the specified device groups to the nodes identified by the -h option.

    -g

    Switches the specified resource groups to the nodes identified by the -h option. If -h is not specified, the resource groups are taken offline.

Example—Removing a Sun Cluster Patch

The following example shows the removal of a Sun Cluster patch.


# scrgadm -pv
...
RG Name: schost-sa-1
...
# scstat
...
Device Group Name:																	dg-schost-1
...
# scswitch -S -h phys-schost-2
# shutdown -g0 -y -i0 "Rebooting down node for maintenance"
...
ok boot -x
...
# patchrm 234567-05
...
# reboot
...
# pkgchk -v 234567-05
...
# scswitch -z -D dg-schost-1 -h phys-schost-1
# scswitch -z -g schost-sa-1 -h phys-schost-1