6 Oracle Solaris Live Upgrade

You can use the Oracle Solaris Live Upgrade technology in Enterprise Manager Ops Center to apply patches to a duplicate, inactive boot environment. This reduces the amount of downtime required to update your Oracle Solaris software and enables you to fully test the update before introducing it in your production environment. When you are satisfied with the update, you can switch boot environments and deploy the updated boot environment. The downtime is the time it takes to reboot into the new environment.

You must have a boot environment (BE) and an alternate boot environment (ABE) in order to use this method of patching. You can use an ABE that was created outside of Enterprise Manager Ops Center; however, the preferred method is to save Oracle Solaris Live Upgrade scripts in the Local Contents section of the Update Library in Enterprise Manager Ops Center and use these scripts to create an ABE in Enterprise Manager Ops Center. Using this method provides you with an exact replica of your boot environment.

See Managing Boot Environments in the User documentation for the following topics:

About Oracle Solaris Live Upgrade

A boot environment is the set of all file systems and devices that are unique to an Oracle Solaris OS instance on a system. A dual boot environment consists of a live boot environment (BE) and an inactive alternate boot environment (ABE). You can use the Oracle Solaris Live Upgrade technology and a dual boot environment within Enterprise Manager Ops Center to manage your Oracle Solaris software updates and significantly reduce the service outage time that is usually associated with patching.

The Live Upgrade technology enables you to duplicate a boot environment and perform the following tasks without affecting the currently running system:

  • Run an Oracle Solaris software update simulation on the inactive boot environment. You can run the simulation with or without downloading the patches.

  • Update your Oracle Solaris OS on the inactive boot environment and test the update before deploying it as your active environment.

  • Maintain multiple boot environments with different images. For example, you can create one boot environment that contains all current patches and another that contains only security patches.

This section provides a brief overview of how Oracle Solaris Live Upgrade uses files systems and guidelines for selecting slices for shareable file systems.

For more information about system administration tasks such as managing file systems, mounting, booting, and managing swap space, see Solaris 10 System Administration Guide: Devices and File systems available at:

http://www.oracle.com/technetwork/indexes/documentation/index.html

File Systems

When using alternate boot environments with Oracle Solaris Live Upgrade, file systems are categorized into the following types:

  • Critical File Systems – Non-shareable file systems that are required by the Oracle Solaris OS, such as root (/), /usr, /var, and /opt. These file systems are separate mount points in the vfstab of the active and inactive boot environments and are always copied from the source to the inactive boot environment.

  • Shareable File Systems – User-defined files, such as /export, that contain the same mount point in the vfstab in both the active and inactive boot environments. Updating shared files in the active boot environment also updates data in the inactive boot environment. When you create a boot environment, shareable file systems are shared by default. If you specify a destination slice, also known as a partition, the file systems are copied.

  • Swap – Swap depends on the type of file system:

    • For UFS file systems, swap is a special shareable volume. Like a shareable file system, all swap slices are shared by default. If you specify a destination directory for swap, the swap slice is copied.

    • For ZFS file systems, swap and dump volumes are shared within the pool.

Guidelines for Selecting Slices for Shareable File Systems

Live Upgrade copies the entire contents of a slice to the designated new boot environment slice. You might want some large file systems on that slice to be shared between boot environments rather than copied to conserve space and copying time. File systems that are critical to the OS such as root (/) and /var must be copied. File systems such as /home are not critical file systems and could be shared between boot environments. Shareable file systems must be user-defined file systems and on separate swap slices on both the active and new boot environments. You can reconfigure the disk several ways, depending your needs.

You can reslice, or partition, the disk before creating the new boot environment and put the shareable file system on its own slice. For example, if the root (/) file system, /var, and /home are on the same slice, reconfigure the disk and put /home on its own slice. When you create any new boot environments, /home is shared with the new boot environment by default.

To share a directory, the directory must be split off to its own slice. The directory is then a file system that can be shared with another boot environment. You can use the lucreate command with the -m option to create a boot environment and split a directory off to its own slice. But, the new file system cannot yet be shared with the original boot environment. You must run the lucreate command with the -m option again to create another boot environment. The two new boot environments can then share the directory.

Configuring Swap for the New Boot Environment

These guidelines contain configuration recommendations and examples for selecting a slice for a swap file system.

You can configure a swap slice in three ways by using the lucreate command with the -m option:

  • If you do not specify a swap slice, the swap slices belonging to the current boot environment are configured for the new boot environment.

  • If you specify one or more swap slices, these slices are the only swap slices that are used by the new boot environment. The two boot environments do not share any swap slices.

  • You can specify to both share a swap slice and add a new slice for swap.

