Solaris 10 11/06 Installation Guide: Solaris Live Upgrade and Upgrade Planning

Chapter 7 Maintaining Solaris Live Upgrade Boot Environments (Tasks)

This chapter explains various maintenance tasks such as keeping a boot environment file system up to date or deleting a boot environment. This chapter contains the following sections:

Overview of Solaris Live Upgrade Maintenance

Table 7–1 Overview of Solaris Live Upgrade Maintenance

Task  

Description 

For Instructions 

(Optional) View Status. 

  • View whether a boot environment is active, being activated, scheduled to be activated, or in the midst of a comparison.

 
  • Compare the active and inactive boot environments.

 
  • Display the name of the active boot environment.

 
  • View the configurations of a boot environment.

(Optional) Update an inactive boot environment. 

Copy file systems from the active boot environment again without changing the configuration of file systems. 

Updating a Previously Configured Boot Environment

(Optional) Other tasks. 

  • Delete a boot environment.

 
  • Change the name of a boot environment.

 
  • Add or change a description that is associated with a boot environment name.

 
  • Cancel scheduled jobs.

Displaying the Status of All Boot Environments

Use the Status menu or the lustatus command to display the information about the boot environment. If no boot environment is specified, the status information for all boot environments on the system is displayed.

The following details for each boot environment are displayed:

ProcedureTo Display the Status of All Boot Environments (Character User Interface)

    From the main menu, select Status.

    A table that is similar to the following is displayed:


    boot environment   Is        Active  Active     Can	    Copy
    Name               Complete  Now	 OnReboot   Delete	 Status
    ------------------------------------------------------------------------
    disk_a_S9          yes       yes     yes        no       -     
    disk_b_S10database  yes       no      no         yes      COPYING  
    disk_b_S9a         no        no      no         yes      - 

    Note –

    In this example, you could not perform copy, rename, or upgrade operations on disk_b_S9a because it is not complete, nor on disk_b_S10database, because a live upgrade operation is in progress.


ProcedureTo Display the Status of All Boot Environments (Command-Line Interface)

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # lustatus BE_name
    
    BE_name

    Specifies the name of the inactive boot environment to view status. If BE_name is omitted, lustatus displays status for all boot environments in the system.

    In this example, the status for all boot environments is displayed.


    # lustatus
    boot environment   Is        Active  Active     Can	    Copy
    Name               Complete  Now	 OnReboot   Delete	 Status
    ------------------------------------------------------------------------
    disk_a_S9           yes       yes     yes        no       -    
    disk_b_S10database   yes       no      no         yes      COPYING  
    disk_b_S9a          no        no      no         yes      - 

    Note –

    You could not perform copy, rename, or upgrade operations on disk_b_S9a because it is not complete, nor on disk_b_S10database because a live upgrade operation is in progress.


Updating a Previously Configured Boot Environment

You can update the contents of a previously configured boot environment with the Copy menu or the lumake command. File Systems from the active (source) boot environment are copied to the target boot environment. The data on the target is also destroyed. A boot environment must have the status “complete” before you can copy from it. See Displaying the Status of All Boot Environments to determine a boot environment's status.

The copy job can be scheduled for a later time, and only one job can be scheduled at a time. To cancel a scheduled copy, see Canceling a Scheduled Create, Upgrade, or Copy Job.

ProcedureTo Update a Previously Configured Boot Environment (Character User Interface)

  1. From the main menu, select Copy.

  2. Type the name of the inactive boot environment to update:


    Name of Target Boot Environment: solaris8
    
  3. Continue or schedule the copy to occur later:

    • To continue with the copy, press Return.

      The inactive boot environment is updated.

    • To schedule the copy for later, type y, a time (by using the at command format), and the email address to which to send the results:


      Do you want to schedule the copy? y
      Enter the time in 'at' format to schedule copy: 8:15 PM
      Enter the address to which the copy log should be mailed: 
      someone@anywhere.com

      For information about time formats, see the at(1) man page.

      The inactive boot environment is updated.

      To cancel a scheduled copy, see Canceling a Scheduled Create, Upgrade, or Copy Job.

