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 示例

使用 Live Upgrade 进行升级的示例

准备使用 Live Upgrade

使用 Pre Flight Checker 工具

创建引导环境

升级非活动的引导环境

检查引导环境是否可引导

激活非活动的引导环境

(可选)回退到源引导环境

拆离和升级 RAID-1 卷(镜像)一面的示例

从现有卷迁移到 Solaris Volume Manager RAID-1 卷的示例

创建空引导环境并安装 Flash 归档文件的示例

创建空引导环境

在新引导环境中安装 Flash 归档文件

激活新引导环境

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

10.  Live Upgrade 和 ZFS(概述)

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

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

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

第 3 部分附录

A.  Live Upgrade 命令参考

B.  故障排除(任务)

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

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

词汇表

索引

使用 Live Upgrade 进行升级的示例

在本示例中,将在运行 Solaris 9 发行版的系统上使用 lucreate 命令创建新的引导环境。通过使用 luupgrade 命令将此新引导环境升级到 Oracle Solaris 10 8/11 发行版。通过使用 luactivate 命令激活已升级的引导环境。此外,还提供了回退到初始引导环境的示例。

准备使用 Live Upgrade

第一次运行 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)中的步骤。


注 - 此过程假设系统正在运行 Volume Manager。有关使用 Volume Manager 管理可移除介质的详细信息,请参阅《System Administration Guide: Devices and File Systems》


  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 软件包。

    1. 删除现有的 Live Upgrade 软件包。

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

      # pkgrm SUNWlucfg SUNWluu SUNWlur
    2. 安装新的 Live Upgrade 软件包。

      可以使用安装 DVD 或 CD 上的 liveupgrade20 命令或使用 pkgadd 命令安装软件包。liveupgrade20 命令要求有 Java 软件。如果系统没有安装 Java 软件,则需要使用 pkgadd 命令安装软件包。有关更多信息,请参见 My Oracle Support 知识文档。

      • 如果使用的是 Oracle Solaris Operating System DVD,请更改目录,然后运行安装程序:

        • 更改目录。

          # cd /cdrom/cdrom0/Solaris_10/Tools/Installers

          注 - 对于基于 SPARC 的系统,Solaris 10 10/08 之前的发行版的安装程序的路径是不同的。

          # cd /cdrom/cdrom0/s0/Solaris_10/Tools/Installers

        • 运行安装程序。

          # ./liveupgrade20  -noconsole - nodisplay

          -noconsole-nodisplay 选项可以阻止显示字符用户界面 (Character User Interface, CUI)。


          注 - 不再支持 Live Upgrade CUI。


      • 如果您使用的是 Oracle Software – 2 CD,可以在不更改路径的情况下运行安装程序。

        % ./installer
      • 验证已成功安装软件包。

        # pkgchk -v SUNWlucfg SUNWlur SUNWluu
  3. 安装知识文档 1004881.1-Live Upgrade Software Patch Requirements(以前为 206844)中列出的修补程序。

    1. 如果您要在本地磁盘上存储修补程序,请创建一个目录,如 /var/tmp/lupatches

    2. 从 My Oracle Support Web 站点获取修补程序列表。

    3. 转至修补程序目录,如本示例中所示。

      # cd /var/tmp/lupatches
    4. 安装修补程序。

      # patchadd -M  path-to-patchespatch-id patch-id

      path-to-patches 是修补程序目录的路径,例如 /var/tmp/lupatchespatch-id 是修补程序号。用空格分隔多个修补程序名称。


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


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

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

      # init 6

      您现在有了成功创建新的引导环境所需的软件包和修补程序。

使用 Pre Flight Checker 工具

可以使用 Live Upgrade Pre Flight Check 工具来检测可能会导致 Live Upgrade 操作失败的系统配置问题。此工具需要在调用 lucreate 命令创建引导环境之前运行。

下表说明如何使用 Pre Flight Checker 工具运行系统检查以及如何从一个文件系统迁移到另一个文件系统。

