在实际应用中,经常会遇到系统升级,为了减少停机时间,在 AX 中可将 rootvg 克隆到一新硬盘,换硬盘在新硬盘上进行系统升级安装,与此同时用户的应用可维续使用.安装完成后重新启动系统,则启用的是升级以后的新系统.如果因某些原因需要使用老系统,只需修改系统的引导列表,重新启动即可.当确认升级成功,可将老系统的硬盘他用。
在克隆过程中.系统需完成加下工作
1 基于当前系统 rootvg 中内谷产生/ image . data 文件
2 使用系统中未被占用的硬盘,创建 altinst rootvg 卷组
3 .创建前为 alt inst 的逻辑卷和文件系统
4 以当前 rootvg 为本生成备份文件列表,不包含在 exclude list 中的文件
5 将所有文件持到 altinst rootvg 的文件系统上
6 加果指定的话,使用 installp 命令在新的系统中安装系统的更新软件或新的软件包
7 使用 bosboot 命令在 artist rootvg 上创建引导逻辑卷
8 若有指定执行用户的脚本程序
9 卸载文件系统,修改 altinst rootvg 上逻辑卷和文件系统的命名
10 将引导列表改成从替硬盘上引导
1) 准备工作
检查系统安装包
Lslpp –L bos.alt_disk_install,rte; 如无此安装包,则从系统光盘中安装
2) 分配硬盘
克隆系统的目标盘大小需要大于或者等于源盘;以下为例
# lspv hdisk0 0001d2613c5c29e9 rootvg active
hdisk1 0001fe75533b6410 None
hdisk1 的盘大小要大于或 等于 hdisk0 ,如果 rootvg 有两块盘,则需要两块大小和 rootvg 一样的盘。
以 root 用户 登陆 aix 系统
# alt_disk_install -BOC 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_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: hdisk1
# lspv hdisk0 0001d2613c5c29e9 rootvg active
hdisk1 0001fe75533b6410 altinst_rootvg
系统克隆完成了
# alt_disk_install -X
Bootlist is set to the boot disk: hdisk0
# rmdev -dl hdisk1
hdisk1 deleted
把 hdisk1 拔下来,放到新的机器 / 分区中,启动就可以了,这样一台变两台,两台变四台,很快
要点:
1 ,第一台服务器的操作系统要安装完整,补丁打好,需要集群的机器可以把 oracle 等软件装好,补丁也打好
2 ,拔下硬盘或者用分区把硬盘装到别的服务器 / 分区的后,第一次启动的时候,可能提示找不到可供启动的硬盘,这时候可以进入 sms 设定一下启动顺序,设定启动顺序的时候 sms 可以扫描硬盘,发现上面的操作系统。
如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!
赞2
添加新评论0 条评论