ProcedureTo Update a Previously Configured Boot Environment (Command-Line Interface)

This procedure copies source files over outdated files on a boot environment that was previously created.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # lumake -n  BE_name [-s source_BE] [-t  time] [-m email_address]
    
    -n BE_name

    Specifies the name of the boot environment that has file systems that are to be replaced.

    -s source_BE

    (Optional) Specifies the name of the source boot environment that contains the file systems to be copied to the target boot environment. If you omit this option, lumake uses the current boot environment as the source.

    -t time

    (Optional) Set up a batch job to copy over file systems on a specified boot environment at a specified time. The time is given in the format that is specified by the man page, at(1).

    -m email_address

    (Optional) Enables you to send an email of the lumake output to a specified address on command completion. email_address is not checked. You can use this option only in conjunction with -t.


Example 7–1 Updating a Previously Configured Boot Environment (Command-Line Interface)

In this example, file systems from first_disk are copied to second_disk. When the job is completed, an email is sent to Joe at anywhere.com.


# lumake -n  second_disk -s first_disk -m joe@anywhere.com

The files on first_disk are copied to second_disk and email is sent for notification. To cancel a scheduled copy, see Canceling a Scheduled Create, Upgrade, or Copy Job.


Canceling a Scheduled Create, Upgrade, or Copy Job

A boot environment's scheduled creation, upgrade, or copy job can be canceled just prior to the time the job starts. A job can be scheduled for a specific time either in the GUI with the Create a Boot Environment, Upgrade a Boot Environment, or Copy a Boot Environment menus. In the CLI, the job can be scheduled by the lumake command. At any time, only one job can be scheduled on a system.

ProcedureTo Cancel a Scheduled Create, Upgrade, or Copy Job (Character User Interface)

  1. From the main menu, select Cancel.

  2. To view a list of boot environments that is available for canceling, press F2.

  3. Select the boot environment to cancel.

    The job no longer executes at the time specified.

ProcedureTo Cancel a Scheduled Create, Upgrade, or Copy Job (Command-Line Interface)

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # lucancel
    

    The job no longer executes at the time that is specified.

Comparing Boot Environments

Use the Compare menu or lucompare to check for differences between the active boot environment and other boot environments. To make a comparison, the inactive boot environment must be in a complete state and cannot have a copy job that is pending. See Displaying the Status of All Boot Environments.

The specified boot environment cannot have any partitions that are mounted with lumount or mount.

ProcedureTo Compare Boot Environments (Character User Interface)

  1. From the main menu, select Compare.

  2. Select either Compare to Original or Compare to an Active Boot Environment.

  3. Press F3.

  4. Type the names of the original (active) boot environment, the inactive boot environment, and the path to a file:


    Name of Parent: solaris8
    Name of Child: solaris8-1
    Full Pathname of the file to Store Output: /tmp/compare
    
  5. To save to the file, press F3.

    The Compare menu displays the following file attributes:

    • Mode.

    • Number of links.

    • Owner.

    • Group.

    • Checksum – Computes checksums only if the file in the specified boot environment matches its counterpart on the active boot environment in all of the fields that are described previously. If everything matches but the checksums differ, the differing checksums are appended to the entries for the compared files.

    • Size.

    • Existence of files in only one boot environment.

  6. To return to the Compare menu, press F3.

ProcedureTo Compare Boot Environments (Command-Line Interface)

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # /usr/sbin/lucompare -i  infile (or) -t -o  outfile BE_name
    
    -i  infile

    Compare files that are listed in infile. The files to be compared should have absolute file names. If the entry in the file is a directory, then comparison is recursive to the directory. Use either this option or -t, not both.

    -t

    Compare only nonbinary files. This comparison uses the file(1) command on each file to determine if the file is a text file. Use either this option or -i, not both.

    -o  outfile

    Redirect the output of differences to outfile.

    BE_name

    Specifies the name of the boot environment that is compared to the active boot environment.


