JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 10 1/13 Installation Guide: Live Upgrade and Upgrade Planning     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

Part I Upgrading With Live Upgrade

1.  Where to Find Oracle Solaris Installation Planning Information

2.  Live Upgrade (Overview)

3.  Live Upgrade (Planning)

4.  Using Live Upgrade to Create a Boot Environment (Tasks)

Installing Live Upgrade and Creating Boot Environments (Task Map)

Installing Live Upgrade

How to Install Live Upgrade With the pkgadd Command

How to Install Live Upgrade With the Oracle Solaris Installation Program

Installing Patches Needed by Live Upgrade

How to Install Required Patches

Creating a New Boot Environment

How to Create a Boot Environment for the First Time

How to Create a Boot Environment and Merge File Systems

How to Create a Boot Environment and Split File Systems

How to Create a Boot Environment and Reconfiguring Swap

How to Create a Boot Environment and Reconfigure Swap by Using a List

How to Create a Boot Environment and Copy a Shareable File System

How to Create a Boot Environment From a Different Source

How to Create an Empty Boot Environment for a Flash Archive

How to Create a Boot Environment With RAID-1 Volumes (Mirrors)

Creating a Boot Environment and Customizing the Content

5.  Upgrading With Live Upgrade (Tasks)

6.  Failure Recovery: Falling Back to the Original Boot Environment (Tasks)

7.  Maintaining Live Upgrade Boot Environments (Tasks)

8.  Upgrading the Oracle Solaris OS on a System With Non-Global Zones Installed

9.  Live Upgrade Examples

Part II Upgrading and Migrating With Live Upgrade to a ZFS Root Pool

10.  Live Upgrade and ZFS (Overview)

11.  Live Upgrade for ZFS (Planning)

12.  Creating a Boot Environment for ZFS Root Pools

13.  Live Upgrade for ZFS With Non-Global Zones Installed

Part III Appendices

A.  Live Upgrade Command Reference

B.  Troubleshooting (Tasks)

C.  Additional SVR4 Packaging Requirements (Reference)

D.  Using the Patch Analyzer When Upgrading (Tasks)

Glossary

Index

Creating a New Boot Environment

Creating a boot environment provides a method of copying critical file systems from the active boot environment to a new boot environment. The lucreate command enables reorganizing a disk if necessary, customizing file systems, and copying the critical file systems to the new boot environment.

Before file systems are copied to the new boot environment, they can be customized so that critical file system directories are either merged into their parent directory or split from their parent directory. User-defined (shareable) file systems are shared between boot environments by default. But shareable file systems can be copied if needed. Swap, which is a shareable volume, can be split and merged also. For an overview of critical and shareable file systems, see File System Types.


Note - This chapter describes Live Upgrade for UFS file systems. For procedures for migrating a UFS file system to a ZFS root pool or creating and installing a ZFS root pool, see Chapter 12, Creating a Boot Environment for ZFS Root Pools.


The lucreate command that is used with the -m option specifies which file systems and the number of file systems to be created in the new boot environment. You must specify the exact number of file systems you want to create by repeating this option. For example, a single use of the -m option specifies where to put all the file systems. You merge all the file systems from the original boot environment into the one file system that is specified by the -m option. If you specify the -m option twice, you create two file systems. When using the -m option to create file systems, follow these guidelines:

How to Create a Boot Environment for the First Time

Example 4-1 Creating a Boot Environment

In this example, the active boot environment is named first_disk. The mount points for the file systems are noted by using the -m option. Two file systems are created, root (/) and /usr. The new boot environment is named second_disk. A description, mydescription, is associated with the name second_disk. Swap, in the new boot environment second_disk, is automatically shared from the source, first_disk.

# lucreate -A 'mydescription' -c first_disk  -m /:/dev/dsk/c0t4d0s0:ufs \
-m /usr:/dev/dsk/c0t4d0s3:ufs  -n second_disk

How to Create a Boot Environment and Merge File Systems


Note - You can use the lucreate command with the -m option to specify which file systems and the number of file systems to be created in the new boot environment. You must specify the exact number of file systems you want to create by repeating this option. For example, a single use of the -m option specifies where to put all the file systems. You merge all the file systems from the original boot environment into one file system. If you specify the -m option twice, you create two file systems.


Example 4-2 Creating a Boot Environment and Merging File Systems

In this example, the file systems on the current boot environment are root (/), /usr, and /opt. The /opt file system is combined with its parent file system /usr. The new boot environment is named second_disk. A description, mydescription, is associated with the name second_disk.

# lucreate -A 'mydescription' -c first_disk \
 -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s1:ufs \
 -m /usr/opt:merged:ufs -n second_disk

How to Create a Boot Environment and Split File Systems


Note - When creating file systems for a boot environment, the rules are identical to the rules for creating file systems for the Oracle Solaris OS. Live Upgrade cannot prevent you from making invalid configurations on critical file systems. For example, you could enter an lucreate command that would create separate file systems for root (/) and /kernel, which is an invalid division of the root (/) file system.


When splitting a directory into multiple mount points, hard links are not maintained across file systems. For example, if /usr/stuff1/file is hard linked to /usr/stuff2/file, and /usr/stuff1 and /usr/stuff2 are split into separate file systems, the link between the files no longer exists. lucreate issues a warning message and a symbolic link is created to replace the lost hard link.

Example 4-3 Creating a Boot Environment and Splitting File Systems

In this example, the preceding command splits the root (/) file system over multiple disk slices in the new boot environment. Assume a source boot environment that has /usr, /var, and /opt on root (/): /dev/dsk/c0t0d0s0 /.

On the new boot environment, separate /usr, /var, and /opt, mounting these file systems on their own slices, as follows:

/dev/dsk/c0t1d0s0 /

/dev/dsk/c0t1d0s1 /var

/dev/dsk/c0t1d0s7 /usr

/dev/dsk/c0t1d0s5 /opt

A description, mydescription, is associated with the boot environment name second_disk.

# lucreate -A 'mydescription' -c first_disk \
 -m /:/dev/dsk/c0t1d0s0:ufs -m /usr:/dev/dsk/c0t1d0s7:ufs  \ 
-m /var:/dev/dsk/c0t1d0s1:ufs -m /opt:/dev/dsk/c0t1d0s5:ufs \ 
-n second_disk

Next Steps

When creation of the new boot environment is complete, it can be upgraded and activated (made bootable). See Chapter 5, Upgrading With Live Upgrade (Tasks).

How to Create a Boot Environment and Reconfiguring Swap

Swap slices are shared between boot environments by default. By not specifying swap with the -m option, your current and new boot environment share the same swap slices. If you want to reconfigure the new boot environment's swap, use the -m option to add or remove swap slices in the new boot environment.


Note - The swap slice cannot be in use by any boot environment except the current boot environment or if the -s option is used, the source boot environment. The boot environment creation fails if the swap slice is being used by any other boot environment, whether it is a swap, UFS, or any other file system.

You can create a boot environment with the existing swap slices and then edit the vfstab file after the creation.


Example 4-4 Creating a Boot Environment and Reconfiguring Swap

In this example, the current boot environment contains root (/) on /dev/dsk/c0t0d0s0 and swap is on /dev/dsk/c0t0d0s1. The new boot environment copies root (/) to /dev/dsk/c0t4d0s0 and uses both /dev/dsk/c0t0d0s1 and /dev/dsk/c0t4d0s1 as swap slices. A description, mydescription, is associated with the boot environment name second_disk.

# lucreate -A 'mydescription' -c first_disk \ 
-m /:/dev/dsk/c0t4d0s0:ufs -m -:/dev/dsk/c0t0d0s1:swap \ 
-m -:/dev/dsk/c0t4d0s1:swap -n second_disk 

These swap assignments are effective only after booting from second_disk. If you have a long list of swap slices, use the -M option. See How to Create a Boot Environment and Reconfigure Swap by Using a List.

How to Create a Boot Environment and Reconfigure Swap by Using a List

If you have a long list of swap slices, create a swap list. lucreate uses this list for the swap slices in the new boot environment.


Note - The swap slice cannot be in use by any boot environment except the current boot environment or if the -s option is used, the source boot environment. The boot environment creation fails if the swap slice is being used by any other boot environment, whether the swap slice contains a swap, UFS, or any other file system.


  1. Create a list of swap slices to be used in the new boot environment.

    The location and name of this file is user defined. In this example, the content of the /etc/lu/swapslices file is a list of devices and slices:

    -:/dev/dsk/c0t3d0s2:swap
    -:/dev/dsk/c0t3d0s2:swap
    -:/dev/dsk/c0t4d0s2:swap
    -:/dev/dsk/c0t5d0s2:swap
    -:/dev/dsk/c1t3d0s2:swap
    -:/dev/dsk/c1t4d0s2:swap
    -:/dev/dsk/c1t5d0s2:swap
  2. Type:
    # lucreate  [-A 'BE_description'] \
     -m mountpoint:device[,metadevice]:fs_options \
    -M slice_list  -n BE_name
    -A 'BE_description'

    (Optional) Enables the creation of a boot environment description that is associated with the boot environment name (BE_name). The description can be any length and can contain any characters.

    -m mountpoint:device[,metadevice]:fs_options [-m...]

    Specifies the file systems' configuration of the new boot environment. The file systems that are specified as arguments to -m can be on the same disk or they can be spread across multiple disks. Use this option as many times as needed to create the number of file systems that are needed.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager metadevice, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/vx/dsk/volume_name

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap volume. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be applied to the file systems. These keywords can create a logical device, change the configuration of a logical device, or delete a logical device. For a description of these keywords, see How to Create a Boot Environment With RAID-1 Volumes (Mirrors).

    -M slice_list

    List of -m options, which are collected in the file slice_list. Specify these arguments in the format that is specified for -m. Comment lines, which begin with a hash mark (#), are ignored. The -M option is useful when you have a long list of file systems for a boot environment. Note that you can combine -m and -M options. For example, you can store swap slices in slice_list and specify root (/) and /usr slices with -m.

    The -m and -M options support the listing of multiple slices for a particular mount point. In processing these slices, lucreate skips any unavailable slices and selects the first available slice.

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique.

    When creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 5, Upgrading With Live Upgrade (Tasks).

Example 4-5 Create a Boot Environment and Reconfiguring Swap By Using a List

In this example, swap in the new boot environment is the list of slices that are noted in the /etc/lu/swapslices file. A description, mydescription, is associated with the name second_disk.

# lucreate -A 'mydescription' -c first_disk \ 
-m /:/dev/dsk/c02t4d0s0:ufs -m /usr:/dev/dsk/c02t4d0s1:ufs \ 
-M /etc/lu/swapslices -n second_disk 

How to Create a Boot Environment and Copy a Shareable File System

If you want a shareable file system to be copied to the new boot environment, specify the mount point to be copied with the -m option. Otherwise, shareable file systems are shared by default, and maintain the same mount point in the vfstab file. Any updating that is applied to the shareable file system is available to both boot environments.

Example 4-6 Creating a Boot Environment and Copying a Shareable File System

In this example, the current boot environment contains two file systems, root (/) and /home. In the new boot environment, the root (/) file system is split into two file systems, root (/) and /usr. The /home file system is copied to the new boot environment. A description, mydescription, is associated with the boot environment name second_disk.

# lucreate -A 'mydescription' -c first_disk \ 
-m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s3:ufs \
-m /home:/dev/dsk/c0t4d0s4:ufs -n second_disk

How to Create a Boot Environment From a Different Source

The lucreate command creates a boot environment that is based on the file systems in the active boot environment. If you want to create a boot environment based on a boot environment other than the active boot environment, use lucreate with the -s option.


Note - If you activate the new boot environment and need to fall back, you boot back to the boot environment that was last active, not the source boot environment.


Example 4-7 Creating a Boot Environment From a Different Source

In this example, a boot environment is created that is based on the root (/) file system in the source boot environment named third_disk. third_disk is not the active boot environment. A description, mydescription, is associated with the new boot environment named second_disk.

# lucreate -A 'mydescription' -s third_disk \ 
-m /:/dev/dsk/c0t4d0s0:ufs  -n second_disk

How to Create an Empty Boot Environment for a Flash Archive

The lucreate command creates a boot environment that is based on the file systems in the active boot environment. When using the lucreate command with the -s - option, lucreate quickly creates an empty boot environment. The slices are reserved for the file systems that are specified, but no file systems are copied. The boot environment is named, but not actually created until installed with a Flash Archive. When the empty boot environment is installed with an archive, file systems are installed on the reserved slices.

Example 4-8 Creating an Empty Boot Environment for a Flash Archive

In this example, a boot environment is created but contains no file systems. A description, mydescription, is associated with the new boot environment that is named second_disk.

# lucreate -A 'mydescription' -s - \ 
-m /:/dev/dsk/c0t1d0s0:ufs  -n second_disk

When creation of the empty boot environment is complete, a Flash archive can be installed and can be activated (made bootable). See Chapter 5, Upgrading With Live Upgrade (Tasks).

For an example of creating and populating an empty boot environment, see Example of Creating an Empty Boot Environment and Installing a Flash Archive .

How to Create a Boot Environment With RAID-1 Volumes (Mirrors)

When you create a boot environment, Live Upgrade uses Solaris Volume Manager technology to create RAID-1 volumes. When creating a boot environment, you can use Live Upgrade to manage the following tasks.

Before You Begin

To use the mirroring capabilities of Live Upgrade, you must create a state database and a state database replica. A state database stores information about disk about the state of your Solaris Volume Manager configuration.

Example 4-9 Creating a Boot Environment With a Mirror and Specifying Devices

In this example, the mount points for the file systems are specified by using the -m option.

# lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d10:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0,/dev/md/dsk/d1:attach \ 
-m /:/dev/dsk/c0t1c0s0,/dev/md/dsk/d2:attach -n another_disk

Example 4-10 Creating a Boot Environment With a Mirror and Not Specifying a Submirror Name

In this example, the mount points for the file systems are specified by using the -m option.

# lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d10:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0:attach \ 
-m /:/dev/dsk/c0t1d0s0:attach -n another_disk

When the creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 5, Upgrading With Live Upgrade (Tasks).

Example 4-11 Creating a Boot Environment and Detaching a Submirror

In this example, the mount points for the file systems are specified by using the -m option.

# lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d10:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0,/dev/md/dsk/d1:detach,attach,preserve \ 
-m /:/dev/dsk/c0t1d0s0,/dev/md/dsk/d2:attach -n another_disk

When the creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 5, Upgrading With Live Upgrade (Tasks).

Example 4-12 Creating a Boot Environment, Detaching a Submirror, and Saving Its Contents

In this example, the mount points for the file systems are specified by using the -m option.

# lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d20:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0:detach,attach,preserve \ 
-n another_disk

When the creation of the new boot environment is complete, the boot environment can be upgraded and can be activated (made bootable). See Chapter 5, Upgrading With Live Upgrade (Tasks).

Example 4-13 Creating a Boot Environment With Two Mirrors

In this example, the mount points for the file systems are specified by using the -m option.

# lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d10:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0,/dev/md/dsk/d1:attach \ 
-m /:/dev/dsk/c0t1d0s0,/dev/md/dsk/d2:attach \ 
-m /opt:/dev/md/dsk/d11:ufs,mirror \ 
-m /opt:/dev/dsk/c2t0d0s1,/dev/md/dsk/d3:attach \ 
-m /opt:/dev/dsk/c3t1d0s1,/dev/md/dsk/d4:attach -n another_disk

When the creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 5, Upgrading With Live Upgrade (Tasks).

Creating a Boot Environment and Customizing the Content

The content of the file system on the new boot environment can be modified by using the inclusion and exclusion options. Directories and files are not copied to the new boot environment.

The inclusion and exclusion options appear in the lucreate command syntax as follows:

# lucreate -m mountpoint:device[,metadevice]:fs_options [-m ...]  \ 
[-x exclude-dir] [-y include] \
[-Y include-list-file] \
[-f exclude-list-file]\  
[-z filter-list] [-I] -n BE_name
-x exclude-dir

Excludes files and directories by not copying them to the new boot environment. You can use multiple instances of this option to exclude more than one file or directory.

exclude-dir is the name of the directory or file.

-y include-dir

Copies directories and files that are listed to the new boot environment. This option is used when you have excluded a directory but want to restore individual subdirectories or files.

include-dir is the name of the subdirectory or file to be included.

-Y list-filename

Copies directories and files from a list to the new boot environment. This option is used when you have excluded a directory but want to restore individual subdirectories or files.

  • list-filename is the full path to a file that contains a list.

  • The list-filename file must contain one file per line.

  • If a line item is a directory, all subdirectories and files beneath that directory are included. If a line item is a file, only that file is included.

-f list-filename

Uses a list to exclude directories and files by not copying them to the new boot environment.

  • list-filename is the full path to a file that contains a list.

  • The list-filename file must contain one file per line.

-z list-filename

Uses a list to copy directories and files to the new boot environment. Each file or directory in the list is noted with a plus “+” or minus “-”. A plus indicates an included file or directory and the minus indicates an excluded file or directory.

  • list-filename is the full path to a file that contains a list.

  • The list-filename file must contain one file per line. A space must follow the plus or minus before the file name.

  • If a line item is a directory and is indicated with a + (plus), all subdirectories and files beneath that directory are included. If a line item is a file and is indicated with a + (plus), only that file is included.

-I

Overrides the integrity check of system files. Use this option with caution.

To prevent you from removing important system files from a boot environment, lucreate runs an integrity check. This check examines all files that are registered in the system package database and stops the boot environment creation if any files are excluded. Use of this option overrides this integrity check. This option creates the boot environment more quickly, but might not detect problems.