Solaris 9 Installation Guide

Chapter 34 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 34–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:

To Display the Status of All Boot Environments (Character Interface)

  1. From the main menu, select Status.

    A table that is similar to the following is displayed:


    BE_name             Complete  Active  ActiveOnReboot  CopyStatus
    ------------------------------------------------------------------------
    disk_a_S7            yes       yes     yes              -         
    disk_b_S7database    yes       no      no              COPYING     
    disk_b_S8            no        no      no               - 

    Note –

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


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

  1. Log in as superuser.

  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  
    


    BE_name             Complete  Active  ActiveOnReboot  CopyStatus
    ------------------------------------------------------------------------
    disk_a_S7            yes       yes     yes              -         
    disk_b_S7database    yes       no      no              COPYING     
    disk_b_S8            no        no      no               - 


    Note –

    You could not perform copy, rename, or upgrade operations on disk_b_S8 because it is not complete, nor on disk_b_S7database 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.

To Update a Previously Configured Boot Environment (Character 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 on 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.

To 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. Log in as superuser.

  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 email 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 34–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.

To Cancel a Scheduled Create, Upgrade, or Copy Job (Character 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.

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

  1. Log in as superuser.

  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.

To Compare Boot Environments (Character 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.

To Compare Boot Environments (Command-Line Interface)

  1. Log in as superuser.

  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 be an absolute file name. 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 34–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 ludelete. You cannot delete the active boot environment or the boot environment that is activated on the next reboot. The boot environment to be deleted must be complete. A complete boot environment is not participating in an operation that will change its status. Use Displaying the Status of All Boot Environments to determine a boot environment's status. Also, you cannot delete a boot environment that has file systems mounted with lumount.

To Delete an Inactive Boot Environment (Character 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.

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

  1. Log in as superuser.

  2. Type:


    # ludelete BE_name
    

    BE_name

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


    Example 34–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.

To Display the Name of the Active Boot Environment (Character Interface)

  1. From the main menu, select Current.

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

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

  1. Type:


    # /usr/sbin/lucurr
    

    Example 34–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 solaris7 to solaris8. Use the Rename menu or lurename command to change the inactive boot environment's name.

The new name must adhere to the following limitations.

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.

To Change the Name of an Inactive Boot Environment (Character 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.

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

  1. Log in as superuser.

  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 on using the -A option with lucreate, see To Create a Boot Environment for the First Time (Command-Line Interface). For more information on creating the description after the boot environment has been created, see the following procedures or the man page, ludesc(1M).

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

  1. Log in as superuser.

  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 34–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 a text file that is enclosed in single quotes.


    # /usr/sbin/ludesc -n second_disk 'Solaris 9 test build, January 2001.'
    

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

  1. Log in as superuser.

  2. Type:


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

    -n BE_name

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

    -f

    file_name

    Specifies the file to be associated with a boot environment name 


    Example 34–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
    

To Determine a Boot Environment Name From a Text Description

  1. Log in as superuser.

  2. Type:


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

-A 'BE_description'

Displays the boot environment name that is associated with the description 


Example 34–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 9 test build, January 2001.'
second_disk

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

  1. Log in as superuser.

  2. Type:


    # /usr/sbin/ludesc -f  file_name
    

    -f file_name

    Displays the boot environment name that is associated with the description that is located in a file 


    Example 34–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

To Determine a Boot Environment Description From a Name

  1. Log in as superuser.

  2. Type:


    # /usr/sbin/ludesc -n BE_name
    

    -n BE_name

    Displays the description that is associated with the boot environment name 


    Example 34–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_diskSolaris 9 test build, January 2001

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.

To View the Configuration of Each Inactive Boot Environment (Character 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.

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

  1. Log in as superuser.

  2. Type:


    # lufslist 
    

    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