Example 7–2 Comparing Boot Environments (Command-Line Interface)

In this example, first_disk boot environment (source) is compared to second_disk boot environment and the results are sent to a file.


# /usr/sbin/lucompare -i  /etc/lu/compare/ \
-o /var/tmp/compare.out second_disk

Deleting an Inactive Boot Environment

Use either the Delete menu or the ludelete command to remove a boot environment. Note the following limitations.

ProcedureTo Delete an Inactive Boot Environment (Character User Interface)

  1. From the main menu, select Delete.

  2. Type the name of the inactive boot environment you want to delete:


    Name of boot environment: solaris8
    

    The inactive boot environment is deleted.

ProcedureTo Delete an Inactive Boot Environment (Command-Line Interface)

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # ludelete BE_name
    
    BE_name

    Specifies the name of the inactive boot environment that is to be deleted


Example 7–3 Deleting an Inactive Boot Environment (Command-Line Interface)

In this example, the boot environment, second_disk, is deleted.


# ludelete second_disk

Displaying the Name of the Active Boot Environment

Use the Current menu or the lucurr command to display the name of the currently running boot environment. If no boot environments are configured on the system, the message “No Boot Environments are defined” is displayed. Note that lucurr reports only the name of the current boot environment, not the boot environment that is active on the next reboot. See Displaying the Status of All Boot Environments to determine a boot environment's status.

ProcedureTo Display the Name of the Active Boot Environment (Character User Interface)

    From the main menu, select Current.

    The active boot environment's name or the message “No Boot Environments are defined” is displayed.

ProcedureTo Display the Name of the Active Boot Environment (Command-Line Interface)

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # /usr/sbin/lucurr
    

Example 7–4 Displaying the Name of the Active Boot Environment (Command-Line Interface)

In this example, the name of the current boot environment is displayed.


# /usr/sbin/lucurr
solaris8

Changing the Name of a Boot Environment

Renaming a boot environment is often useful when you upgrade the boot environment from one Solaris release to another release. For example, following an operating system upgrade, you might rename the boot environment solaris8 to solaris10.

Use the Rename menu or lurename command to change the inactive boot environment's name.


x86 only –

Starting with the Solaris 10 1/06 release, the GRUB menu is automatically updated when you use the Rename menu or lurename command. The updated GRUB menu displays the boot environment's name in the list of boot entries. For more information about the GRUB menu, see x86: Activating a Boot Environment With the GRUB Menu.

To determine the location of the GRUB menu's menu.lst file, see x86: Locating the GRUB Menu's menu.lst File (Tasks).


Table 7–2 Limitations for Naming a Boot Environment

Limitation 

For Instructions 

The name must not exceed 30 characters in length. 

 

The name can consist only of alphanumeric characters and other ASCII characters that are not special to the UNIX shell. 

See the “Quoting” section of sh(1).

The name can contain only single-byte, 8-bit characters. 

 

The name must be unique on the system. 

 

A boot environment must have the status “complete” before you rename it.  

See Displaying the Status of All Boot Environments to determine a boot environment's status.

You cannot rename a boot environment that has file systems mounted with lumount or mount.

 

ProcedureTo Change the Name of an Inactive Boot Environment (Character User Interface)

  1. From the main menu, select Rename.

  2. Type the boot environment to rename and then the new name.

  3. To save your changes, press F3.

ProcedureTo Change the Name of an Inactive Boot Environment (Command-Line Interface)

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # lurename -e  BE_name -n  new_name
    
    -e BE_name

    Specifies the inactive boot environment name to be changed

    -n new_name

    Specifies the new name of the inactive boot environment

    In this example, second_disk is renamed to third_disk.


    # lurename -e  second_disk  -n  third_disk
    

Adding or Changing a Description Associated With a Boot Environment Name

You can associate a description with a boot environment name. The description never replaces the name. Although a boot environment name is restricted in length and characters, the description can be of any length and of any content. The description can be simple text or as complex as a gif file. You can create this description at these times:

