JavaScript is required to for searching.
跳过导航链接
退出打印视图
Oracle Solaris 10 1/13 安装指南:Live Upgrade 和升级规划     Oracle Solaris 10 1/13 Information Library (简体中文)
search filter icon
search icon

文档信息

前言

第 1 部分使用 Live Upgrade 进行升级

1.  在何处查找 Oracle Solaris 安装规划信息

2.  Live Upgrade(概述)

3.  Live Upgrade(规划)

4.  使用 Live Upgrade 创建引导环境(任务)

5.  使用 Live Upgrade 进行升级(任务)

6.  故障恢复:回退到初始引导环境(任务)

7.  维护 Live Upgrade 引导环境(任务)

8.  在安装了非全局区域的系统中升级 Oracle Solaris OS

9.  Live Upgrade 示例

第 2 部分使用 Live Upgrade 升级和迁移到 ZFS 根池

10.  Live Upgrade 和 ZFS(概述)

11.  针对 ZFS 的 Live Upgrade(规划)

12.  为 ZFS 根池创建引导环境

将 UFS 文件系统迁移到 ZFS 文件系统

如何将 UFS 文件系统迁移到 ZFS 文件系统

在同一 ZFS 根池中创建引导环境

如何在同一 ZFS 根池中创建 ZFS 引导环境。

在新的根池中创建引导环境

如何在新的 ZFS 根池上创建引导环境

从当前运行的系统以外的源创建引导环境

回退到 ZFS 引导环境

13.  针对安装了非全局区域的 ZFS 的 Live Upgrade

第 3 部分附录

A.  Live Upgrade 命令参考

B.  故障排除(任务)

C.  附加 SVR4 打包要求(参考)

D.  升级时使用修补程序分析器(任务)

词汇表

索引

将 UFS 文件系统迁移到 ZFS 文件系统

此过程介绍如何将 UFS 文件系统迁移到 ZFS 文件系统。通过创建引导环境,可以将关键文件系统从活动 UFS 引导环境复制到 ZFS 根池中。lucreate 命令可将关键文件系统复制到现有 ZFS 根池的新引导环境中。不会复制用户定义的(可共享的)文件系统,也不会与源 UFS 引导环境共享这些文件系统。此外,不会在 UFS 文件系统与 ZFS 根池之间共享 /swap。有关可共享的关键文件系统的概述,请参见文件系统类型

如何将 UFS 文件系统迁移到 ZFS 文件系统