The following examples show the three ways of configuring swap. The current boot environment is configured with the root (/) file system on c0t0d0s0. The swap file system is on c0t0d0s1.

Example – No Swap Slice is Specified

  • In the following example, no swap slice is specified. The new boot environment contains the root file system on c0t1d0s0. Swap is shared between the current and new boot environment on c0t0d0s1.

    # lucreate -n be2 -m /:c0t1d0s0:ufs
    

Example – Swap Slice is Specified

  • In the following example, a swap slice is specified. The new boot environment contains the root file system on c0t1d0s0. A new swap file system is created on c0t1d0s1. No swap slice is shared between the current and new boot environment.

    # lucreate -n be2 -m /:c0t1d0s0:ufs -m -:c0t1d0s1:swap
    

Example – Add a Swap Slice and Share a Swap Slice

  • In the following example, a swap slice is added and another swap slice is shared between the two boot environments. The new boot environment contains the root file system on c0t1d0s0. A new swap slice is created on c0t1d0s1. The swap slice on c0t0d0s1 is shared between the current and new boot environment.

    # lucreate -n be2 -m /:c0t1d0s0:ufs -m -:shared:swap -m -:c0t1d0s1:swap
    

Failed Boot Environment Creation if Swap is in Use

A boot environment creation fails if the swap slice is being used by any boot environment except for the current boot environment. If the boot environment was created using the -s option, the alternate-source boot environment can use the swap slice, but not any other boot environment.

Supported Live Upgrade Configurations

The Oracle Solaris Live Upgrade functionality enables you to run an OS Update job to create an alternate boot environment, manage boot environments, or to patch a managed Oracle Solaris OS. You cannot use Oracle Solaris Live Upgrade in Enterprise Manager Ops Center to upgrade from one Oracle Solaris OS version to another, such as upgrading from the Oracle Solaris 8 OS to the Oracle Solaris 10 OS.

See LIVE UPGRADE REQUIREMENTS to verify that you have the required packages and patches needed to successfully perform a live update.

Supported Operating Systems

The following operating systems are supported with Oracle Solaris Live Upgrade in Enterprise Manager Ops Center:

  • Oracle Solaris 10 OS for x86 Platforms up to and including Oracle Solaris 10 5/09 – Update alternate boot environments for physical systems.

  • Oracle Solaris 10 OS for SPARC up to and including Oracle Solaris 10 5/09 – Update alternate boot environments for physical and virtual machines, including Oracle Solaris Zones and Oracle VM Server for SPARC (formerly known as Logical Domains).

  • Oracle Solaris 9 OS SPARC – Update alternate boot environments for physical machines.

  • Oracle Solaris 8 OS SPARC – Update alternate boot environments for physical machines.

Note:

Additional packages and patches might be required to support Live Upgrade. See LIVE UPGRADE REQUIREMENTS for a list of required patches and packages and for special patch instructions when using Oracle Solaris Live Upgrade on Oracle Solaris 8 software.

Note:

Using Oracle Solaris Live Upgrade and alternate boot environments is not supported for your Enterprise Controller and Proxy Controller systems. Live Upgrade does not synchronize all of the files that are required for the Enterprise Controller and Proxy Controller.

Oracle Solaris Live Upgrade and Oracle Solaris Zone Support

If you use Oracle Solaris Live Upgrade to update the OS in a greenfield zone (an zone created in Enterprise Manager Ops Center) the following conditions must be met:

  • Agent must be running at least Oracle Solaris 10 5/09 (update 7) OS

  • Must have a ZFS root file system

  • Storage library used to house the zones cannot be part of the root pool; you must create a separate pool

  • You cannot use the lucreate -p option to create ABEs

The -p option, which copies between two root pools on ZFS configuration, is not supported with the lucreate command.

Note:

If your root file system is UFS and you create a brownfield zone, one that is created outside of Enterprise Manager Ops Center, you cannot create ZFS based non-global zones.

The following zone configurations with an alternate boot environment are supported in this release:

  • UFS zones

  • ZFS zones on the same root pool as the global zone

Note:

If you plan to use ABEs with zones, you must designate sufficient zone storage space. When you create the zones and configure the zone storage, specify twice the size of the zone file system for the / file system of the zone. For example if your zone / file system was configured as 8 GB, the storage used to back up the zone should be at least 16 GB.

See Updating Zones to patch Oracle Solaris Zones without using a dual boot environment.

Adding a Live Upgrade Script to Local Content

