内に含ま
その他のドキュメント
サポート リソース
| PDF 文書ファイルをダウンロードする (611 KB)
Maintaining Solaris Live Upgrade Boot Environments
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 5–1 Overview of Solaris Live Upgrade Maintenance
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:
-
Name – Name of each boot environment
-
Complete – Indicates if all scheduled copy or creation
operations are finished and the boot environment can be booted. Any current
activity or failure in a create or upgrade operation causes a boot environment
to be incomplete. For example, if
there is a copy operation in process or scheduled for a boot environment,
that boot environment is considered incomplete.
-
Active – Indicates if this is the active boot environment.
-
ActiveOnReboot – Indicates if the boot environment becomes
active on next reboot of the system.
-
CopyStatus – Indicates if the creation or copy of the
boot environment is scheduled, active, or in the process of being upgraded.
A status of SCHEDULED prevents you performing live upgrade
copy, rename, or upgrade operations.
To Display the Status of All Boot Environments (Character Interface)
-
From the main menu, select Status.
A table similar to the following is displayed:
BE_name Complete Active ActiveOnReboot CopyStatus
------------------------------------------------------------------------
disk_a_S7 yes yes yes -
disk_b_S7database yes no no SCHEDULED
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
pending.
To Display the Status of All Boot Environments (Command-Line Interface)
-
Log in as superuser.
-
Type:
|
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.
BE_name Complete Active ActiveOnReboot CopyStatus
------------------------------------------------------------------------
disk_a_S7 yes yes yes -
disk_b_S7database yes no no SCHEDULED
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 pending.
Updating a Previously Configured Boot Environment
You can update the contents of a previously configured boot environment
with the Copy menu or lumake(1M). File
systems from the active (source) boot environment are copied to the target
boot environment and the data on the target is 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)
-
From the main menu, select Copy.
-
Type the name of the inactive boot environment to update:
Name of Target Boot Environment: solaris8
|
-
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 created previously.
-
Log in as superuser.
-
Type:
# lumake -t time -s source_BE -n BE_name -m email_address
|
|
-t time
|
(Optional) Set
up a batch job to copy over the 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).
|
|
-n BE_name
|
Specifies the name of the boot environment whose file systems
are to be replaced.
|
|
-s source_BE
|
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.
|
|
-m email_address
|
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 5–1 Updating a Previously Configured Boot Environment (Command-Line Interface)
In this example, file systems from first_disk are copied to second_disk
at 8:15 p.m. When the job is completed, an email is sent to Joe at anywhere.com.
# lumake -t 8:15 PM -s first_disk -n second_disk -m joe@anywhere.com
|
The copy occurs at 8:15 PM 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 up to the time the job starts. A job can be scheduled for a specific
time 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(1M) command. There can be only one job scheduled
at a time on a system.
To Cancel a Scheduled Create, Upgrade, or Copy Job (Character Interface)
-
From the main menu, select Cancel.
-
To view a list of boot environments available for canceling, press F2.
-
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)
-
Log in as superuser.
-
Type:
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(1M) or mount(1M).
To Compare Boot Environments (Character Interface)
-
From the main menu, select Compare.
-
Select either Compare to Original or Compare to an Active Boot Environment.
-
Press F3.
-
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
|
-
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
-
To return to the Compare menu, press F3.
To Compare Boot Environments (Command-Line Interface)
-
Log in as superuser.
-
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 text file in the file system.
Use either this option or -i, not both options.
|
|
-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 5–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 one that is
not participating in an operation that will change its status. See Displaying the Status of All Boot Environments
for procedures to determine a boot environment's status. Also, you cannot
delete a boot environment that has file systems mounted with lumount(1M).
To Delete an Inactive Boot Environment (Character Interface)
-
From the main menu, select Delete.
-
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)
-
Log in as superuser.
-
Type:
|
BE_name
|
Specifies the name of the inactive boot environment that is to be deleted.
|
Example 5–3 Deleting an Inactive Boot Environment (Command-line Interface)
In this example, the boot environment, second_disk, is deleted.
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)
-
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)
-
Type:
# /usr/sbin/lucurr -m mount_point
|
|
-m mount_point
|
Returns the name of the boot environment that owns mount_point. The name can be a mount point of the current boot
environment or another boot environment. If the latter is true, the file system
of the boot environment must have been mounted with lumount(1M)
or mount(1M) before you entered this option.
|
Example 5–4 Displaying the Name of the Active Boot Environment (Command-Line Interface)
In this example, the name of the current boot environment is displayed.
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. 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 can contain only single-byte, 8–bit characters. Also,
the new name must adhere to the following:
-
Not exceed 30 characters in length.
-
Consist only of alphanumeric characters and other ASCII characters
that are not special to the UNIX shell. See the “Quoting” section
of sh(1M) .
-
Contain only single-byte, 8–bit characters
-
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(1M) or mount(1M).
To Change the Name of an Inactive Boot Environment (Character Interface)
-
From the main menu, select Rename.
-
Type the boot environment to rename and then the new name.
-
To save your changes, press F3.
To Change the Name of an Inactive Boot Environment (Command-Line Interface)
-
Log in as superuser.
-
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
|
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)
-
From the main menu, select List.
-
To view the status of a boot environment, type the name.
Name of Boot Environment: solaris8
|
-
Press F3.
The following is an example of 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
|
-
To return to the List menu, press F6.
To View the Configuration a Boot Environment (Command-Line Interface)
-
Log in as superuser.
-
Type:
|
BE_name
|
Specifies the name of the boot environment to view file system specifics.
|
The following is an example of 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
|
Note –
In this example, you could not perform copy, rename, or upgrade
operations on disk_b_S8, because the operation is not complete,
nor on disk_b_S7database, because a live upgrade operation
is pending.
|