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 根集區建立啟動環境

13.  針對已安裝非全域區域的 ZFS 執行 Live Upgrade

在安裝非全域區域的系統上建立 ZFS 啟動環境 (簡介與規劃)

從安裝非全域區域的 UFS 根 (/) 檔案系統遷移至 ZFS 根集區 (作業)

如何將 UFS 檔案系統遷移至具有非全域區域之系統上的 ZFS 根集區

第 3 部分附錄

A.  Live Upgrade 指令參考

B.  疑難排解 (作業)

C.  附加的 SVR4 封裝需求 (參考)

D.  升級時使用修補程式分析器 (作業)

字彙表

索引

從安裝非全域區域的 UFS 根 (/) 檔案系統遷移至 ZFS 根集區 (作業)

本節提供有關從 UFS 根 (/) 檔案系統遷移至安裝非全域區域之系統上的 ZFS 根集區的逐步說明。在 UFS 檔案系統中,沒有任何非全域區域位於共用檔案系統上。

如何將 UFS 檔案系統遷移至具有非全域區域之系統上的 ZFS 根集區

lucreate 指令會從 UFS 根 (/) 檔案系統建立 ZFS 根集區的啟動環境。在 lucreate 作業之前,ZFS 根集區必須存在,且必須使用磁碟片段 (而非整個磁碟) 加以建立,才能升級及啟動。此程序顯示與 UFS 根 (/) 檔案系統相關聯的現有非全域區域如何複製到 ZFS 根集區中的新啟動環境。

  1. 在第一次執行 Live Upgrade 時,請完成下列步驟。

    備註 - 使用 Live Upgrade 建立新 ZFS 啟動環境,至少需要安裝 Solaris 10 10/08 發行版本。舊版沒有 ZFS 和 Live Upgrade 軟體可執行這些作業。


    1. 如有必要,請移除系統上現有的 Live Upgrade 套裝軟體。如果您要升級至新發行版本,則必須從該發行版本安裝套裝軟體。

      三種 Live Upgrade 套裝軟體 SUNWluuSUNWlurSUNWlucfg 組成了使用 Live Upgrade 進行升級所需的軟體。這些套裝軟體包含現有軟體、新功能和錯誤修正。若您在使用 Live Upgrade 前未移除現有套裝軟體並在系統上安裝新套裝軟體,則升級至目標發行版本時會失敗。

      # pkgrm SUNWlucfg SUNWluu SUNWlur
    2. 從您要升級的發行版本安裝新的 Live Upgrade 套裝軟體。如需相關說明,請參閱安裝 Live Upgrade
    3. 安裝或執行 Live Upgrade 之前,必須安裝下列修補程式。這些修補程式可確保您有此發行版本中的所有最新錯誤修正程式和新功能。

      請參閱 My Oracle Support,以確定您有最近更新的修補程式清單。在 My Oracle Support 上搜尋知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844)。

      • 成為超級使用者,或者假設一個對等身份。


        備註 - 身份包含授權指令與特權指令。如需角色的更多資訊,請參閱「System Administration Guide: Security Services」中的「Configuring RBAC (Task Map)」


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

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

      • 變更至修補程式目錄。

        # cd /var/tmp/lupatches
      • 使用 patchadd 指令安裝修補程式。

        # patchadd patch_id

        patch_id 為修補程式編號。請以空格分隔多個修補程式名稱。


        備註 - 必須依照 My Oracle Support 上知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844) 指定的順序套用修補程式。


      • 如有必要,請重新啟動系統。部分修補程式需要重新啟動後才會生效。

        僅限 x86:必須重新啟動系統,否則 Live Upgrade 會失敗。

        # init 6
  2. 建立 ZFS 根集區。

    ZFS 根集區必須位於單一磁碟片段上,才能啟動和升級。

    # zpool create rpool c3t0d0s0

    在此範例中,要建立的新 ZFS 名稱為 rpool。該集區會建立於可啟動磁碟片段 c3t0d0s0 上。

    如需建立新根集區的資訊,請參閱「Oracle Solaris ZFS Administration Guide 」

  3. 將 USF 根 (/) 檔案系統遷移至新的 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 指令會報告啟動環境的建立是否完整且可啟動。

    # 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 根集區中與根集區中的啟動環境共用。

範例 13-1 從安裝非全域區域的 UFS 根 (/) 檔案系統遷移至 ZFS 根集區

