可使用此程序將根 (/) 檔案系統復原至新的磁碟 (例如,在更換有故障的根磁碟後)。要復原的節點應該不在啟動狀態。請先確定叢集執行時沒有任何錯誤,再執行復原程序。
由於您必須使用與故障磁碟相同的格式分割新磁碟,因此請在開始此程序前識別分割方案,然後相應地重新建立檔案系統。
此程序提供長形式的 Sun Cluster 指令。大多數指令還有簡短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令。
成為超級使用者,或成為在可存取磁碟組的叢集節點上提供 solaris.cluster.modify RBAC 授權的角色。(要復原的節點也會連結到這個磁碟組。)
使用您要復原的節點以外的節點。
從所有中介集合移除要復原的節點的主機名稱。
從 metaset 中的節點執行這個指令,而不是從您正在移除的節點執行。由於回復的節點目前為離線,因此系統會顯示 RPC: Rpcbind failure - RPC: Timed out 錯誤。忽略此錯誤並繼續下一個步驟。
# metaset -s setname -f -d -h nodelist |
指定磁碟組名稱。
從磁碟組刪除最後一個主機。
從磁碟組刪除。
指定要從磁碟組刪除之節點的名稱。
復原根 (/) 檔案系統和 /usr 檔案系統。
若要復原根檔案系統和 /usr 檔案系統,請按照「System Administration Guide: Devices and File Systems」中的第 26 章「Restoring Files and File Systems (Tasks)」所述程序進行操作。忽略 Solaris 作業系統程序中的步驟以重新啟動系統。
確定您有建立 /global/.devices/node@nodeid 檔案系統。
以多使用者模式重新啟動節點。
# reboot |
更換磁碟 ID。
# cldevice repair rootdisk |
使用 metadb(1M) 指令重新建立狀態資料庫複本。
# metadb -c copies -af raw-disk-device |
指定要建立的複本數目。
要在其上建立複本的原始裝置。
新增複本。
從已復原的節點以外的叢集節點,將已復原的節點增加至所有磁碟組。
phys-schost-2# metaset -s setname -a -h nodelist |
建立並增加主機至磁碟組。
節點重新啟動為叢集模式。叢集已經備妥可以使用。
以下範例顯示 root (/) 檔案系統復原至節點 phys-schost-1 (從磁帶裝置 /dev/rmt/0) 。從叢集中的另一個節點 phys-schost-2 執行 metaset 指令來進行移除,然後將節點 phys-schost-1 重新增加至磁碟組 schost-1。從 phys-schost-1 執行所有其他指令。在 /dev/rdsk/c0t0d0s0 上建立新的啟動區段,並在 /dev/rdsk/c0t0d0s4 上重新建立三個狀態資料庫複本。
[Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on a cluster node other than the node to be restored .] [Remove the node from the metaset:] phys-schost-2# metaset -s schost-1 -f -d -h phys-schost-1 [Replace the failed disk and boot the node:] Restore the root (/) and /usr file system using the procedure in the Solaris system administration documentation [Reboot:] # reboot [Replace the disk ID:] # cldevice repair /dev/dsk/c0t0d0 [Re-create state database replicas:] # metadb -c 3 -af /dev/rdsk/c0t0d0s4 [Add the node back to the metaset:] phys-schost-2# metaset -s schost-1 -a -h phys-schost-1 |