Listing Existing Boot Environments and Snapshots
All snapshots, boot environments, and datasets that were created by the beadm command
can be displayed with the beadm list subcommand.
Snapshots and boot environments can be created by the beadm command. Snapshots
and boot environments can also be created by other utilities. For example, the
pkg image-update command automatically creates a clone of a boot environment and upgrades that
clone. The beadm list command output also displays boot environments that are created by
the pkg image-update command.
How to Display Information About Your Boot Environments, Snapshots, and Datasets
- Choose the information that you want to view, as described in this step.
- Choose an option for the beadm list command from the following list:
-a – Lists all available information about the boot environment. This option includes subordinate datasets and snapshots.
-d – Lists information about a boot environment's datasets.
-s – Lists information about a boot environment's snapshots.
-H – Omits the header information from the display. Choosing this option results in a display that can be more easily parsed for scripts or other programs.
- You can also choose whether to specify a boot environment name in the
beadm list command.
By default, if you do not include a boot environment name in the
command, the results include all boot environments.
But, if you include a boot environment name in the beadm list command,
the results include only information about that boot environment.
- Type the beadm list command with preferred options.
For example, include the -a option and specify the BE1 environment as follows:
$ beadm list -a BE1
- Review the information that is displayed about the available boot environments.
Example 2-1 Viewing Boot Environment Specifications
This example includes the -a option and specifies the BE2 environment as follows:
$ beadm list -a BE2
Sample results are displayed. The BE2 environment will be active on reboot, as
indicated by the R in the Active column.
BE/Dataset Active Mountpoint Space Policy Created
---------- ------ ---------- ----- ------ -------
BE2 rpool/ROOT/BE2 R /mnt 89.67M static 2008-09-17 20:17
rpool/ROOT/BE2/opt - /mnt/opt 0 static 2008-09-17 20:17
Two datasets are included in BE2, the dataset, rpool/ROOT/BE2, and the dataset,
rpool/ROOT/BE2/opt. The values for the Active column are as follows:
R – Active on reboot
N – Now active
“-” – Inactive
Example 2-2 Viewing Snapshot Specifications
This example includes the -s option, which displays information for any snapshots that
exist on the current image. The status of those snapshots is the same
list that the zfs(1M) command displays.
$ beadm list -s BE2
Sample results are displayed.
BE/Snapshot Space Policy Created
----------- ----- ------ -------
BE1
BE1@2008-10-13-20:53:10 32.00M static 2008-10-13 13:53
BE2
BE2@2008-10-16-16:40:09 213.0K static 2008-10-16 09:40
preview2
preview2@install 452.00M static 2008-05-24 14:24
preview2@BE1 765.37M static 2008-07-11 12:15
preview2@BE2 438.22M static 2008-08-09 16:22
In this example, the BE1, BE2, and Preview 2 boot environments are
listed. BE1 and BE2 each have one snapshot listed, with each snapshot name
showing when the snapshot was taken. The Preview 2 boot environment has three
snapshots available, with each snapshot name indicating the original image source.