Solaris 9 Installation Guide

To Create a Boot Environment and Split File Systems (Command-Line Interface)

Note –

When creating file systems for a boot environment, the rules are identical to the rules for creating file systems for the Solaris operating environment. Solaris 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—an invalid division of root (/).

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.

  1. Log in as superuser.

  2. Type:

    # lucreate [-A 'BE_description'] -m mountpoint:device:fs_type \
    [[-m mountpoint:device:fs_type]] -n new_BE

    -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 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 on the system.

    Example 32–3 Creating a Boot Environment and Splitting File Systems (Command-Line Interface)

    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, 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/c0t1d0s0:ufs -m /usr:/dev/dsk/c0t1d0s7:ufs  \
    -m /var:/dev/dsk/c0t1d0s1:ufs -m /opt:/dev/dsk/c0t1d0s5: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).