Solaris Live Upgrade 2.0 Guide

To Create a Boot Environment and Reconfigure Swap (Command-Line Interface)

Swap slices are shared between boot environments by default. By NOT specifying swap with the -m option, your current and inactive 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.


  1. Log in as superuser.

  2. Type:


    # lucreate  -m mountpoint:device:fs_type \
    -m -:device:swap -n BE_name
    

    -m mountpoint:device:fs_type

    Specifies the vfstab information for 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.

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

    • device field can be one of the following:

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

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

    • fs_type field can be one of the following:

      • vxfs, which indicates a Veritas file system

      • swap, which indicates a swap file system

      • ufs, which indicates a UFS file system

    -n BE_name

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

    The new boot environment is created with swap moved to a different slice or device.


    Example 3–4 Creating a Boot Environment and Reconfigure Swap (Command-Line Interface)

    In this example, the new boot environment uses both /dev/dsk/c0t0d0s1 and /dev/dsk/c0t4d0s1 as swap slices:


    # lucreate -m /:/dev/dsk/c0t4d0s0:ufs -m -:/dev/dsk/c0t0d0s1:swap \
     -m -:/dev/dsk/c0t0d0s1: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 To Create a Boot Environment and Reconfigure Swap Using a List (Command-Line Interface).