Oracle Solaris Live Upgrade contains a suite of script commands. To create an alternate boot environment with Enterprise Manager Ops Center, use the lucreate command to write one or more Oracle Solaris Live Upgrade scripts and then add the scripts to the Local Content library in Enterprise Manager Ops Center.

When you use Enterprise Manager Ops Center to create the ABE, the scripts must meet the following requirements:

  • The script cannot contain parameters.

  • The ABE name must be hard-coded into the script itself or otherwise be provided outside of Enterprise Manager Ops Center.

  • The ABE name defined in the script must match the ABE name that you use when you run the update job to create the ABE.

  • The script must return 0 on success and non-zero on failure.

For detailed instructions and examples for using the lucreate command to create a boot environment, see Oracle Solaris 10 9/10 Installation Guide: Solaris Live Upgrade and Upgrade Planning available at:

http://www.oracle.com/technetwork/indexes/documentation/index.html

To Add a Live Upgrade Script to Local Content

  1. Expand Libraries in the Navigation pane.

  2. Click Local Content in the Solaris/Linux OS Updates library.

  3. Click Upload Local Action in the Actions pane.

  4. Type a name for the file.

  5. Enter a brief description of the purpose of the action.

  6. In the Action list, click the Pre-action type of action. This will run the script on the managed host before job tasks are carried out.

  7. Click the name of the distribution that uses the action in the Distribution list. The Parent field shows the category, based on the type of Action.

  8. Click Browse to locate and select the file.

  9. Click Upload. The file is uploaded to the selected distribution.

Creating an ABE Profile

Profiles specify which components are to be installed and which are prohibited, and the actions to be performed on a system. By defining the ABE create script as a pre-action, the profile helps you to automate creating alternate boot environments, manage dependencies, and ensure consistency.

To Create an ABE Profile

  1. Expand Plan Management, then click Update Profiles.

  2. Click New Profile from the Actions pane. The New OS Update Profile window is displayed.

  3. Type a name and brief description of the new profile.

  4. Select the OS Distribution from the drop-down list.

  5. Search for your Live Upgrade ABE create script, or expand Local in the OS Update Components tree and select the script from the Pre-actions category.

  6. Click Required.

  7. Click Save as Named Profile.

Creating an ABE

Oracle Solaris Live Upgrade scripts are used to create an alternate boot environment (ABE). To create an exact replica of your boot environment, run the script in Enterprise Manager Ops Center to create the ABE.

The following methods are available to create the ABE:

  • Upload an Oracle Solaris Live Upgrade script as Local Content in Enterprise Manager Ops Center.

    • Run an OS update job and specify a pre-action which runs the script. You can select multiple compatible targets and create an ABE for each target using the same script at the same time.

    • Create an OS Profile, and then run an OS Update job. The profile enables you to define the components and the actions to be performed every time you use the profile to create an ABE.

  • Run an Oracle Solaris Live Upgrade script from the command line. With this method, you must log in to each agent and then run the script to create the ABE.

When you create the ABE with an OS Update job, you can choose to run the job immediately, or you can schedule the job to run during your maintenance window. In all methods, the new boot environment is automatically discovered and a new Boot Environment tab will appear in the center pane for OS management.

This task describes how to run a New OS Update job to create the ABE. Although it is a New OS Update job, the sole purpose of the job is to create an ABE. The job will use the Live Upgrade script that you uploaded to Local Content to create a duplicate of your boot environment.

Note:

Do not use Oracle Solaris Live Upgrade on your Enterprise Controller or Proxy Controllers. It does not synchronize all of the files that are required for these Enterprise Manager Ops Center components.

Before You Begin

Review the following information before you create an ABE:

To Create an ABE With an OS Update Job

  1. Highlight the OS in the Assets section of the Navigation pane.

  2. Click New Update OS Job in the Update section of the Actions pane. The New Update OS Job wizard is displayed. The Job Information window is displayed first.

  3. Complete the following Job Information parameters:

    • Type a job name.

    • Select Actual Run, which will create the ABE at the time that you specify in Step 5.

    • Select the Sequential task execution order.

    • Select the Target Setting: Use the same Targets for all tasks in the job.

    • Select a Task Failure Policy:

      • Complete as much of the job as possible

      • Stop at failure and notify

    • Click the Boot Environment Type check box.

    • Click the Run ABE Pre-action Script check box.

  4. (Optional) To add tasks to the job, click the Add Task icon. To edit, click the Profile and Policy fields.

  5. Click Next.

  6. Type the name of the ABE, as defined in the script. Select a script, then click Next.

  7. (Optional) Complete the Boot Environment Workflow, then click Next.

    • To synchronize the alternate boot environment with the current boot environment before the ABE is mounted, click the Sync ABE check box.

    • To edit the description to describe the state of the BE, click Modify Current BE, and add text to the Description field.

    • To edit the description to describe the state of the ABE, click Modify Alternate BE, and add text to the Description field.

    • To switch boot environments after update, click the Activate and Reboot ABE check box.

  8. Schedule the job, then click Next.

    • Run Now starts the job immediately after you click Finish in the Job Summary.

    • Start Date enables you to select a date and time to start the job.

    • On a recurring schedule enables you to run the same job on a monthly or daily scheduled time.

  9. Review the Job Summary, then click Finish to run the job as scheduled in the previous step.

