Solaris Live Upgrade 2.0 Guide

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

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 a swap slices to be used in the new boot environment. The location and name of this file is user-defined. In this example, the contents 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  -m mountpoint:device:fs_type \
     -M slice_list   -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

    -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 given 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.


    Example 3–5 Create a Boot Environment and Reconfigure Swap Using a List (Command-Line Interface)

    In this example, swap in the new boot environment is the list of slices that are noted in the /etc/lu/swapslices file.


    # lucreate -m /:/dev/dsk/c02t4d0s0:ufs -m /usr:/dev/dsk/c02t4d0s1:ufs \
    -M /etc/lu/swapslices -n second_disk 
    

    When creation of the new boot environment is complete, it can be upgraded and activated (made bootable).