Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
32.  Using Solaris Live Upgrade to Create a Boot Environment (Tasks) Creating a New Boot Environment To Create a Boot Environment and Split File Systems (Command-Line Interface)  Previous   Contents   Next 
   
 

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


  1. Log in as superuser.

  2. Type:

    # lucreate  [-A 'BE_description'] -m mountpoint:device:fs_type \
    -m -:device:swap -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:fs_type [-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/cnumdnumtnumsnum

      • 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_type 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 file system. The swap mount point must be a - (hyphen).

    -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 32-4 Creating a Boot Environment and Reconfigure Swap (Command-Line Interface)

    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, Solaris 9 test Jan. 2001, is associated with the boot environment name second_disk.

    # lucreate -A 'Solaris 9 test Jan 2001' -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, it is useful to use the -M option. See "To Create a Boot Environment and Reconfigure Swap Using a List (Command-Line Interface)".

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


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 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:fs_type \
     -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:fs_type [-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/cnumdnumtnumsnum

      • 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_type 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 file system. The swap mount point must be a - (hyphen).

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


    Example 32-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. A description, Solaris 9 test Jan. 2001, is associated with the name second_disk.

    # lucreate -A 'Solaris 9 test Jan 2001' -c first_disk \
    -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). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


To Create a Boot Environment and Copy a Shareable File System (Command-Line Interface)

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.

  1. Log in as superuser.

  2. Create the boot environment.

    # lucreate [-A 'BE_description'] -m mountpoint:device:fs_type \
    [-m ]mountpoint:device:fs_type  -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:fs_type [-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/cnumdnumtnumsnum

      • 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_type 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 file system. The swap mount point must be a - (hyphen).

    -n BE_name

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


    Example 32-6 Creating a Boot Environment and Copying a Shareable File System (Command-Line Interface)

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

    # lucreate -A 'Solaris 9 test Jan 2001' -c first_disk \
    -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s3:ufs \
    -m /home:/dev/dsk/c0t4d0s4:ufs -n second_disk

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


To Create a Boot Environment From a Different Source (Command-Line Interface)

The lucreate command creates a boot environment 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.


  1. Log in as superuser.

  2. Create the boot environment.

    # lucreate [-A 'BE_description'] -s source_BE_name
    -m mountpoint:device:fs_type -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.

    -s source_BE_name

    Specifies the source boot environment for the new boot environment. The source would not be the active boot environment.

    -m mountpoint:device:fs_type [-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/cnumdnumtnumsnum

      • 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_type 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 file system. The swap mount point must be a - (hyphen).

    -n BE_name

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


    Example 32-7 Creating a Boot Environment From a Different Source (Command-Line Interface)

    In this example, a boot environment is created based on the root (/) file system in the source boot environment named third_disk. Third_disk is not the active boot environment. A description, Solaris 9 test Jan. 2001, is associated with the new boot environment named second_disk.

    # lucreate -A 'Solaris 9 test Jan 2001' -s third_disk \
    -m /:/dev/dsk/c0t4d0s0:ufs  -n second_disk

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


 
 
 
  Previous   Contents   Next