注 - 要将活动 UFS 根 (/) 文件系统迁移到迁移到 ZFS 根池,您必须提供根池的名称。关键文件系统将被复制到根池中。


  1. 第一次运行 Live Upgrade 之前,必须从安装介质安装最新的 Live Upgrade 软件包并安装 My Oracle Support 知识文档 1004881.1-Live Upgrade Software Patch Requirements(以前为 206844)中列出的修补程序。在 My Oracle Support Web 站点上搜索知识文档 1004881.1-Live Upgrade Software Patch Requirements(以前为 206844)。

    最新的软件包以及修补程序可确保您具有该发行版的所有最新错误修复和新增功能。在继续创建新的引导环境之前,请确保安装了所有与您的系统相关的修补程序。

    以下子步骤讲述了 My Oracle Support 知识文档 1004881.1-Live Upgrade Software Patch Requirements(以前为 206844)中的步骤。


    注 - 使用 Live Upgrade 创建新的 ZFS 引导环境至少需要安装 Solaris 10 10/08 发行版。以前的发行版中的 ZFS 和 Live Upgrade 软件不能执行这些任务。


    1. 成为超级用户或承担等效角色。

      注 - 角色包含授权和具有特权的命令。有关角色的更多信息,请参见《System Administration Guide: Security Services》中的"Configuring RBAC (Task Map)"


    2. 按照 My Oracle Support Web 站点上的知识文档 1004881.1-Live Upgrade Software Patch Requirements(以前为 206844)中的说明来删除和添加 Live Upgrade 软件包。

      三个 Live Upgrade 软件包(SUNWluuSUNWlurSUNWlucfg)组成了使用 Live Upgrade 进行升级所需的软件。这些软件包包含现有的软件、新增功能和错误修复。如果在使用 Live Upgrade 前未删除现有软件包并在系统上安装新的软件包,则升级到目标发行版时将失败。从 Solaris 10 8/07 发行版开始,新增了 SUMWlucfg 软件包。如果您要从 Solaris 10 8/07 之前的发行版使用 Live Upgrade 软件包,则不需要删除此软件包。

      # pkgrm SUNWlucfg SUNWluu SUNWlur
    3. 从要升级到的发行版安装新的 Live Upgrade 软件包。有关说明,请参见安装 Live Upgrade
    4. 在运行 Live Upgrade 之前,需要安装下列修补程序。这些修补程序可确保您具有该发行版的所有最新错误修复和新增功能。

      通过访问 My Oracle Support 确保您具有最近更新的修补程序列表。在 My Oracle Support Web 站点上搜索知识文档 1004881.1-Live Upgrade Software Patch Requirements(以前为 206844)。

      • 如果您要将修补程序存储在本地磁盘上,请创建一个目录(如 /var/tmp/lupatches)并将这些修补程序下载到该目录中。

      • My Oracle Support Web 站点获取修补程序列表。

      • 转到修补程序目录。

        # cd /var/tmp/lupatches
      • 使用 patchadd 命令安装修补程序。

        # patchadd patch_id

        patch_id 是修补程序号。用空格分隔多个修补程序名称。


        注 - 需要按知识文档 1004881.1-Live Upgrade Software Patch Requirements(以前为 206844)中指定的顺序应用修补程序。


      • 根据需要重新引导系统。某些修补程序需要重新引导后才能生效。

        仅适用于 x86: 需要重新引导系统,否则 Live Upgrade 将会失败。

        # init 6

        您现在有了成功迁移所需的软件包和修补程序。

  2. 创建 ZFS 根池。

    ZFS 根池必须位于单个分片上才能引导和升级。

    # zpool create rpool c0t1d0s5
    rpool

    指定要创建的新 ZFS 根池的名称。

    c0t1d0s5

    在磁盘分片 c0t1d0s5 上创建新的根池。

    有关创建新的根池的信息,请参见《Oracle Solaris ZFS 管理指南》

  3. 将 UFS 根 (/) 文件系统迁移到新的 ZFS 根池。
    # lucreate [-c ufsBE] -n new-zfsBE -p rpool
    ufsBE

    当前 UFS 引导环境的名称。该选项不是必需的,仅在创建首个引导环境时使用。如果是首次运行 lucreate 命令且省略了 -c 选项,本软件将为您创建一个缺省名称。

    new-zfsBE

    要创建的引导环境的名称。名称在系统中必须是唯一的。

    -p rpool

    将新创建的 ZFS 根 (/) 文件系统置于在 rpool 中定义的 ZFS 根池中。

    创建新的 ZFS 引导环境可能需要一段时间。UFS 文件系统数据将被复制到 ZFS 根池中。创建非活动引导环境后,可以使用 luupgradeluactivate 命令升级或激活新的 ZFS 引导环境。

  4. (可选)验证引导环境是否已完成。
    # lustatus
    boot environment   Is         Active   Active     Can        Copy 
    Name               Complete   Now      OnReboot   Delete     Status 
    -----------------------------------------------------------------
    ufsBE               yes       yes      yes        no         -
    new-zfsBE           yes       no       no        yes         -
  5. (可选)验证系统上的基本数据集信息。

    list 命令显示系统上所有数据集的名称。在本示例中,rpool 是 ZFS 池的名称,new-zfsBE 是新创建的 ZFS 引导环境的名称。

    # zfs list
    NAME                               USED  AVAIL  REFER  MOUNTPOINT
    rpool                                 11.4G  2.95G    31K  /rpool
    rpool/ROOT                            4.34G  2.95G    31K  legacy
    rpool/ROOT/new-zfsBE                  4.34G  2.95G  4.34G  /
    rpool/dump                            2.06G  5.02G    16K  -
    rpool/swap                            5.04G  7.99G    16K  -

    针对新引导环境列出的挂载点是临时的,直到执行 luactivate 命令为止。/dump/swap 卷不与原始 UFS 引导环境共享,但在 ZFS 根池和根池内的引导环境中共享。

    现在可以升级并激活新的引导环境了。

示例 12-1 将 UFS 根 (/) 文件系统迁移到 ZFS 根池

在本示例中,新的 ZFS 根池 rpool 是在单独的分片 C0t0d0s4 上创建的。lucreate 命令可将当前正在运行的 UFS 引导环境 c0t0d0 迁移到新的 ZFS 引导环境 new-zfsBE,并将新的引导环境置于 rpool 中。

# zpool create rpool C0t0d0s4

# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT 
rpool                      9.29G  57.6G    20K  /rpool
# lucreate -c c0t0d0 -n new-zfsBE -p rpool
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named <c0t0d0>.
Creating initial configuration for primary boot environment <c0t0d0>.
INFORMATION: No BEs are configured on this system.
The device </dev/dsk/c1t0d0s0> is not a root device for any boot 
environment; cannot get BE ID.
PBE configuration successful: PBE name <c0t0d0> PBE Boot Device 
</dev/dsk/c1t0d0s0>.
Updating boot environment description database on all BEs.
Updating system configuration files.
The device </dev/dsk/c1t0d0s6> is not a root device for any boot 
environment; cannot get BE ID.
Creating configuration for boot environment <new-zfsBE>.
Source boot environment is <c0t0d0>.
Creating file systems on boot environment <new-zfsBE>.
Creating <zfs> file system for </> in zone <global> on 
<rpool/ROOT/new-zfsBE>.
Populating file systems on boot environment <new-zfsBE>.
Analyzing zones.
Mounting ABE <new-zfsBE>.
Generating file list.
Copying data from PBE <c0t0d0> to ABE <new-zfsBE>.
100% of filenames transferred
Finalizing ABE.
Fixing zonepaths in ABE.
Unmounting ABE <new-zfsBE>.
Fixing properties on ZFS datasets in ABE.
Reverting state of zones in PBE <c0t0d0>.
Making boot environment <new-zfsBE> bootable.
Creating boot_archive for /.alt.tmp.b-Cjh.mnt
updating /.alt.tmp.b-Cjh.mnt/platform/sun4u/boot_archive
Population of boot environment <new-zfsBE> successful.
Creation of boot environment <new-zfsBE> successful.


