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:
This chapter describes Solaris Live Upgrade for UFS file systems. The usage for the maintenance for a ZFS boot environment is the same. For procedures for migrating a UFS file system to a ZFS root pool or creating and installing a ZFS root pool, see Chapter 13, Creating a Boot Environment for ZFS Root Pools.
Use 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 that no copy or create operations are in progress. Also, 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 a copy operation is 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 from performing live upgrade copy, rename, or upgrade operations.
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.
Type:
# lustatus 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 - |
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.
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.
This procedure copies source files over outdated files on a boot environment that was previously created.
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.
Type:
# lumake -n BE_name [-s source_BE] [-t time] [-m email_address] |
Specifies the name of the boot environment that has file systems that are to be replaced.
(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.
(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).
(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.
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.
A boot environment's scheduled creation, upgrade, or copy job can be canceled just prior to the time the job starts. The job can be scheduled by the lumake command. At any time, only one job can be scheduled on a system.
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.
Type:
# lucancel |
The job no longer executes at the time that is specified.
Use the lucompare command 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 lucompare command generates a comparison of boot environments that includes the contents of any non-global zones.
The specified boot environment cannot have any partitions that are mounted with lumount or mount.
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.
Type:
# /usr/sbin/lucompare -i infile (or) -t -o outfile BE_name |
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.
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.
Redirect the output of differences to outfile.
Specifies the name of the boot environment that is compared to the active boot environment.
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 |
Use the ludelete command to remove a boot environment. Note the following limitations.
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.
You cannot delete a boot environment that has file systems mounted with lumount.
x86 only: Starting with the Solaris 10 1/06 release, you cannot delete a boot environment that contains the active GRUB menu. Use the lumake or luupgrade commands to reuse the boot environment. To determine which boot environment contains the active GRUB menu, see Chapter 14, Managing the Solaris Boot Archives (Tasks), in System Administration Guide: Basic Administration.
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.
Type:
# ludelete BE_name |
Specifies the name of the inactive boot environment that is to be deleted
In this example, the boot environment, second_disk, is deleted.
# ludelete second_disk |
Use 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.
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.
Type:
# /usr/sbin/lucurr |
In this example, the name of the current boot environment is displayed.
# /usr/sbin/lucurr solaris10 |
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 lurename command to change the inactive boot environment's name.
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 Booting Multiple Boot Environments.
To determine the location of the GRUB menu's menu.lst file, see Chapter 14, Managing the Solaris Boot Archives (Tasks), in System Administration Guide: Basic Administration.
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. |
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.
Type:
# lurename -e BE_name -n new_name |
Specifies the inactive boot environment name to be changed
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 |
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:
When you create a boot environment with the lucreate command and use the -A option
After the boot environment has been created by using the ludesc command
For more information about using the -A option with lucreate | |
For more information about creating the description after the boot environment has been created |
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.
Type:
# /usr/sbin/ludesc -n BE_name 'BE_description' |
Specifies the boot environment name and the new description to be associated with the name
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 10/09 test build' |
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.
Type:
# /usr/sbin/ludesc -n BE_name -f file_name |
Specifies the boot environment name
Specifies the file to be associated with a boot environment name
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 |
The following command returns the name of the boot environment associated with the specified description.
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.
Type:
# /usr/sbin/ludesc -A 'BE_description' |
Specifies the description to be associated with the boot environment name.
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 10/09 test build' second_disk |
The following command displays the boot environment's name that is associated with a file. The file contains the description of the boot environment.
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.
Type:
# /usr/sbin/ludesc -f file_name |
Specifies the name of the file that contains the description of the boot environment.
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 |
This procedure displays the description of the boot environment that is named in the command.
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.
Type:
# /usr/sbin/ludesc -n BE_name |
Specifies the boot environment 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 10/09 test build |
Use 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.
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.
Type:
# lufslist -n 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 |
For an example of a list that contains non-global zones, see To View the Configuration of a Boot Environment's Non-Global Zone File Systems.