When the job completes, the ABE is created and associated with the OS. To verify that the ABE was created, click the OS in the Assets pane. The Boot Environment tab appears in the center pane. Click the Boot Environment tab to display the new ABE, as specified in the Live Upgrade script. An OS can have multiple associated ABEs.

Note:

The Boot Environment tab is only displayed if there is at least one ABE associated with the OS.

To Create an ABE With a Profile

  1. Create a profile and define the ABE create script as the pre-action.

    1. Expand Plan Management, then click Update Profiles in the Navigation pane.

    2. Click New Profile from the Actions pane. The New OS Update Profile window is displayed.

    3. Type a name and brief description of the new profile.

    4. Select the OS Distribution from the drop-down list.

    5. Search for your ABE create script, or expand Local in the OS Update Components tree and select the script from the Pre-actions category.

    6. Click Required.

    7. Click Save as Named Profile.

  2. Create an OS Update job that uses your pre-action script and the ABE profile that you created in the previous step.

  3. Click New Update OS Job in the Actions pane. The New Update OS Job wizard is displayed. The Job Information window is displayed first.

  4. Complete the following Job parameters:

    • Type a job name.

    • Select Actual Run.

    • Select the Sequential task execution order.

    • Select the Target Setting: Use the same Targets for all tasks in the job.

    • Select a Task Failure Policy:

      • Complete as much of the job as possible

      • Stop at failure and notify

    • To edit the profile or policy of the default task, click the Profile or Policy cell for the task to display a drop-down menu. Select the profile that you created in step 2 from the menu.

    • Click the Target link, expand the Assets tree, highlight an OS, click Add to Target List, then click Select.

    Click Next.

  5. Schedule the job, then click Next.

    • Run Now starts the job immediately after you click Finish in the Job Summary.

    • Start Date enables you to select a date and time to start the job.

    • On a recurring schedule enables you to run the same job on a monthly or daily scheduled time.

  6. Review the Job Summary, then click Finish to run the job as scheduled in the previous step.

  7. When the job completes, the ABE is created and associated with the OS. To verify that the ABE was created, click the OS in the Assets pane. The Boot Environment tab appears in the center pane. Click the Boot Environment tab to display the new ABE, as specified in the lucreate script. An OS can have multiple associated ABEs.

    Note:

    The Boot Environment tab is only displayed if there is at least one ABE associated with the OS.

Updating an ABE

You can create a customized update job, including the option to use an alternate boot environment (ABE) to perform a live upgrade of your Oracle Solaris 10 OS. With Live Upgrade, you create an inactive ABE, update and patch the ABE, synchronize the ABE and BE, and then switch boot environments. When you switch boot environments, the patched and tested ABE becomes the active boot environment.

Note:

Do not use Live Upgrade on your Enterprise Controller or Proxy Controllers. Live Upgrade does not synchronize all of the files that are required for these components.

You must run a separate update job for systems that use an ABE from those that do not use an ABE. When creating a job, you must define the following job parameters:

  • Name and description of the update job.

  • Alternate Boot Environment.

  • Profile – Defines what updates are to be installed, uninstalled, or updated on an OS. Select a profile from the list of predefined and customized profiles.

  • Policy – Defines how a job is performed and sets the automation level of the job. Select a policy from the list of available policies. You can also create your own policies.

  • Target Settings – Defines whether the target should be different or similar for each task in the job.

  • Actual Run – Defines whether this job is in simulation mode. You can choose to deploy the job, or to run a job simulation. A job simulation determines the actions and results of a job, and estimates how much time is required to complete the job. A job simulation also indicates whether your policy and profile responses will enable the job to succeed.

  • Task Execution Order – Specifies whether the tasks should be run in parallel or sequentially.

  • Task Failure Policy – Specifies what action should be taken if a task fails.

  • Targets – Select one or more target hosts for this job.

Before You Begin

To create an ABE as part of this job, you must write at least one script that uses the lucreate command and then upload the script to the Local Content.

