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 作業系統

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 網站上,搜尋知識文件 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 網站中,遵循知識文件 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 網站上,搜尋知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844)。

      • 如果您要在本機磁碟上儲存修補程式,請建立如 /var/tmp/lupatches 的目錄,然後將修補程式下載至該目錄中。

      • My Oracle Support 網站,取得修補程式清單。

      • 變更至修補程式目錄。

        # 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 Administration Guide 」

  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>