2012年(90)
分类: IT业界
2012-01-08 14:05:53
备份操作系统:
# ufsdump –0ucf /dev/rmt/0n /dev/dsk/c0t0d0s0
# ufsdump –0ucf /dev/rmt/0n /dev/dsk/c0t0d0s3
# ufsdump –0ucf /dev/rmt/0n /dev/dsk/c0t1d0s0
# ufsdump –0ucf /dev/rmt/0n /dev/dsk/c0t1d0s1
(2)
更换硬盘:
关闭操作系统:
# shutdown –g0 –y –i0
取出旧硬盘,插入新硬盘;将solaris 8操作系统的software 1/2光盘放入光驱中:
ok boot cdrom –s
(3)
新硬盘重新分区:
对新的系统盘进行分区:
# format
硬盘分区
挂接目录
容量
c0t0d0s0 / 15G
c0t0d0s1 swap 20G
c0t0d0s3 /global/.devices/node@1 512M
c0t0d0s4 /oracle 15G
c0t0d0s5 /home 20G(剩余)
c0t0d0s7 rootdg 512M
# newfs /dev/rdsk/c0t0d0s0
# newfs /dev/rdsk/c0t0d0s3
# newfs /dev/rdsk/c0t0d0s4
# newfs /dev/rdsk/c0t0d0s5
(4)
恢复操作系统:
将磁带放入磁带机中。
恢复根文件系统:
# mount /dev/dsk/c0t0d0s0 /a
# cd /a
# ufsrestore rvf /dev/rmt/0n
# rm restoresymtable
# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s0
# installboot
/usr/sbin/installboot /usr/platform/‘sun4u‘/lib/fs/ufs/bootblk
/dev/rdsk/c0t0d0s0
恢复/global/.devices/node@1文件系统
# mount /dev/dsk/c0t0d0s3 /a
# cd /a
# ufsrestore rvf /dev/rmt/0n
# rm restoresymtable
# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s3
恢复/oracle文件系统
# mount /dev/dsk/c0t0d0s4 /a
# cd /a
# ufsrestore rvf /dev/rmt/0n
# rm restoresymtable
# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s4
恢复/home文件系统
# mount /dev/dsk/c0t0d0s5 /a
# cd /a
# ufsrestore rvf /dev/rmt/0n
# rm restoresymtable
# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s5