Skip Navigation Links | |
Exit Print View | |
Creating and Administering Oracle Solaris 11.1 Boot Environments Oracle Solaris 11.1 Information Library |
1. Introduction to Managing Boot Environments
Advantages to Maintaining Multiple Boot Environments
Tools for Managing Boot Environments
3. Creating Boot Environments and Snapshots
A boot environment is a bootable instance of the Oracle Solaris operating system image plus any other application software packages installed into that image. System administrators can maintain multiple boot environments on their systems, and each boot environment can have different software versions installed.
Upon the initial installation of the Oracle Solaris release onto a system, a boot environment is created. You can use the beadm(1M) utility to create and administer additional boot environments on your system. In addition, the Package Manager GUI provides some options for managing boot environments. Exactly one boot environment can be active at a time.
In terms of file structure, each boot environment consists of a root dataset and, optionally, other datasets nested under that root dataset.
Note - A dataset is a generic name for ZFS entities such as clones, file systems, or snapshots. In the context of boot environment administration, the dataset more specifically refers to the file system specifications for a particular boot environment.
For more information about ZFS datasets, see ZFS Terminology in Oracle Solaris 11.1 Administration: ZFS File Systems.
The following example shows the root dataset for a sample boot environment named BE1:
rpool/ROOT/BE1
In the rpool/ROOT/BE1 root dataset example, rpool is the name of the storage pool (zpool). The pool was previously set up and therefore already exists on the system. ROOT is a special dataset that was created by a prior installation. The ROOT dataset is reserved exclusively for use by boot environment root datasets.
The root dataset and any other datasets nested beneath it are included in the BE1 boot environment. These datasets are sometimes referred to as the critical datasets for a boot environment.
Shared datasets, in contrast, are located outside the root dataset area of each boot environment. Shared datasets are user-defined directories, such as /export. An example of a shared dataset might be a dataset where user accounts are kept; these user accounts can be accessed regardless of which boot environment is booted.
See the following example:
# zfs list NAME USED AVAIL REFER MOUNTPOINT pool 450K 457G 18K /pool pool/home 315K 457G 21K /export/home pool/home/anne 18K 457G 18K /export/home/anne pool/home/bob 276K 457G 276K /export/home/bob
Note - For further information, see the zpool(1M) and the zfs(1M) man pages. See, also, Querying ZFS Storage Pool Status in Oracle Solaris 11.1 Administration: ZFS File Systems.
Snapshots and boot environments can be automatically created by utilities other than the beadm command. For example, the pkg command may automatically create a clone of a boot environment when you install or update packages using that command.
Use the beadm command when you specifically want to create or modify a boot environment, that is, when you want to create or modify a root dataset and the datasets under that root dataset. For example, use the beadm command to make a reference copy of a dataset before making changes to that dataset. The beadm command is based on the zfs technology, but the beadm command has functionality specific to managing root datasets and the datasets under those root datasets. And, you can also use the beadm command to track and manage the associations between multiple root datasets within a global zone or across multiple zones.
You can use the beadm utility to perform actions such as the following on a boot environment:
Create a new boot environment or clone an existing boot environment, A clone of a boot environment is created by copying an existing boot environment. A clone is bootable. A clone of the boot environment copies the root dataset and everything hierarchically under the main root dataset of the original boot environment.
In contrast, shared datasets are not under the root dataset and are not cloned when a boot environment is cloned. Instead, the clone accesses, as needed, the original, shared dataset.
Create a snapshot of a boot environment. A snapshot is a read-only image of a dataset or boot environment at a given point in time. A snapshot usually references some of the files in the original boot environment instead of completely copying those files, thereby saving space in the snapshot. Because snapshots do not include the complete set of files from the boot environment, a snapshot is not bootable.
List existing boot environments and snapshots.
Rename a boot environment. In the renaming process, the beadm command will retain any existing associations between global zone boot environments and non-global zone boot environments. Such relationships are based on ZFS properties which the beadm command recognizes and maintains during the renaming process.
Delete a boot environment. When a boot environment is deleted, the beadm command also deletes associated zone boot environments in the global zone or non-global zones. The beadm command tracks the ZFS properties that describe such associations.