For more information about using the -A option with lucreate

To Create a Boot Environment for the First Time (Command-Line Interface)

For more information about creating the description after the boot environment has been created 

ludesc(1M)

ProcedureTo Add or Change a Description for a Boot Environment Name With Text

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # /usr/sbin/ludesc -n  BE_name 'BE_description'
    
    -n BE_name 'BE_description'

    Specifies the boot environment name and the new description to be associated with the name


Example 7–5 Adding a Description to a Boot Environment Name With Text

In this example, a boot environment description is added to a boot environment that is named second_disk. The description is text that is enclosed in single quotes.


# /usr/sbin/ludesc -n second_disk 'Solaris 10 11/06 test build'

ProcedureTo Add or Change a Description for a Boot Environment Name With a File

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # /usr/sbin/ludesc -n BE_name -f file_name
    
    -n BE_name

    Specifies the boot environment name

    file_name

    Specifies the file to be associated with a boot environment name


Example 7–6 Adding a Description to a Boot Environment Name With a File

In this example, a boot environment description is added to a boot environment that is named second_disk. The description is contained in a gif file.


# /usr/sbin/ludesc -n second_disk -f rose.gif

ProcedureTo Determine a Boot Environment Name From a Text Description

The following command returns the name of the boot environment associated with the specified description.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # /usr/sbin/ludesc -A 'BE_description'
    
    -A 'BE_description'

    Specifies the description to be associated with the boot environment name.


Example 7–7 Determining a Boot Environment Name From a Description

In this example, the name of the boot environment, second_disk, is determined by using the -A option with the description.


# /usr/sbin/ludesc -A  'Solaris 10 11/06 test build'
 second_disk

ProcedureTo Determine a Boot Environment Name From a Description in a File

The following command displays the boot environment's name that is associated with a file. The file contains the description of the boot environment.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # /usr/sbin/ludesc -f  file_name
    
    -f file_name

    Specifies the name of the file that contains the description of the boot environment.


Example 7–8 Determining a Boot Environment Name From a Description in a File

In this example, the name of the boot environment, second_disk, is determined by using the -f option and the name of the file that contains the description.


# /usr/sbin/ludesc -f rose.gif
second_disk

ProcedureTo Determine a Boot Environment Description From a Name

This procedure displays the description of the boot environment that is named in the command.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # /usr/sbin/ludesc -n BE_name
    
    -n BE_name

    Specifies the boot environment name.


Example 7–9 Determining a Boot Environment Description From a Name

In this example, the description is determined by using the -n option with the boot environment name.


# /usr/sbin/ludesc -n  second_disk 
Solaris 10 11/06 test build

Viewing the Configuration of a Boot Environment

Use the List menu or the lufslist command to list the configuration of a boot environment. The output contains the disk slice (file system), file system type, and file system size for each boot environment mount point.

ProcedureTo View the Configuration of Each Inactive Boot Environment (Character User Interface)

  1. From the main menu, select List.

  2. To view the status of a boot environment, type the name.


    Name of Boot Environment: solaris8
    
  3. Press F3.

    The following example displays a list.


    Filesystem                fstype       size(Mb) Mounted on
    ------------------------------------------------------------------
    /dev/dsk/c0t0d0s1         swap           512.11 -
    /dev/dsk/c0t4d0s3         ufs           3738.29 /
    /dev/dsk/c0t4d0s4         ufs            510.24 /opt
  4. To return to the List menu, press F6.

ProcedureTo View the Configuration of a Boot Environment (Command-Line Interface)

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # lufslist -n BE_name
    
    BE_name

    Specifies the name of the boot environment to view file system specifics

    The following example displays a list.


    Filesystem                fstype       size(Mb) Mounted on
    ------------------------------------------------------------------
    /dev/dsk/c0t0d0s1         swap           512.11 -
    /dev/dsk/c0t4d0s3         ufs           3738.29 /
    /dev/dsk/c0t4d0s4         ufs            510.24 /opt