Chinaunix首页 | 论坛 | 博客
  • 博客访问: 217572
  • 博文数量: 16
  • 博客积分: 366
  • 博客等级: 一等列兵
  • 技术积分: 268
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-07 11:53
文章分类

全部博文(16)

文章存档

2016年(1)

2015年(2)

2014年(4)

2013年(1)

2012年(5)

2011年(3)

我的朋友

分类: AIX

2015-05-20 14:46:22

AIX6.1 alt_disk_copy方式升级系统版本

 

http://www.ibm.com/developerworks/cn/aix/library/au-alt_disk_copy/

一、实施前的准备工作

1、测试环境

设备类型

 

IBM P550小型机

 

IP地址

 

192.168.1.205

 

系统版本

 

AIX6.1

 

# oslevel -s

6100-01-01-0823

 

磁盘数量

2块,146GB

 

 

2、测试准备

1、安装AIX6.1系统

1)重启设备

2)进入SMS(按1

3)选择安装和引导设备(选择console口配置)

4)使用光驱作为引导设备(normal正常启动)

5)开始安装(按1设置当前终端为主控制台)

6)等待安装完成

7)配置网络地址,修改cosole口设置(保证HMC可以登陆终端),配置root密码

 

 

2、不做镜像(如果已经做了镜像的,请进行拆分)

umirror rootvg

 

reducevg rootvg hdisk1

 

 

3、检查当前引导盘的设置情况

bootlist –m normai -o

 

4、查看要使用的PV(另一块盘)

 

# lspv

hdisk0          0041a97b0622ef7f                    rootvg          active

hdisk1          00452f0b2b1ec84c                    None

 

确认这个磁盘目前没有分配给任何卷组

 

 

 

二、操作步骤

一、克隆rootvg

 

1、运行alt_disk_copy –d hdsik1

 

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 /alt_inst/ file system.

Creating /alt_inst/home file system.

Creating /alt_inst/opt file system.

Creating /alt_inst/tmp file system.

…......

…......

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/tmp

forced unmount of /alt_inst/opt

forced unmount of /alt_inst/home

…..

…..

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

 

 

2、检查克隆后的PV状态

 

现在,有了一个克隆的 rootvg,它的名称是 altinst_rootvg。注意,前面的输出表明,alt_disk_copy 已经把引导列表改为从克隆的 rootvg(现在是 hdisk1)引导。

# lspv

hdisk0          0041a97b0622ef7f                    rootvg          active

hdisk1          00452f0b2b1ec84c                    altinst_rootvg

可以通过执行 bootlist 命令确认这一点。

# bootlist -m normal -o

hdisk1 blv=hd5

 

 

3、修改引导盘的顺序

 

bootlist -m normal –o hdsik0

 

二、升级AIX系统

1、从IBM支持中心下载所需的AIX升级包

 

 

 

 

System Model: IBM,8233-E8B
Machine Serial Number: 06A400R

 

 

 

2、将升级包使用ftp上传到新建的目录里去(在系统里开启FTP服务和功能)

 

3、进入安装包的目录

 

 

 

4、使用smitty install开始升级

Update Installed Software to Latest Level (Update All)

 

Type or select values in entry fields.      

Press Enter AFTER making all desired changes.

 

                                                        [Entry Fields]

* INPUT device / directory for software               .

* SOFTWARE to update                                  _update_all

  PREVIEW only? (update operation will NOT occur)     no                     +

  COMMIT software updates?                            yes                    +

  SAVE replaced files?                                no                     +

  AUTOMATICALLY install requisite software?           yes                    +

  EXTEND file systems if space needed?                yes                    +

  VERIFY install and check file sizes?                no                     +

  DETAILED output?                                    no                     +

  Process multiple volumes?                           yes                    +

  ACCEPT new license agreements?                      yes                    +

  Preview new LICENSE agreements?                     no                     +

   

 

 

Esc+1=Help          Esc+2=Refresh       Esc+3=Cancel        Esc+4=List

Esc+5=Reset         F6=Command          F7=Edit             F8=Image

                    

5、升级成功

Oslevel  -s

 

6100-03-01-0921

 

6、重启设备

 

rootvg正常启动

克隆后的rootvg亦可正常启动

 

7、删除克隆的rootvg

# alt_rootvg_op -X altinst_rootvg

 

 

三、回退

1、如果升级失败,则使用克隆的VG引导系统启动

# lspv

hdisk0          0041a97b0622ef7f                    rootvg          active

hdisk1          00452f0b2b1ec84c                    altinst_rootvg

 

·         rootvg:升级后有问题的拷贝。

·         altinst_rootvg :升级前的正常拷贝。

  1. 要想返回到升级前的状态,只需把引导列表改为从 hdisk1 (altinst_rootvg) 引导,然后重新引导。
  1. # bootlist -m normal -o hdisk1
  2. hdisk1 blv=hd5
  3. # bootlist -m normal -o
  4. hdisk1 blv=hd5
  5. # shutdown -Fr
  1. 重新引导之后,rootvg 磁盘如下:
  1. # lspv
  2. hdisk0          0041a97b0622ef7f                    old_rootvg
  3. hdisk1          00452f0b2b1ec84c                    rootvg          active
  1. 接下来,执行 bosboot 并检查引导列表:
  1. # bosboot -a
  2. bosboot: Boot image is 35803 512 byte blocks.
  3. # bootlist -m normal -o
  4. hdisk1 blv=hd5
  1. 系统现在已经回到了升级前的状态。

 

 

 

2、修复系统故障后,又使用原来的rootvg引导

把引导列表改为从 hdisk0 (old_rootvg) 引导并重新引导:

# bootlist -m normal -o hdisk0

# shutdown -Fr

重新引导(准备应用修复措施)之后,现在的 rootvg 磁盘如下:

# lspv

hdisk0          0041a97b0622ef7f                    rootvg          active

hdisk1          00452f0b2b1ec84c                    altinst_rootvg

假设系统现在又可以正常操作了。

测试系统之后,令把 hdisk1 重新放回 rootvg 中:

#

alt_rootvg_op -X altinst_rootvg

Bootlist is set to the boot disk: hdisk0

# extendvg -f rootvg hdisk1

# mirrorvg rootvg hdisk1

bootlist -m normal -o hdisk0 hdisk1

hdisk0 blv=hd5

hdisk1

# bosboot -a

 

bosboot: Boot image is 35803 512 byte blocks.

#  bootlist -m normal -o

hdisk0 blv=hd5

hdisk1 blv=hd5

# lspv

hdisk0          0041a97b0622ef7f                    rootvg          active

hdisk1          00452f0b2b1ec84c                    rootvg          active

 

 

 

 

阅读(2779) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~