在下列範例中,現有非全域區域 myzone 在 UFS 根 (/) 檔案系統中具有其非全域區域根。區域 zzone 在現有 ZFS 儲存集區 pool 中,於 ZFS 檔案系統中有其區域根。使用 Live Upgrade 將 UFS 啟動環境 c2t2d0s0 遷移至 ZFS 啟動環境 zfs2BE。以 UFS 為基礎的 myzone 區域會遷移至新 ZFS 儲存集區 mpool,即 Live Upgrade 作業之前所建立的儲存集區。會複製以 ZFS 為基礎的非全域區域 zzone (但仍會保留在 ZFS 集區 pool 中) 並遷移至新啟動環境 zfs2BE

  1. 建立啟動環境的指令如下:

    # zoneadm list -iv
      ID NAME             STATUS     PATH                           BRAND    IP    
       0 global           running    /                              native   shared
       - myzone           installed  /zones/myzone                  native   shared
       - zzone            installed  /pool/zones                    native   shared
    
    # zpool create mpool mirror c3t0d0s0 c4td0s0
    # lucreate -c c1t2d0s0 -n zfs2BE -p mpool
    Checking GRUB menu...
    Analyzing system configuration.
    Updating boot environment description database on all BEs.
    Updating system configuration files.
    The device </dev/dsk/c1t1d0s0> is not a root device for any boot environment; cannot get BE ID.
    Creating configuration for boot environment <zfs2BE>.
    Source boot environment is <c1t2d0s0>.
    Creating file systems on boot environment <zfs2BE>.
    Creating <zfs> file system for </> in zone <global> on <mpool/ROOT/zfs2BE>.
    Populating file systems on boot environment <zfs2BE>.
    Analyzing zones.
    Mounting ABE <zfs2BE>.
    Generating file list.
    Copying data from PBE <c1t2d0s0> to ABE <zfs2BE>.
    100% of filenames transferred
    Finalizing ABE.
    Fixing zonepaths in ABE.
    Unmounting ABE <zfs2BE>.
    Fixing properties on ZFS datasets in ABE.
    Reverting state of zones in PBE <c1t2d0s0>.
    Making boot environment <zfs2BE> bootable.
    Updating bootenv.rc on ABE <zfs2BE>.
    Saving existing file </boot/grub/menu.lst> in top level dataset for BE <zfs2BE> as <mount-point>//boot/grub/menu.lst.prev.
    File </boot/grub/menu.lst> propagation successful
    Copied GRUB menu from PBE to ABE
    No entry for BE <zfs2BE> in GRUB menu
    Population of boot environment <zfs2BE> successful.
    Creation of boot environment <zfs2BE> successful.
  2. lucreate 作業完成,請使用 lustatus 指令檢視啟動環境狀態,如此範例中所示。

    # lustatus
    Boot Environment           Is       Active Active    Can    Copy      
    Name                       Complete Now    On Reboot Delete Status    
    -------------------------- -------- ------ --------- ------ ----------
    c1t2d0s0                   yes      yes    yes       no     -         
    zfsBE                      yes      no     no        yes    -         
    # zoneadm list -iv
      ID NAME             STATUS     PATH                           BRAND    IP    
       0 global           running    /                              native   shared
       - myzone           installed  /zones/myzone                  native   shared
       - zzone            installed  /pool/zones                    native   shared
  3. 接下來,請使用 luactivate 指令啟動新 ZFS 啟動環境。例如:

    # luactivate zfsBE
    A Live Upgrade Sync operation will be performed on startup of boot 
    environment <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 <zfsBE> successful.
  4. 將系統重新啟動至 ZFS BE。

    # init 6
    # svc.startd: The system is coming down.  Please wait.
    svc.startd: 79 system services are now being stopped.
    .
    .
    .
  5. 確認新啟動環境和遷移區域的狀態,如此範例中所示。

    # lustatus
    Boot Environment           Is       Active Active    Can    Copy      
    Name                       Complete Now    On Reboot Delete Status    
    -------------------------- -------- ------ --------- ------ ----------
    c1t2d0s0                   yes      yes    yes       no     -         
    zfsBE                      yes      no     no        yes    -         

    如果要轉至備用 UFS 啟動環境,則必須再次匯入在 ZFS 啟動環境中建立的所有 ZFS 儲存集區,因為在 UFS 啟動環境中不會自動提供這些儲存集區。當您切換回 UFS 啟動環境時,將會看到與如下內容類似的訊息。

    # luactivate c1t2d0s0
    WARNING: The following files have changed on both the current boot 
    environment <ZFSbe> zone <global> and the boot environment to be activated <c1t2d0s0>:
     /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 <c1t2d0s0>. These files will not be automatically synchronized 
    from the current boot environment <ZFSbe> when boot environment <c1t2d0s0>