ITPub博客

首页 > Linux操作系统 > Linux操作系统 > alt_disk_copy复制rootvg

alt_disk_copy复制rootvg

原创 Linux操作系统 作者:westzq1984 时间:2009-05-15 00:56:59 0 删除 编辑

alt_disk_copy可以用于复制root卷组,相当于是克隆,复制出来的卷组可以拿到其他机器上去用,不用守着装系统,
如果把oracle的软件也直接装在root卷组上的话,那么做双机就好方便了爽

# alt_disk_copy -d hdisk1
Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_hd5
Creating logical volume alt_hd6
Creating logical volume alt_hd8
Creating logical volume alt_hd4
Creating logical volume alt_hd2
Creating logical volume alt_hd9var
Creating logical volume alt_hd3
Creating logical volume alt_hd1
Creating logical volume alt_hd10opt
Creating logical volume alt_fslv00
Creating /alt_inst/ file system.
Creating /alt_inst/home file system.
Creating /alt_inst/opt file system.
Creating /alt_inst/tmp file system.
Creating /alt_inst/u01 file system.
Creating /alt_inst/usr file system.
Creating /alt_inst/var file system.
Generating a list of files
for backup and restore into the alternate file system...
Backing-up the rootvg files and restoring them to the
alternate file system...
Modifying ODM on cloned disk.
Building boot image on cloned disk.
forced unmount of /alt_inst/var
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/u01
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst
Changing logical volume names in volume group descriptor area.
Fixing LV control blocks...
Fixing file system superblocks...
Bootlist is set to the boot disk: hdisk1 blv=hd5

--注意,alt_disk_copy完成后,会修改为从克隆的镜像启动,需要修改回来
# bootlist -m normal hdisk0

--为了避免IP冲突,最好把机器的IP换一个

--将复制的硬盘取出,插入B机后
bash-3.00# lsdev -C|grep disk
hdisk0     Defined   10-60-00-10,0 Other SCSI Disk Drive
hdisk1     Available 10-60-00-10,0 Other SCSI Disk Drive
hdisk2     Available 10-61-00-0,0  Other SCSI Disk Drive

--按照这个脚本,删除ODM库中的磁盘信息,重新识别下磁盘
--参考
http://bbs.chinaunix.net/archiver/?tid-1080353.html
lsdev -Cc disk | awk '{ print $1 }' | while read HDname; do
odmdelete -q "name = $HDname" -o CuAt
odmdelete -q "value = $HDname" -o CuAt
odmdelete -q "name = $HDname" -o CuDv
odmdelete -q "value3 = $HDname" -o CuDvDr
odmdelete -q "name = $HDname" -o CuVPD
done
rm -f /dev/hdisk*
rm -f /dev/rhdisk*
savebase
shutdown -Fr

--重新启动后,直接可以访问hdisk0,不用再去改bootlist,本来还幻想着进维护模式去搞一下,看来省了
bash-3.00# lsdev -C|grep disk
hdisk0     Available 10-60-00-10,0 Other SCSI Disk Drive
hdisk1     Available 10-61-00-0,0  Other SCSI Disk Drive

--完成后,还应该注意,ODM中有alt_disk_copy过程中建立的临时的vg old_rootvg这样的,用exportvg删除

另外,记录下 修改网卡顺序名的方法,上次装RAC就遇到这个网卡名不一致,当时是IBM的人解决的,明天测试下这个
http://www.loveunix.net/thread-82533-1-1.html
还有个 使用虚设备修改hdisk序号
http://blog.chinaunix.net/u/16252/showart_105455.html


 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8242091/viewspace-598189/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-04-06

  • 博文量
    251
  • 访问量
    969071