Sun Cluster 3.0 系统管理指南

8.3.3.1 示例-恢复元设备 (Solstice DiskSuite) 上原有的根 (/) 文件系统

以下示例展示从磁带设备 /dev/rmt/0 恢复到 节点 phys-schost-1 的根 (/) 文件 系统。从群集中的另一节点 phys-schost-2 运行 了 metaset 命令,以移除 phys-schost-1,稍后再将它 重新添加到元集 schost-1 中。所有其他命令都是 从 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