跳過導航連結 | |
結束列印檢視 | |
![]() |
Oracle Solaris 10 1/13 安裝指南:Live Upgrade 與升級規劃 Oracle Solaris 10 1/13 Information Library (繁體中文) |
4. 使用 Live Upgrade 建立啟動環境 (作業)
8. 在已安裝非全域區域的系統上升級 Oracle Solaris 作業系統
第 2 部分使用 Live Upgrade 升級和遷移至 ZFS 根集區
11. 針對 ZFS 執行 Live Upgrade (規劃)
下列程序說明如何在現有的 ZFS 根集區內建立新的 ZFS 啟動環境。在建立非使用中的啟動環境之後,您可以在方便的時候升級及啟動新的啟動環境。在同一個集區中建立啟動環境時,不需要 -p 選項。
最新的套裝軟體和修補程式可確保您有此發行版本中的所有最新錯誤修正程式和新功能。在繼續建立新啟動環境之前,請確定您已安裝與您系統相關的所有修補程式。
下列子步驟描述 My Oracle Support 知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844) 中的步驟。
備註 - 使用 Live Upgrade 建立新 ZFS 啟動環境,至少需要安裝 Solaris 10 10/08 發行版本。舊版沒有 ZFS 和 Live Upgrade 軟體可執行這些作業。
備註 - 身份包含授權指令與特權指令。如需角色的更多資訊,請參閱「System Administration Guide: Security Services」中的「Configuring RBAC (Task Map)」。
三種 Live Upgrade 套裝軟體 SUNWluu、SUNWlur 和 SUNWlucfg 組成了使用 Live Upgrade 進行升級所需的軟體。這些套裝軟體包含現有軟體、新功能和錯誤修正。若您在使用 Live Upgrade 前未移除現有套裝軟體並在系統上安裝新套裝軟體,則升級至目標發行版本時會失敗。從 Solaris 10 8/07 發行版本開始,會新增 SUMWlucfg 套裝軟體。如果您是使用 Solaris 10 8/07 之前發行版本的 Live Upgrade 套裝軟體,並不需要移除此套裝軟體。
備註 - 從 Solaris 10 8/07 發行版本開始,會新增 SUMWlucfg 套裝軟體。如果您是使用舊版中的 Live Upgrade 套裝軟體,並不需要移除此套裝軟體。
# pkgrm SUNWlucfg SUNWluu SUNWlur
請參閱 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 -M path-to-patches patch_id patch_id
path-to-patches 為修補程式目錄的路徑,例如 /var/tmp/lupatches。patch_id 為修補程式編號。請以空格分隔多個修補程式名稱。
備註 - 必須依照知識文件 1004881.1 - Live Upgrade Software Patch Requirements (之前為 206844) 中指定的順序套用修補程式。
如有必要,請重新啟動系統。部分修補程式需要重新啟動後才會生效。
僅限 x86:必須重新啟動系統,否則 Live Upgrade 會失敗。
# init 6
您現在已經有成功建立新啟動環境所需的套裝軟體和修補程式。
# lucreate [-c zfsBE] -n new-zfsBE
目前的啟動環境的名稱。此選項不是必要選項,它僅在建立第一個啟動環境時使用。如果您是首次執行 lucreate,並省略了 -c 選項,則軟體會為您建立一個預設名稱。
欲建立的啟動環境名稱。該名稱在此系統上必須是唯一的。
幾乎在瞬間就會完成新啟動環境的建立。在目前的 ZFS 根集區中,會建立每個資料集的快照,然後從每個快照建立複製。快照具有極高的磁碟空間使用效率,因此,此程序只使用極少的磁碟空間。在建立非使用中的啟動環境後,您可以使用 luupgrade 或 luactivate 指令,來升級或啟動新的 ZFS 啟動環境。
lustatus 指令會報告啟動環境的建立是否完整且可啟動。
# lustatus boot environment Is Active Active Can Copy Name Complete Now OnReboot Delete Status ------------------------------------------------------------------------ zfsBE yes yes yes no - new-zfsBE yes no no yes -
在此範例中,ZFS 根集區命名為 rpool,@ 符號代表快照。在執行 luactivate 指令之前,新啟動環境的掛載點都是暫時的掛載點。/dump 和 /swap 磁碟區會與 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 -
您現在可以升級及啟動新的啟動環境。
範例 12-2 在同一個 ZFS 根集區中建立啟動環境
此範例會建立新的 ZFS 啟動環境 new-zfsBE。因為將在同一個根集區中建立啟動環境,所以不需要 -p 選項。
# lucreate [-c zfsBE] -n new-zfsBE Analyzing system configuration. Comparing source boot environment <zfsBE> file systems with the file system(s) you specified for the new boot environment. Determining which file systems should be in the new boot environment. Updating boot environment description database on all BEs. Creating configuration for boot environment new-zfsBE. Source boot environment is zfsBE. Creating boot environment new-zfsBE. Cloning file systems from boot environment zfsBE to create boot environment new-zfsBE. Creating snapshot for <rpool> on <rpool> Creating clone for <rpool>. Setting canmount=noauto for <rpool> in zone <global> on <rpool>. Population of boot environment zfsBE successful on <rpool>. # lustatus boot environment Is Active Active Can Copy Name Complete Now OnReboot Delete Status ------------------------------------------------------------------------ zfsBE 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 -
您現在可以升級及啟動新的啟動環境。如需升級 ZFS 啟動環境的範例,請參閱範例 12-1。如需使用 luupgrade 指令的更多範例,請參閱本書第 5 章使用 Live Upgrade 升級 (作業)。
# 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. . . .