# lustatus
boot environment   Is         Active   Active     Can        Copy 
Name               Complete   Now      OnReboot   Delete     Status 
------------------------------------------------------------------------ 
c0t0d0             yes       yes      yes        no         - 
new-zfsBE           yes       no       no        yes       -

# zfs list
NAME                               USED  AVAIL  REFER  MOUNTPOINT
rpool                                 11.4G  2.95G    31K  /rpool
rpool/ROOT                            4.34G  2.95G    31K  legacy
rpool/ROOT/new-zfsBE                  4.34G  2.95G  4.34G  /
rpool/dump                            2.06G  5.02G    16K  -
rpool/swap                            5.04G  7.99G    16K  -

现在可以升级或激活新的引导环境了。

在本示例中,使用 luupgrade 命令从通过 -s 选项指明的位置中存储的映像升级新引导环境。

# luupgrade -n zfsBE -u -s /net/install/export/s10/combined.s10
 51135 blocks 
miniroot filesystem is <lofs>
Mounting miniroot at 
</net/install/export/solaris_10/combined.solaris_10_wos
/Solaris_10/Tools/Boot> 
Validating the contents of the media 
</net/install/export/s10/combined.s10>. 
The media is a standard Solaris media. 
The media contains an operating system upgrade image. 
The media contains Solaris version <10_1008>. 
Constructing upgrade profile to use. 
Locating the operating system upgrade program. 
Checking for existence of previously scheduled Live 
Upgrade requests. 
Creating upgrade profile for BE <zfsBE>. 
Determining packages to install or upgrade for BE <zfsBE>. 
Performing the operating system upgrade of the BE <zfsBE>. 
CAUTION: Interrupting this process may leave the boot environment 
unstable or unbootable. 
Upgrading Solaris: 100% completed 
Installation of the packages from this media is complete. 
Adding operating system patches to the BE <zfsBE>. 
The operating system patch installation is complete. 
INFORMATION: The file /var/sadm/system/logs/upgrade_log on boot 
environment <zfsBE> contains a log of the upgrade operation. 
INFORMATION: The file var/sadm/system/data/upgrade_cleanup on boot 
environment <zfsBE> contains a log of cleanup operations required. 
INFORMATION: Review the files listed above. Remember that all 
of the files are located on boot environment <zfsBE>. 
Before you activate boot environment <zfsBE>, determine if any 
additional system maintenance is required or if additional media 
of the software distribution must be installed. 
The Solaris upgrade of the boot environment <zfsBE> is complete.

创建新引导环境后,可以随时激活它。

# luactivate new-zfsBE
A Live Upgrade Sync operation will be performed on startup of boot 
environment <new-zfsBE>.

**********************************************************************

The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.

**********************************************************************

In case of a failure while booting to the target BE, the following 
process
needs to be followed to fallback to the currently working boot 
environment:

1. Enter the PROM monitor (ok prompt).

2. Boot the machine to Single User mode using a different boot device
(like the Solaris Install CD or Network). Examples:

   At the PROM monitor (ok prompt):
   For boot to Solaris CD:  boot cdrom -s
   For boot to network:     boot net -s

3. Mount the Current boot environment root slice to some directory (like
/mnt). You can use the following command to mount:

   mount -Fufs /dev/dsk/c1t0d0s0 /mnt

4. Run <luactivate> utility with out any arguments from the current boot
environment root slice, as shown below:

   /mnt/sbin/luactivate

5. luactivate, activates the previous working boot environment and
indicates the result.

6. Exit Single User mode and reboot the machine.

**********************************************************************

Modifying boot archive service
Activation of boot environment <new-zfsBE> successful.

将系统重新引导至 ZFS 引导环境。

# init 6
# svc.startd: The system is coming down.  Please wait.
svc.startd: 79 system services are now being stopped.
.
.
.

如果回退到 UFS 引导环境,则需要再次导入在 ZFS 引导环境中创建的所有 ZFS 存储池,因为 UFS 引导环境不会自动提供它们。切换回 UFS 引导环境时,您将看到类似于以下示例的消息。

# luactivate c0t0d0
WARNING: The following files have changed on both the current boot 
environment <new-zfsBE> zone <global> and the boot environment 
to be activated <c0t0d0>:
 /etc/zfs/zpool.cache
INFORMATION: The files listed above are in conflict between the current 
boot environment <zfsBE> zone <global> and the boot environment to be 
activated <c0t0d0>. These files will not be automatically synchronized 
from the current boot environment <new-zfsBE> when boot environment <c0t0d0>