任务
用法样例
输出样例
运行系统检查
# lupc -s
This system has Patch level/IDR of 
IDR147654-04.
It is advisable to apply the latest Live Upgrade 
patch from MOS.
从一个 UFS 文件系统迁移到另一个 UFS 文件系统
# lupc --ufs2ufs -m /:/dev/dsk/c1t5d0s0:ufs
This system has Patch level/IDR of 121430-75
It is advisable to apply the latest Live Upgrad patch
from MOS.
File system has sufficient space to accommodate ABE
Required space is 4995481 KB and fs has 4131006 KB
从一个 ZFS 文件系统迁移到另一个 ZFS 文件系统
# lupc -zfs2zfs -p newpool
This system has Patch level/IDR  of IDR147654-04
It is advisable to apply the latest Live Upgradepatch
from MOS.
File system has sufficient space to accommodate ABE
Required space is 20787.2 KB and fs has 10422845.44 KB
从一个 UFS 文件系统迁移到 ZFS 文件系统
# lupc --ufs2zfs -p bepool -D /var
This system has Patch level/IDR of 121430-75
It is advisable to apply the latest Live Upgrade 
patch from MOS.
File system has sufficient space to accommodate ABE
Required space is 4995481 KB and fs has 20761804.8 KB
File system has sufficient space to accommodate ABE
Required space is 5610220 KB and fs has 20761804.8 KB

创建引导环境

使用 -c 选项将源引导环境命名为 c0t4d0s0。仅在创建第一个引导环境时才需要命名源引导环境。有关使用 -c 选项进行命名的更多信息,请参见“首次创建引导环境”中步骤 1 的描述。

将新引导环境命名为 c0t15d0s0-A 选项将创建一个与引导环境名称相关联的说明。

将根 (/) 文件系统复制到新引导环境。同时,创建了一个新的交换片,而不是共享源引导环境的交换片。

# lucreate -A 'BE_description' -c /dev/dsk/c0t4d0s0 -m /:/dev/dsk/c0t15d0s0:ufs\
-m -:/dev/dsk/c0t15d0s1:swap -n /dev/dsk/c0t15d0s0

升级非活动的引导环境

将非活动的引导环境命名为 c0t15d0s0。从网络中获取用于升级的操作系统映像。

# luupgrade -n c0t15d0s0 -u -s /net/ins-svr/export/Solaris_10 \ 
combined.solaris_wos

检查引导环境是否可引导

lustatus 命令报告引导环境创建是否完成。lustatus 还显示引导环境是否可引导。

# lustatus
boot environment   Is        Active  Active     Can        Copy
Name               Complete  Now     OnReboot   Delete     Status
------------------------------------------------------------------------
c0t4d0s0           yes       yes      yes      no      -
c0t15d0s0          yes       no       no       yes     -

激活非活动的引导环境

通过 luactivate 命令使 c0t15d0s0 成为可引导的引导环境。然后重新引导系统,c0t15d0s0 即会成为活动的引导环境。c0t4d0s0 引导环境现在处于非活动状态。

# luactivate c0t15d0s0
# init 6

(可选)回退到源引导环境

以下回退过程取决于新引导环境的激活情况:

示例 9-1 SPARC: 在忽略引导环境创建成功的情况下回退

在本示例中,虽然新引导环境已经被成功激活了,但初始引导环境 c0t4d0s0 被重新恢复为活动的引导环境。设备名称为 first_disk

# /sbin/luactivate first_disk 
# init 6

示例 9-2 SPARC: 从失败的引导环境激活中回退

在本示例中,新引导环境是不可引导的。您必须返回到 OK 提示符,然后在单用户模式下从初始引导环境 c0t4d0s0 中引导。

OK boot net -s
# /sbin/luactivate first_disk
Do you want to fallback to activate boot environment c0t4d0s0 
(yes or no)? yes
# init 6

初始引导环境 c0t4d0s0 成为活动的引导环境。

示例 9-3 SPARC: 使用 DVD、CD 或网络安装映像回退到初始引导环境

在本示例中,新引导环境是不可引导的。您无法从初始引导环境中引导,因此必须使用介质或网络安装映像。设备为 /dev/dsk/c0t4d0s0。初始引导环境 c0t4d0s0 成为活动的引导环境。

OK boot net -s
# fsck /dev/dsk/c0t4d0s0
# mount /dev/dsk/c0t4d0s0 /mnt 
# /mnt/sbin/luactivate
Do you want to fallback to activate boot environment c0t4d0s0 
(yes or no)? yes
# umount /mnt 
# init 6

示例 9-4 x86: 通过使用 GRUB 菜单回退到初始引导环境

从 Solaris 10 1/06 发行版开始,以下示例介绍了通过使用 GRUB 菜单回退的步骤。

