Sun Cluster 3.0 U1 系統管理手冊

8.3.3.1 範例 - 復原複合裝置上舊有的根 (/) 檔案系統 (Solstice DiskSuite)

以下範例顯示密封根 (/) 檔案系統從磁帶裝置 /dev/rmt/0 復原至節點 phys-schost-1metaset 指令是由叢集 phys-schost-2 另一節點執行,以便先移除而後將 phys-schost-1 節點重新加入 schost-1 metaset 中。所有其他指令是由 phys-schost-1 執行。在 /dev/rdsk/c0t0d0s0 上建立了新的啟動區塊,且在 /dev/rdsk/c0t0d0s4 上重新建立了三個狀態資料庫之複本。


[Become superuser on a cluster node with access to the metaset, 
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:]
ok boot cdrom -s
[Use format and newfs to recreate 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
[Install a new boot block:]
# /usr/sbin/installboot /usr/platform/`uname \
-i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0
[Remove the lines in /temp-mount-point/etc/system file for MDD root information:]
* Begin MDD root info (do not edit)
forceload: misc/md_trans
forceload: misc/md_raid
forceload: misc/md_mirror
forceload: misc/md_hotspares
forceload: misc/md_stripe
forceload: drv/pcipsy
forceload: drv/glm
forceload: drv/sd
rootdev:/pseudo/md@0:0,10,blk
* End MDD root info (do not edit)
[Edit the /temp-mount-point/etc/vfstab file]
Example: 
Change from - 
/dev/md/dsk/d10   /dev/md/rdsk/d10    /      ufs   1     no       -

Change to - 
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0  /usr   ufs   1     no       -
[Unmount the temporary file system and check the raw disk device:]
# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s0
[Reboot in single-user mode:]
# reboot -- "-s"
[Replace the disk ID:]
# scdidadm -R /dev/dsk/c0t0d0
[Recreate state database replicas:]
# metadb -c 3 -af /dev/rdsk/c0t0d0s4
# reboot
Type CTRL-d to boot into multiuser mode.
[Add the node back to the metaset:]
phys-schost-2# metaset -s schost-1 -a -h phys-schost-1