See Oracle Enterprise Manager Ops Center Advanced User's Guide for a detailed procedure to upload a local action.

Note:

The ABE name defined in the script must match the ABE name that you use when you run the update job to create the ABE.

To Update an ABE

  1. Click Assets in the Navigation pane.

  2. Expand All Assets, or use the All Assets filter to locate the Oracle Solaris 10 OS instance.

  3. Click New Update OS Job from the Actions pane. The New Update OS Job wizard is displayed. The Job Information window is displayed first.

  4. Complete the following Job parameters:

    • Type a job name.

    • Select the Run Type:

      • Simulation. To download the required patches as part of the simulation, click the Download check box.

      • Actual Run.

    • Select the task execution order:

      • Sequential

      • Parallel

    • Choose the Target Setting:

      • Use the same Targets for all tasks in the job

      • Use different Targets for each task in the job

    • Choose the Task Failure Policy:

      • Complete as much of the job as possible

      • Stop at failure and notify

    • Click the ABE check box.

    • (optional) To create an alternate boot environment during this job by running an ABE Pre-Action Script, click the Enable check box.

      Note:

      You must have created the script and uploaded it to the Library for this option.
  5. You can define the profile, policy and target for each task, or edit the profile and policy.

  6. To edit the profile or policy of the default task, click the Profile or Policy cell for the task to display a drop-down menu. Select the profile or policy from the menu.

  7. To add a new task, click the plus (+) icon.

    • A second row will appear. Click the Profile cell for that row to display a drop-down menu. Select the new profile that you want to add.

    • To change the policy for the new profile, click the Policy cell and select a new policy from the drop-down menu.

    • If you chose the parameter to use a different target for each task, click the Targets cell to display the Select Targets page. Select one or more target from the list of Available Items, then click Select to include the asset in the Target List. Click Add to Target List to close the page.

    • Click Next.

  8. If you selected chose to create an ABE as part of the job, the Create ABE page appears.

  9. If you have only one ABE, the Boot Environment Workflow page appears, go to step 10. If you have multiple alternate boot environments, the ABE Selection page appears.

    • One or more of the targets has more then one possible associated ABE. Select the ABE from the drop-down menu for each of the Targets. You can use the Select ABE field to filter for the ABE name.

    • Click Next. The Boot Environment Workflow page is displayed.

  10. If you selected Simulation in the job parameters, the boot environment workflow cannot be edited, Click Next. Skip to step 12.

  11. If you selected Actual Run in the job parameters, you can edit the pre-actions and post-actions in the workflow.

    • Pre-actions by default will unmount and then mount the ABE. To synch the ABE with the BE before mounting, click the Sync ABE check box.

    • Post-Actions by default will unmount the ABE.

      • Click Modify Current BE to edit the description of the current boot environment. You might use this to describe the state of the current BE. For example, Boot environment running Oracle Solaris 10 5/08 OS before applying the Oracle Solaris 10 OS September baseline.

      • Click Modify Alternate BE to edit the description of the ABE. You might use this to describe the state of the ABE. For example, Boot environment running Oracle Solaris 10 5/08 OS after applying the Oracle Solaris 10 OS September baseline.

    • Click Activate and Reboot ABE to switch boot environments after update.

  12. Schedule the job, then click Next.

    • Run Now starts the job immediately after you click Finish in the Job Summary.

    • Start Date enables you to select a date and time to start the job.

    • On a recurring schedule enables you to run the same job on a monthly or daily scheduled time.

  13. Review the Job Summary, then click Finish to run the job as scheduled in the previous step.

BE Reports and System Catalogs

The OS Update Reports and Catalogs are those of the active boot environment (BE). To see the differences between the active BE and the alternate boot environment (ABE), you must reboot into the ABE and then compare the snapshots. To create an OS report or catalog, make the ABE the active BE, then see Using the Solaris OS Update Reports.

Reports

You can run all available reports for the active BE, including compliance reports. Reports are generally not available for the ABE, and any reports are typically outdated.

To create a report for an ABE, you must reboot into it to make it the active BE, then run the compliance report.

Catalogs

An update catalog is an OS inventory of your OS and is automatically created when you manage a system. When you have a dual boot environment, the OS Update catalog displays the name and description of the active boot environment.

The catalog is the inventory of the active boot environment. To view the current inventory of an ABE, you must make it the active boot environment and create a historical catalog (snapshot).

When you create the snapshot, manually specify the system. The snapshot is of the current active boot environment and does not indicate that the system might be an ABE.

Viewing and updating an OS Update catalog for a boot environment is the same as other OS catalog.