Sun Cluster 系統管理指南 (適用於 Solaris 作業系統)

SPARC: 如何復原封裝的根 (/) 檔案系統 (VERITAS Volume Manager)

使用此程序將封裝的根 (/) 檔案系統復原至節點。 要復原的節點應該不在啟動狀態。 請先確定叢集執行時沒有任何錯誤,再執行復原程序。


註解 –

由於您必須將新磁碟分割成和故障磁碟相同的格式,請在進行本程序之前先識別分割區機制,同時適當地重新建立檔案系統。


  1. 置換節點上要復原 root 檔案系統的故障磁碟。

    請參閱隨附伺服器之說明文件中敘述的磁碟置換程序。

  2. 啟動您要復原的節點。

    • 如果您使用的是 Solaris CD,在出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰


      ok boot cdrom -s
      

    • 如果您使用的是 Solaris JumpStartTM 伺服器,在出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰


      ok boot net -s
      

  3. 使用 format 指令,在根磁碟上建立所有的分割區與交換。

    重新建立故障磁碟的原始分割機制。

  4. 使用 newfs 指令,適當建立根 (/) 檔案系統以及其他檔案系統。

    重新建立故障磁碟的原始檔案系統。


    註解 –

    請務必要建立 /global/.devices/node@nodeid 檔案系統。


  5. 將 root (/) 檔案系統裝載到暫時裝載點。


    # mount device temp-mountpoint
    

  6. 從備份復原 root (/) 檔案系統。


    # cd temp-mountpoint
    # ufsrestore rvf dump-device
    # rm restoresymtable
    

  7. 建立空的 install-db 檔。

    如此將使節點在下次重新啟動時進入 VxVM 安裝模式。


    # touch /temp-mountpoint/etc/vx/reconfig.d/state.d/install-db
    

  8. /temp-mountpoint/etc/system 檔案移除下列指令或為指令下註解。


    * rootdev:/pseudo/vxio@0:0
    * set vxio:vol_rootdev_is_volume=1

  9. 編輯 /temp-mountpoint/etc/vfstab 檔,並將所有的 VxVM 裝載點換成根磁碟的標準磁碟裝置,例如 /dev/dsk/c0t0d0s0


    Example: 
    Change from—
    /dev/vx/dsk/rootdg/rootvol /dev/vx/rdsk/rootdg/rootvol /      ufs   1     no -
    
    Change to—
    /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0  / ufs   1     no       -

  10. 卸載暫時檔案系統,並檢查檔案系統。


    # cd /
    # umount temp-mountpoint
    # fsck raw-disk-device
    

  11. 在新磁碟上安裝啟動區塊。


    # /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk raw-disk-device
    

  12. 將節點重新啟動為單使用者模式。


    # reboot -- "-s"
    

  13. 使用 scdidadm( 1M) 來更新磁碟 ID。


    # scdidadm -R /dev/rdsk/c0t0d0
    

  14. 執行 vxinstall 以密封磁碟並重新啟動。


    # vxinstall
    

  15. 如果有某個次要編號和其他系統衝突,請卸載整體裝置並重新指定磁碟群組。

    • 卸載叢集節點上的整體裝置檔案系統。


      # umount /global/.devices/node@nodeid
      

    • 重新指定叢集節點上的 rootdg 磁碟群組的次要編號。


      # vxdg reminor rootdg 100
      

  16. 在叢集模式下關閉,並重新啟動節點。


    # shutdown -g0 -i6 -y
    

SPARC: 範例—復原封裝的 root (/) 檔案系統 (VERITAS Volume Manager)

以下範例顯示封裝的 root (/) 檔案系統復原至節點 phys-schost-1 (從磁帶裝置 /dev/rmt/0)。


[Replace the failed disk and boot the node:]

從 Solaris CD 啟動節點。 出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰


ok boot cdrom -s
...
[Use format and newfs to create partitions and file systems]
[Mount the root file system on a temporary mount point:]
# mount /dev/dsk/c0t0d0s0 /a
[Restore the root file system:]
# cd /a
# ufsrestore rvf /dev/rmt/0
# rm restoresymtable
[Create an empty install-db file:]
# touch /a/etc/vx/reconfig.d/state.d/install-db
[Edit /etc/system on the temporary file system and 
remove or comment out the following entries:]
	# rootdev:/pseudo/vxio@0:0
	# set vxio:vol_rootdev_is_volume=1
[Edit /etc/vfstab on the temporary file system:]
Example: 
Change from—
/dev/vx/dsk/rootdg/rootvol /dev/vx/rdsk/rootdg/rootvol / ufs 1 no-

Change to—
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0  / ufs   1     no       -
[Unmount the temporary file system, then check the file system:]
# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s0
[Install a new boot block:]
# /usr/sbin/installboot /usr/platform/`uname \
-i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0
[Reboot in single-user mode:]
# reboot -- "-s"
[Update the disk ID:]
# scdidadm -R /dev/rdsk/c0t0d0
[Run vxinstall:]
# vxinstall
Choose to encapsulate the root disk.
[If there is a conflict in minor number, reminor the rootdg disk group:]
# umount /global/.devices/node@nodeid
# vxdg reminor rootdg 100
# shutdown -g0 -i6 -y

下一步

如需有關如何鏡像封裝的根磁碟之說明,請參閱Sun Cluster 軟體安裝指南 (適用於 Solaris 作業系統)