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.
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.
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.
# lucreate [-A 'BE_description'] \ -m mountpoint:device[,metadevice]:fs_options \ -m -:device:swap -n BE_name
(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.
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).
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.
When creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 5, Upgrading With Solaris Live Upgrade (Tasks).
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, mydescription, is associated with the boot environment name second_disk.
# lucreate -A 'mydescription' -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, use the -M option. See To Create a Boot Environment and Reconfigure Swap by Using a List.