免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3583 | 回复: 1
打印 上一主题 下一主题

快速复制系统-alt_disk_install入门 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-18 10:24 |只看该作者 |倒序浏览
适用版本:AIX 52以下\r\n说明: AIX 53以后使用alt_disk_copy命令替换,基本使用参数不变\r\nalt_disk_install 是aix中一个非常好用的工具,其中一个最经常用到的功能就是复制系统。尤其在多台服务器/分区环境要求一致,但是需要快速部署的情况下。\r\n下面的例子就是把已经在服务器上在hdisk0部署好的系统复制到hdisk2上,具体过程如下,所用命令用加重字体显示:\r\n\r\n# lspv\r\nhdisk0          0001d2613c5c29e9                    rootvg          active\r\nhdisk2          \r\nhdisk3          0001fe75533b6410                    None            \r\n# alt_disk_install -C -O hdisk2\r\nCalling mkszfile to create new /image.data file.\r\nChecking disk sizes.\r\nCreating cloned rootvg volume group and associated logical volumes.\r\nCreating logical volume alt_hd5\r\nCreating logical volume alt_hd6\r\nCreating logical volume alt_hd8\r\nCreating logical volume alt_hd4\r\nCreating logical volume alt_hd2\r\nCreating logical volume alt_hd9var\r\nCreating logical volume alt_hd3\r\nCreating logical volume alt_hd1\r\nCreating logical volume alt_hd10opt\r\nCreating logical volume alt_fwdump\r\nCreating /alt_inst/ file system.\r\nCreating /alt_inst/home file system.\r\nCreating /alt_inst/opt file system.\r\nCreating /alt_inst/tmp file system.\r\nCreating /alt_inst/usr file system.\r\nCreating /alt_inst/var file system.\r\nCreating /alt_inst/var/adm/ras/platform file system.\r\nGenerating a list of files\r\nfor backup and restore into the alternate file system...\r\nBacking-up the rootvg files and restoring them to the \r\nalternate file system...\r\nModifying ODM on cloned disk.\r\nBuilding boot image on cloned disk.\r\nResetting all device attributes.\r\nNOTE: The first boot from altinst_rootvg will prompt to define the new system\r\nconsole.\r\nforced unmount of /alt_inst/var/adm/ras/platform\r\nforced unmount of /alt_inst/var\r\nforced unmount of /alt_inst/usr\r\nforced unmount of /alt_inst/tmp\r\nforced unmount of /alt_inst/opt\r\nforced unmount of /alt_inst/home\r\nforced unmount of /alt_inst\r\nforced unmount of /alt_inst\r\nChanging logical volume names in volume group descriptor area.\r\nFixing LV control blocks...\r\nFixing file system superblocks...\r\nBootlist is set to the boot disk: hdisk2\r\n# lspv\r\nhdisk0          0001d2613c5c29e9                    rootvg          active\r\nhdisk2                                              altinst_rootvg            \r\nhdisk3          0001fe75533b6410                    None              \r\n# alt_disk_install -X\r\nBootlist is set to the boot disk: hdisk0\r\n# lspv\r\nhdisk0          0001d2613c5c29e9                    rootvg          active\r\nhdisk2          \r\nhdisk3          0001fe75533b6410                    None                    \r\n# rmdev -dl hdisk2\r\nhdisk2 deleted\r\n把hdisk2拔下来,放到新的机器/分区中,启动就可以了,这样一台变两台,两台变四台,很快\r\n几个要点:\r\n1,第一台服务器的操作系统要安装完整,补丁打好,需要集群的机器可以把oracle等软件装好,补丁也打好(这个是NIM做不到的,当然,前提是把这些东西放到rootvg当中),一定要确定好整体环境,不然以后一台一台补装软件可不好玩,这个是NIM的强项,呵呵。\r\n2,拔下硬盘或者用分区把硬盘装到别的服务器/分区的后,第一次启动的时候,可能提示找不到可供启动的硬盘,这时候可以进入sms设定一下启动顺序,设定启动顺序的时候sms可以扫描硬盘,发现上面的操作系统。\r\n\r\n\r\n补充一下,在LPAR的环境中,尤其在需要做类似DLPAR的操作,alt_disk_install之后,由于复制原因, 是相同的ct_node_id,这个时候需要重新refresh .. 。。\r\n检查所有分区的ct_node_id号,看看是否存在重复的情况\r\n(看/etc/ct_node_id和/var/ct/cfg文件)\r\n如果用户用alt_disk_install命令克隆了一台机器的rootvg,并安装到另一台机器,则这两台机器就会拥有相同的ct_node_id号。\r\n运行/usr/sbin/rsct/install/bin/recfgct命令来更改ct_node_id号。

论坛徽章:
0
2 [报告]
发表于 2009-05-18 10:35 |只看该作者
好东西,支持\r\n先收下了,谢谢lz
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP