Solaris 10 10/08 Installation Guide: Solaris Live Upgrade and Upgrade Planning

ProcedureHow to Create a Boot Environment on a New ZFS Root Pool

  1. Complete the following steps the first time you perform a Solaris Live Upgrade.


    Note –

    Using Solaris Live Upgrade to create new ZFS boot environments requires at least the Solaris 10 10/08 release to be installed. Previous releases do not have the ZFS and Solaris Live Upgrade software to perform the tasks.


    1. Remove existing Solaris Live Upgrade packages on your system if necessary. If you are upgrading to a new release, you must install the packages from that release

      The three Solaris Live Upgrade packages, SUNWluu, SUNWlur, and SUNWlucfg, comprise the software needed to upgrade by using Solaris Live Upgrade. These packages include existing software, new features, and bug fixes. If you do not remove the existing packages and install the new packages on your system before using Solaris Live Upgrade, upgrading to the target release fails.


      Note –

      The SUMWlucfg package is new starting with the Solaris 10 8/07 release. If you are using Solaris Live Upgrade packages from a previous release, you do not need to remove this package.



      # pkgrm SUNWlucfg SUNWluu SUNWlur
      
    2. Install the new Solaris Live Upgrade packages. For instructions, see  Installing Solaris Live Upgrade.

    3. Before installing or running Solaris Live Upgrade, you are required to install the following patches. These patches ensure that you have all the latest bug fixes and new features in the release.

      Ensure that you have the most recently updated patch list by consulting SunSolve. Search for the info doc 206844 (formerly 72099) on the SunSolve web site.

      • Become superuser or assume an equivalent role.

      • If you are storing the patches on a local disk, create a directory such as /var/tmp/lupatches and download the patches to that directory.

      • From the SunSolve web site, obtain the list of patches.

      • Change to the patch directory.


        # cd /var/tmp/lupatches
        
      • Install the patches with the patchadd command.


        # patchadd patch_id
        

        patch_id is the patch number or numbers. Separate multiple patch names with a space.


        Note –

        The patches need to be applied in the order that is specified in info doc 206844.


      • Reboot the system if necessary. Certain patches require a reboot to be effective.

        x86 only: Rebooting the system is required or Solaris Live Upgrade fails.


        # init 6
        
  2. Create a ZFS root pool.

    The ZFS root pool must be on a single slice to be bootable and upgradeable.


    # zpool create rpool2 c0t1d0s5
    
    rpool2

    Names of the new ZFS root pool.

    c0t1d0s5

    Specifies to place rpool2 on the bootable slice, c0t1d0s5.

    For information about creating a new root pool, see the Solaris ZFS Administration Guide.

  3. Create the new boot environment.


    # lucreate [-c zfsBE] -n new-zfsBE -p rpool2
    
    -c zfsBE

    Assigns the name zfsBE to the current ZFS boot environment.

    -n new-zfsBE

    Assigns the name to the boot environment to be created. The name must be unique on the system.

    -p rpool2

    Places the newly created ZFS root boot environment into the ZFS root pool defined in rpool2.

    The creation of the new ZFS boot environment might take a while. The file system data is being copied to the new ZFS root pool. When the inactive boot environment has been created, you can use the luupgrade or luactivate command to upgrade or activate the new ZFS boot environment.

  4. (Optional) Verify that the boot environment is complete.

    The lustatus command reports whether the boot environment creation is complete and bootable.


    # lustatus
    boot environment   Is        Active  Active     Can	    Copy 
    Name               Complete  Now	 OnReboot   Delete	 Status 
    ------------------------------------------------------------------------ 
    zfsBE                       yes      yes     yes        no        - 
    new-zfsBE                   yes      no      no         yes        -
  5. (Optional) Verify the basic dataset information on the system.

    The following example displays the names of all datasets on the system. The mount point listed for the new boot environment are temporary until the luactivate command is executed. The new boot environment shares the volumes, rpool2/dump and rpool2/swap, with the rpool2 ZFS boot environment.


    # zfs list
    NAME                             USED    AVAIL   REFER   MOUNTPOINT 
    rpool2                           9.29G    57.6G     20K   /rpool2 
    rpool2/ROOT/                     5.38G    57.6G     18K   /rpool2/ROOT 
    rpool2/ROOT/new-zfsBE            5.38G    57.6G    551M  /tmp/.new.luupdall.109859
    rpool2/dump                      3.99G        -   3.99G   - 
    rpool2/swap                      3.99G        -   3.99G   - 
    rpool                            9.29G    57.6G     20K   /.new.lulib.rs.109262
    rpool/ROOT                       5.46G    57.6G     18K   legacy
    rpool/ROOT/zfsBE                 5.46G    57.6G    551M  
    rpool/dump                       3.99G        -   3.99G   - 
    rpool/swap                       3.99G        -   3.99G   - 

    You can now upgrade and activate the new boot environment. See Example 13–3.


