系统管理指南:基本管理

Procedurex86: 如何显示可用的 ZFS 引导环境列表

  1. 成为超级用户或同等角色。

    角色包含授权和具有一定权限的命令。有关角色的更多信息,请参见 《系统管理指南:安全性服务》中的“配置 RBAC(任务列表)”

  2. 要显示系统中可用 BE 的列表,请键入以下命令:


    ~# bootadm list-menu
    

    # lustatus
    

    请注意,也可以在基于 SPARC 的系统上使用 lustatus 命令。


    注 –

    如果在运行 lustatus 命令时显示以下错误,则表明执行了全新安装,而没有使用 Solaris Live Upgrade。必须先在系统中创建新的 BE,然后才能在 lustatus 输出中确认任何 BE。


    # lustatus
    ERROR: No boot environments are configured on this system
    ERROR: cannot determine list of all boot environment names

    有关使用 Solaris Live Upgrade 将 UFS 根文件系统迁移到 ZFS 根文件系统的更多信息,请参见 《Oracle Solaris ZFS 管理指南》中的“将 UFS 根文件系统迁移到 ZFS 根文件系统 (Oracle Solaris Live Upgrade)”


示例 12–12 使用 lustatus 命令显示可用的 ZFS 可引导数据集的列表

在以下示例中,lustatus 命令的输出显示了三个 ZFS 可引导数据集的状态。缺省的引导环境是 be1,因而无法将其删除。


# lustatus
Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
s10s_nbu6wos               yes      no     no        yes    -
zfs2BE                     yes      yes    yes       no     -
zfsbe3                     no       no     no        yes    -
#

如果该 BE 已创建且可引导,则 Is Complete 列中会显示 "yes"。如果某个 BE 已创建但尚未激活,则此列中会显示 "no"。要激活某个 BE,请使用 luactivate 命令。之后,可以运行 lustatus 命令以检验是否已成功激活该 BE。

有关更多信息,请参见 lustatus(1M)luactivate(1M) 手册页。