Chinaunix首页 | 论坛 | 博客
  • 博客访问: 365532
  • 博文数量: 78
  • 博客积分: 3274
  • 博客等级: 中校
  • 技术积分: 686
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-06 12:47
文章分类

全部博文(78)

文章存档

2017年(1)

2016年(2)

2015年(2)

2014年(1)

2013年(5)

2012年(22)

2011年(8)

2010年(31)

2009年(6)

分类: 系统运维

2012-08-14 20:52:08


ZZ from

适用版本:AIX 52以下
说明: AIX 53以后使用alt_disk_copy命令替换,基本使用参数不变

alt_disk_install 是aix中一个非常好用的工具,其中一个最经常用到的功能就是复制系统。尤其在多台服务器/分区环境要求一致,但是需要快速部署的情况下。

下面的例子就是把已经在服务器上在hdisk0部署好的系统复制到hdisk2上,具体过程如下,所用命令用加重字体显示:

# lspv
hdisk0          0001d2613c5c29e9                    rootvg          active
hdisk2          0001f0755343a7f3                    None            
hdisk3          0001fe75533b6410                    None            

# alt_disk_install -C -O hdisk2
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_fwdump
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/usr file system.
Creating /alt_inst/var file system.
Creating /alt_inst/var/adm/ras/platform 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.
Resetting all device attributes.
NOTE: The first boot from altinst_rootvg will prompt to define the new system
console.
forced unmount of /alt_inst/var/adm/ras/platform
forced unmount of /alt_inst/var
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst
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: hdisk2

# lspv
hdisk0          0001d2613c5c29e9                    rootvg          active
hdisk2          0001f0755343a7f3                    altinst_rootvg            
hdisk3          0001fe75533b6410                    None              

# alt_disk_install -X
Bootlist is set to the boot disk: hdisk0

# lspv
hdisk0          0001d2613c5c29e9                    rootvg          active
hdisk2          0001f0755343a7f3                    None            
hdisk3          0001fe75533b6410                    None                    

# rmdev -dl hdisk2
hdisk2 deleted

把hdisk2拔下来,放到新的机器/分区中,启动就可以了,这样一台变两台,两台变四台,很快

几个要点:

1,第一台服务器的操作系统要安装完整,补丁打好,需要集群的机器可以把oracle等软件装好,补丁也打好(这个是NIM做不到的,当然,前提是把这些东西放到rootvg当中),一定要确定好整体环境,不然以后一台一台补装软件可不好玩,这个是NIM的强项,呵呵。

2,拔下硬盘或者用分区把硬盘装到别的服务器/分区的后,第一次启动的时候,可能提示找不到可供启动的硬盘,这时候可以进入sms设定一下启动顺序,设定启动顺序的时候sms可以扫描硬盘,发现上面的操作系统。
阅读(586) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~