在本示例中,正确显示了 GRUB 菜单,但是新引导环境不可引导。要启用回退,在单用户模式中引导初始引导环境。

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


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


  2. 要显示 GRUB 菜单,请重新引导系统。

    # init 6

    此时将显示 GRUB 菜单。

    GNU GRUB version 0.95 (616K lower / 4127168K upper memory)
    +-------------------------------------------------------------------+
    |Solaris                                                            |
    |Solaris failsafe                                                   |
    |second_disk                                                        |
    |second_disk failsafe                                               |
    +-------------------------------------------------------------------+
    Use the ^ and v keys to select which entry is highlighted. Press
    enter to boot the selected OS, 'e' to edit the commands before
    booting, or 'c' for a command-line.
  3. 从 GRUB 菜单中选择初始引导环境。必须已使用 GRUB 软件创建了该引导环境。在 Solaris 10 1/06 发行版之前创建的引导环境不属于 GRUB 引导环境。如果您没有可引导的 GRUB 引导环境,则跳至示例 9-5

  4. 通过键入以下内容来编辑 GRUB 菜单: e

  5. 通过使用方向键选择 kernel /boot/multiboot 并键入 e,此时将显示 grub 编辑菜单。

    grub edit>kernel /boot/multiboot
  6. 通过键入 -s 引导至单用户模式。

    grub edit>kernel /boot/multiboot -s
  7. 引导并挂载该引导环境。然后将其激活。

# b
# fsck /dev/dsk/c0t4d0s0
# mount /dev/dsk/c0t4d0s0 /mnt 
# /mnt/sbin/luactivate
Do you want to fallback to activate boot environment c0t4d0s0
(yes or no)? yes
# umount /mnt
# init 6

示例 9-5 x86: 通过使用 DVD 或 CD 回退到具有 GRUB 菜单的初始引导环境

从 Solaris 10 1/06 发行版开始,以下示例介绍了通过使用 DVD 或 CD 回退的步骤。

在本示例中,新引导环境是不可引导的。另外,也不显示 GRUB 菜单。要启用回退,在单用户模式中引导初始引导环境。

  1. 插入 Oracle Solaris Operating System for x86 Platforms DVD 或 Oracle Solaris Software for x86 Platforms - 1 CD。

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


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


  3. 从 DVD 或 CD 引导。

    # init 6

    此时将显示 GRUB 菜单。

    GNU GRUB version 0.95 (616K lower / 4127168K upper memory)
    +-------------------------------------------------------------------------+
    |Oracle Solaris 10 8/11                                                   |
    |Oracle Solaris 10 8/11 Serial Console ttya                               |
    |Oracle Solaris 10 8/11 Serial Console ttyb (for lx50, v60x and v65x      |
    +-------------------------------------------------------------------------+
    Use the ^ and v keys to select which entry is highlighted. Press
    enter to boot the selected OS, 'e' to edit the commands before
    booting, or 'c' for a command-line.
  4. 等待引导缺省选项,或选择所显示的任一选项。

    此时将显示安装屏幕。

    +---------------------------------------------------------------------+
    |                                                                    |
    |Select the type of installation you want to perform:                |
    |                                                                    |
    |         1 Solaris Interactive                                      |
    |         2 Custom JumpStart                                         |
    |         3 Solaris Interactive Text (Desktop session)               |
    |         4 Solaris Interactive Text (Console session)               |
    |         5 Apply driver updates                                     |
    |         6 Single user shell                                        |
    |                                                                    |
    |        Enter the number of your choice followed by the <ENTER> key.|
    |        Alternatively, enter custom boot arguments directly.        |
    |                                                                    |
    |         If you wait 30 seconds without typing anything,            |
    |         an interactive installation will be started.               |
    +--------------------------------------------------------------------+
  5. 选择 "Single user shell"(单用户 shell)选项。

    此时将显示以下消息。

    Do you wish to automatically update the boot archive? y /n
  6. 键入: n

    Starting shell...
    #

    现在即进入单用户模式。

  7. 挂载引导环境。然后将其激活并重新引导。

    # fsck /dev/dsk/c0t4d0s0
    # mount /dev/dsk/c0t4d0s0 /mnt 
    # /mnt/sbin/luactivate
    Do you want to fallback to activate boot environment c0t4d0s0
    (yes or no)? yes
    # umount /mnt
    # init 6