Solaris 10 6/06 Installation Guide: Solaris Live Upgrade and Upgrade Planning

ProcedureTo 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 OS. 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 the root (/) file system.


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.

Steps
  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type:


    # lucreate [-A 'BE_description'] \
     -m mountpoint:device[,metadevice]:fs_options \ 
    -m mountpoint:device[,metadevice]:fs_options -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[,metadevice]:fs_options [-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/cwtxdysz

      • 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_options 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).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be applied to the file systems. These keywords can create a logical device, change the configuration of a logical device, or delete a logical device. For a description of these keywords, see To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -n BE_name

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


Example 8–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, mydescription, is associated with the boot environment name second_disk.


# lucreate -A 'mydescription' -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 9, Upgrading With Solaris Live Upgrade (Tasks).