Chinaunix首页 | 论坛 | 博客
  • 博客访问: 657174
  • 博文数量: 109
  • 博客积分: 6081
  • 博客等级: 准将
  • 技术积分: 1318
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-24 10:28
文章分类
文章存档

2011年(8)

2010年(39)

2009年(62)

分类:

2009-11-07 13:51:00

Clone a rootvg Using Alternate Disk Installation

Using this scenario, you can clone AIX running on rootvg to an alternate disk on the same system, install a user-defined software bundle, and run a user-defined script to customize the AIX image on the alternate disk. Because the alternate disk installation process involves cloning an existing rootvg to a target alternate disk, the target alternate disk must not be already assigned to a volume group.

In this scenario you will do the following:

    * Prepare for the alternate disk installation
    * Perform the alternate disk installation and customization
    * Boot off the alternate disk
    * Verify the operation

Step 1. Prepare for the Alternate Disk Installation

   1. Check the status of physical disks on your system. Type:

      # lspv

      Output similar to the following displays:

      hdisk0         0009710fa9c79877    rootvg       active
      hdisk1         0009710f0b90db93    None     

      We can use hdisk1 as our alternate disk because no volume group is assigned to this physical disk.
   2. Check to see if the alt_disk_install fileset has been installed by running the following:

      # lslpp -L bos.alt_disk_install.rte

      Output similar to the following displays if the alt_disk_install fileset is not installed:

      lslpp: 0504-132  Fileset bos.alt_disk_install.rte not installed.

   3. Using volume 2 of the AIX installation media, install the alt_disk_install fileset by running the following:

      # geninstall -d/dev/cd0 bos.alt_disk_install.rte

      Output similar to the following displays:

      +-----------------------------------------------------------------------------+
                                      Summaries:                                     
      +-----------------------------------------------------------------------------+
                                                                                     
      Installation Summary                                                          
      --------------------                                                          
      Name                        Level           Part        Event       Result    
      -------------------------------------------------------------------------------
      bos.alt_disk_install.rte    5.2.0.0         USR         APPLY       SUCCESS   

   4. Create a user-defined bundle called /usr/sys/inst.data/user_bundles/MyBundle.bnd that contains the following filesets:

      I:bos.content_list
      I:bos.games

      For more information on how to create a user-defined software bundle, refer to Create and Install a Software Bundle.
   5. Create a user-defined customization script called /home/scripts/AddUsers.sh that contains the following:

      mkuser johndoe
      touch /home/johndoe/abc.txt
      touch /home/johndoe/xyz.txt

Step 2. Perform the Alternate Disk Installation and Customization


   1. To clone the rootvg to an alternate disk, type the following at the command line to open the SMIT menu :

      # smit alt_clone

   2. Select hdisk1 in the Target Disk to Install field.
   3. Select the MyBundle bundle in the Bundle to Install field.
   4. Type /dev/cd0 in the Directory or Device with images field.
   5. Type /home/scripts/AddUsers.sh in the Customization script field.
   6. Press Enter to start the alternate disk installation.
   7. Check that the alternate disk was created, by running the following:

      # lspv

      Output similar to the following displays:

      hdisk0         0009710fa9c79877    rootvg            
      hdisk1         0009710f0b90db93    altinst_rootvg    

Step 3. Boot From the Alternate Disk

   1. By default, the alternate-disk-installation process changes the bootlist to the alternate disk. To check this run the following:

      # bootlist -m normal -o  

      Output similar to the following displays:

      hdisk1

   2. Reboot the system. Type:

      # shutdown -r

      The system boots from the boot image on the alternate disk (hdisk1).

Step 4. Verify the Operation

   1. When the system reboots, it will be running off the alternate disk. To check this, type the following:

      # lspv

      Output similar to the following displays:

      hdisk0         0009710fa9c79877    old_rootvg 
      hdisk1         0009710f0b90db93    rootvg     


   2. Verify that the customization script ran correctly, by typing the following:

      # find /home/johndoe -print      

      Output similar to the following displays:

      /home/johndoe                    
      /home/johndoe/.profile           
      /home/johndoe/abc.txt            
      /home/johndoe/xyz.txt            

   3. Verify that the contents of your software bundle was installed, by typing the following:

      # lslpp -L bos.games bos.content_list                                        

      Output similiar to the following displays:

        Fileset                      Level  State  Description                     
        ----------------------------------------------------------------------------
        bos.content_list           5.2.0.0    C    AIX Release Content List        
        bos.games                  5.2.0.0    C    Games 



---------------------------------------------------------------------------------
备用硬盘安装(Alternate disk installation)


系统允许使用备用硬盘安装方式(Alternate disk installation),可以使系统在启动和运行时安装系统软件,极大的降低了由于系统软件安装或升级造成的宕机时间。

在AIX 4.3版本以后,系统允许使用备用硬盘安装方式(Alternate disk installation),这种方式可以使系统在启动和运行时安装系统软件,极大的降低了由于系统软件安装或升级造成的宕机时间。它增强了系统在升级时的灵活性,因为系统安装有可能持续很长一段时间,而此时系统仍旧可以运行在已存在的系统上。切换到新版本只需简单重新启动机器即可。

备用硬盘安装(Alternate disk installation)
需要一些文件束的支持。如果不使用Network Install Management (NIM) ,并且使用mksysb安装方式,需要安装bos.alt_disk_install.boot_images 。bos.alt_disk_install.boot_images必需安装到clone rootvg. 在安装完此文件束后,可以通过smit alt_install使用此功能。

可以使用下面两种方式做备用硬盘安装(Alternate disk installation)
1.克隆当前正在运行的rootvg到备用硬盘
2.安装mksysb映像到其他硬盘。

一。备用硬盘rootvg克隆
备用硬盘rootvg克隆的优点:
·在发生灾难性事件时,系统仍有一个在线备份。(需要额外的在线硬盘)
·提供新的维护级别或升级版本。

操作方法:
#smitty alt_clone

Alternate Disk Installation

Move cursor to desired item and press Enter.

Install mksysb on an Alternate Disk
Clone the rootvg to an Alternate Disk

F1=Help --------F2=Refresh ----F3=Cancel ----Esc+8=Image
Esc+9=Shell ----Esc+0=Exit ----Enter=Do


二:备用 mksysb 安装

备用 mksysb 安装是将从其他系统生成的mksysb映像安装到目标系统的备份硬盘上。mksysb映像(AIX 4.3 或更高版本)将要安装的系统的硬件配置要与原系统的硬件配置相同,或着mksysb映像中所有的设备和内核可以安装在有不同的机器型号,不同的平台和不同的设备的目标系统上。

#smitty alt_mksysb

Install mksysb on an Alternate Disk

Type or select values in entry fields.
Press Enter AFTER making all desired changes.
      [Entry Fields]      
* Target Disk(s) to install     []     +
* Device or image name     []     +
Phase to execute     all     +
image.data file     []     /
Customization script     []     /
Set bootlist to boot from this disk            
on next reboot?     yes     +
Reboot when complete?     no     +
Verbose output?     no     +
Debug output?     no     +
resolv.conf file     []     /

F1=Help --------F2=Refresh --------F3=Cancel -----F4=List
Esc+5=Reset ----Esc+6=Command -----Esc+7=Edit ----Esc+8=Image
Esc+9=Shell ----Esc+0=Exit --------Enter=Do

一旦mksysb映像安装到新硬盘,系统在下一次启动时将从新硬盘启动。                          
阅读(1226) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~