Example 13–3 Creating a Boot Environment on a New Root Pool

In this example, a new ZFS root pool, rpool, is created on a separate slice, c0t2s0s5. The lucreate command creates a new ZFS boot environment, new-zfsBE. The -p option is required, because the boot environment is being created in a different root pool.


# zpool create rpool C0t1d0s5
# zfs list
NAME                             USED    AVAIL   REFER   MOUNTPOINT 
rpool2                           9.29G    57.6G     20K   /rpool2 
rpool                            9.29G    57.6G     20K   /.new.lulib.rs.109262
rpool/ROOT					             5.46G    57.6G     18K   legacy
rpool/ROOT/zfsBE                 5.46G    57.6G    551M  
rpool/dump                       3.99G        -   3.99G   - 
rpool/swap                       3.99G        -   3.99G   - 

# lucreate -c rpool -n new-zfsBE -p rpool2
Analyzing system configuration.
Current boot environment is named <rpool>.
Creating initial configuration for primary boot environment <rpool>.
The device </dev/dsk/c0t0d0> is not a root device for any 
boot environment; cannot get BE ID.
PBE configuration successful: PBE name <rpool> PBE Boot 
Device </dev/dsk/rpool>.
Comparing source boot environment <rpool> file systems with 
the file system(s) you specified for the new boot environment. 
Determining which file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Updating system configuration files.
The device </dev/dsk/c1t0d0s0> is not a root device for any 
boot environment; cannot get BE ID.
Creating configuration for boot environment <new-zfsBE>.
Source boot environment is <rpool>.
Creating boot environment <new-zfsBE>.
Creating file systems on boot environment <new-zfsBE>.
Creating <zfs> file system for </> in zone <global> on 
<rpool2/ROOT/new-zfsBE>.
Populating file systems on boot environment <new-zfsBE>.
Checking selection integrity.
Integrity check OK.
Populating contents of mount point </>.
Copying.
Creating shared file system mount points.
Creating compare databases for boot environment <zfsBE>.
Creating compare database for file system </>.
Making boot environment <new-zfsBE> bootable.
Creating boot_archive for /.alt.tmp.b-cBc.mnt
updating /.alt.tmp.b-cBc.mnt/platform/sun4u/boot_archive
Population of boot environment <new-zfsBE> successful.
Creation of boot environment <new-zfsBE> successful.

# lustatus
boot environment   Is        Active  Active     Can	    Copy 
Name               Complete  Now	OnReboot   Delete	 Status 
------------------------------------------------------------------------ 
zfsBE                yes      yes     yes        no        - 
new-zfsBE            yes      no      no         yes        -
# zfs list
NAME                             USED    AVAIL   REFER   MOUNTPOINT 
rpool2                           9.29G    57.6G     20K   /rpool2 
rpool2/ROOT/                     5.38G    57.6G     18K   /rpool2/ROOT 
rpool2/ROOT/new-zfsBE            5.38G    57.6G    551M   /tmp/.new.luupdall.109859
rpool2/dump                      3.99G        -   3.99G   - 
rpool2/swap                      3.99G        -   3.99G   - 
rpool                            9.29G    57.6G     20K   /.new.lulib.rs.109262
rpool/ROOT                       5.46G    57.6G     18K   legacy
rpool/ROOT/zfsBE                 5.46G    57.6G    551M  
rpool/dump                       3.99G        -   3.99G   - 
rpool/swap                       3.99G        -   3.99G   -