RSS

Category Archives: AIX

NIM Install Handbook

NIM Server: NS

NIM Client: NC               ##none OS, will install a clone from MA

Machine A: MA              ##AIX5306

 

Make a Clone Image:

on MA:

#smitty mksysb

*Backup DEVICE or FILE  “/backup/img/aix5305.mksysb             ##the full path name

After completed, sent to NS by ftp/sftp. Because NIM Install donot support NFS filesystem.

 

NIM Server Configure LPP Source & SPOT:

Insert the CD AIX-5300.

on NS:

#smitty nim

Configure the NIM Environment     Configure a Basic NIM Environment (Easy Startup)

Basic Installation Resources:     [cd0]

LPP_SOURCE…

SPOT…

 

Add a NIM Client: NC

on NS:

#echo “192.168.1.2 NCname” >>/etc/hosts         

### 192.168.1.2 ==NIM Client IP Address, NCname == Nim Client hostname ###

#smitty eznim

Configure as a NIM MasterAdd client to the NIM environment

Machine Type [standalone]

 

Update the SPOT

As our mksysb image is AIX5306, but the spot we just created is based on AIX 5300 CD, we have to update spot to the same os level with mksysb

go to IBM fixcenter:

http://www-912.ibm.com/eserver/support/fixes/fixcentral/pfixpacks/53

download the fix pack to /tmp/5306fixpack

 

on NS:

#smitty nim

Perform NIM Software Installation and Maintenance TasksSoftware Maintenance and UtilitiesAdd Software to an lpp_source

choose the LPP_Source name we just made.

Media, directory or lpp_source to copy images from [/tmp/5306fixpack]

SOFTWARE Packages to Add [all]

 

after finished

update SPOT

#smitty nim

Perform NIM Software Installation and Maintenance Tasks — Install and Update Software — Update Installed Software to Latest Level (Update All)

 

Define a mksysb resource

on NS

#smitty nim

Perform NIM Administration TasksManage ResourcesDefine a Resource

mksysb = a mksysb image

*Server of Resource [NSname]

*Location of Resource [mksysb DIR]

 

Define a group

on NS:

#smitty nim

Perform NIM Administration Tasks — Manage Groups — Define a Group — Define a Resource Group

GroupName [basic_res_grp]

 

Start installing NIM Client:

on NS:

#smitty eznim

Configure as a NIM Master — Reinstall clients

Wait for “OK”

 

on NIM Client:

boot from SMS mode.

Setup Remote IPL (remote initial program load setup)

IP Parameter

Client IP Address: NC_IP

Server IP Address : NS_IP

Gateway IP Address:

Subnet Mask:

 

Esc (back to manu)

execute ping test

wait for the success screen:

                                                            Ping Success

 

back to main manu:

Select Boot Options

Select Instlall/Boot Device

Network

Normal Boot Mode

 

Soon starting…

 
Leave a comment

Posted by on December 10, 2007 in AIX

 

VIOS Install & Configuration

Redbook:

Advanced POWER Virtualization on IBM System p5 Introduction and Configuration

Using the Virtual I/O Server

How to set up the IBM Virtual I/O Server

http://www.ibm.com/developerworks/aix/library/au-aix-vioserver-v2/index.html

First, Virtual feature need $$$. (Just like Windows, enter a license code…)

Create a VIOS:

Expand Configuration – Create Logical Partition, choose “VIO Server”.

Concept:

Minimum, Desired, Maximum

While creating the VIOS, it need to specify the above 3 value for CPU and Memmory.

Normally, Machine will be the desired value after boot.

Minimum: Represents the absolute memory/CPU required to make the partition active

Desired: Will be allocated to the machine.

Maximum : Represents the absolute maximum amount of memory/CPU for this partition.

Capped or UNcapped

Capped: it can only gain processing power through a DLPAR allocation, and will otherwise stay at the value (desired) given to it at time of activation.

UNcapped: It can exceed the value set in Desired virtual processors and it can take however many processing units from the shared processor pool that it needs.

Weight: The priority, increasing it beyond 128 up to 256 increases a partition’s priority

for processor allocation. If a partition’s uncapped’s weight is set to 0, then that partition is considered capped and it will never own a number of processors greater than that specified in Desired processing units.

Add physical I/O

Desired: Can not remove by DLPAR (you can shutdown, modify profile, restart to change.)

Request: Can remove or move to other LPAR, (Such as CD-Rom)

Create Virtual I/O

SCSI Adapter:

SCSI severs: depend on how many LPARs do you want.

VIO Client VG -> SCSI Client ->(connected to) SCSI Server.

VLAN

Physical (ent0) -> Virtual (ent1) on Server ->

Create a VIO Server:

Create LPAR -> CPU/Memory -> Create Virtual Adapter (SCSI Server, VLAN)

Notes: While Create SCSI Server, mark the Virtual ID. Create VLAN, remember the VLAN ID. The VLAN ID on client must be the same with SEA(Virtual LAN) ID, as we saw the above map.

Install VIOS:

I don’t know what’s wrong with VIOS 1.4, I cannot boot from the CD, it’s hang on “Starting Kernel” on HMC, and there are a few such cases on internet by google it..

So I can only install from the HMC by command.

Open Command Terminal on HMC (not recommend on your PC’s windows, it take a long time to install.. in my cae.)

Run the following command:

#installios

Choose the VIOS you wanna re-install…

Starting….

This damn VIOS make me 12 hours to finish the installation…>_<|||| what a ….

Actually, VIOS is pack with AIX, and a little different.

After finish, login with the admin user for VIOS “padmin” without password, and then you will ask to be change the password.

The shell with padmin is a restrict-ksh, you can not use a lot of shell command, however, we can change to root by running the following command in padmin:

$oem_setup_env

Then you are root now.


Configuration for VIOS:


Our VLAN Setting:


SCSI Setting:


Login by padmin

$lsdev –virtual #make sure thereare virtual scsci(vhost) and virtual lan

$lsmap –all –net #check out all the virtual net adapter

$ mkvdev -sea ent0 -vadapter ent1 -default ent1 -defaultid 88

ent3 Available

There is an error message?

“Method error (/usr/lib/methods/cfgsea): 0514-040 Error initializing a device into the kernel.”

Do the following:

1). Verify that the physical and virtual adapters that are being used to create the shared Ethernet device are available by running the following command: lsdev -type adapter

2). Make sure that the physical adapter is not configured. Run the following command: netstat -state The adapter should not show in the output.

3). Verify that the virtual adapters used are trunk adapters by running the following command: entstat -all entX | grep Trunk

Still can not work?

You must configure the adapter before running this command..

Disable the enX, and remove them by running “rmvdev –vdt enX” X=0,1,2,3,4…

Then reboot the machine, try the above command again.


Create VG for Clients:

$ mkvdev -vdev rootvg_nim -vadapter vhost1 -dev vnim

Rootvg_nim is a lv name in our VIOS rootvg, it will be the rootvg on Client.

Vhost1 is the SCSI server we created.

After these steps, we can install AIX on client:


Create a Client:

Do not choose any physical I/O (except CD-ROM, set to “require”)

Create SCSI client, and connect to SCSI server, create a VLAN, set the VLAN ID to the map above.

Set the CPU/Memory,…balabal…

Insert AIX CD(as we set CD-ROM is require for this client, make sure no server is using it), boot from SMS mode, install AIX…

 
Leave a comment

Posted by on December 9, 2007 in AIX

 

Hardware Management Console –Install

It looks like that there is no update a long time here, actually I did, but not on the web.

 

HMC – Hardware Management Console
*********************************
Redbook
Hardware Management Console Handbook V7

 

As there’s only a HMC V6 CD coming with the machine, The installation is easy.
Insert CD1 — Boot — Installing … …
Install additional software (yes)
Insert CD2 — Installing … …

 

Welcome to HMC.

 

Launch Guided Setup Wizard:
Note: If you are connecting the HMC to the model 9118-575 server or the 590 or 0595 managed servers, you must configure the HMC in a private DHCP network.

 

Choosing a private network

Designate the first HMC network interface as private if any of the following is true:

·       Only the HMC and service processors will be endpoints on that network.

·       All elements will be connected in a single subnet, and you will not be routing or switching.

·       You want the HMC to automatically configure and detect the managed systems associated with those service processors.

·       You want to keep the service network isolated behind the HMC.

Choosing an open network

Designate the first network interface as open if you want to run the communications between the HMC and the service processors across an open network that crosses multiple subnets or has other devices on the network.

Please refer to:

http://publib.boulder.ibm.com/infocenter/systems/scope/hw/index.jsp?topic=/iphai/privpubnetwork.htm

 

Connecting Managed Servers:

If it is the first time to install HMC:

Attention: When installing a new p system, do not power on the system
before connecting it to an HMC. The Server processor (SP) on a System p
system is a DHCP client and will search for a DHCP server to obtain its IP
address. If no DHCP server can be found, then the SP will assign a default IP
address. If this occurs, you will have to use ASM to manually change the IP
setting of the SP.

 

Add Managed Servers manually:

Add a managed server, find it in the IP range (eg. 192.168.0.1 ~ 192.168.0.255) or add by IP address if you knew the IP, this IP is assigned by route? anyway, not the OS IP…

 

As the latest HMC Handbook is Version 7, there’s not enough information for HMC V6, and the WebSM is too slow, not support browser…

 

 

Upgrade HMC V6 to V7

http://publib.boulder.ibm.com/infocenter/systems/scope/hw/index.jsp?topic=/iphai/privpubnetwork.htm

 

Notes:

Importane: "Step 4. Back up critical console information"

If it’s fail while upgrading, you can restore by this critical data, but do not use HMC V7 to restore the critical data of V6….

 

HMC Version 7  to download:

https://www14.software.ibm.com/webapp/set2/sas/f/hmc/home.html

 

The HMC Recovery DVD V7 R3.2.0

ftp://ftp.software.ibm.com/software/server/hmc/recovery_images/HMC_Recovery_V7R3.2.0_1.iso

ftp://ftp.software.ibm.com/software/server/hmc/recovery_images/HMC_Recovery_V7R3.2.0_2.iso

 

Burn them into DVD, though V7 support install by network, I tried but failed…DVD should come easier…You don’t have to do any operation on the managed system, upgrade the HMC won’t affect them.

 

Insert DVD — Repeat the installation just like HMC6

 

Launch Guided Setup Wizard — Reboot.

 

Oh~ No managed system in the HMC management server, yep. We need to add them by ourselves.

 

What? You have added them, but cannot access? it need password?

Right, you input a password at the first time you added them, that is not the hscroot password, it’s the  HMC access password, try "admin"

 

God damn it, Locked?

You can wait for 5 mins, and try again. or reset it:

http://www-1.ibm.com/support/docview.wss?uid=nas1c7c7e536938dc56686256ee70010f2c7

 

Systems ManagementServers –choose the server you wanna reset

Expand: OperationsAdvanced System Management (ASMI) — open it

 

login with user "admin" and default password "admin"

 

Expand Login Profile , and then select Change Password .

User ID to change "HMC Access"

Note: The Current password for current user field indicates the user signed on ASM and is not necessarily the User ID to change.

 

If unfortunately, you change the admin’s password and got it lost….ummmmm, it’s a big problem, refer to here:

 

http://publib.boulder.ibm.com/infocenter/systems/scope/hw/index.jsp?topic=/iphby/resetadminpwd.htm

 

Resetting the ASMI administrator password

You can reset the administrator password by either of the following methods:

·       Contact an authorized service provider

·       Use the reset toggle jumpers on the service processor

To reset the toggle jumper on the service processor, move both service processor reset toggle switches from their current position to the opposite position. For information about how to use the reset toggle jumpers, refer to the remove and replace procedure for your system model in the Service processor assembly, service processor cable, and time-of-day-battery topic.

 

 

Everything goes well?

Update the firmware for each managed system:

An exclamation mark beside the server indicated there might be a problem need to fix on firmware.

 

For HMC 7

 

1.Ensure that the managed systems and power frames (if you have a model 575 or 59x server) are in the correct state.

a.  From the HMC, select Server and Partition.

b.  Select Server Management and ensure that the State is Power Off, Standby, or Operating.

c.   If you have a model 575 or 59x server, select Frame Management and ensure that the state is Standby.

 

2.Perform the following steps:

a.  Expand the Licensed Internal Code Maintenance folder.

b.  Click the Licensed Internal Code Updates icon.

 

I am a problem boy… I did it but fail once…The system state is Operating. In fact, it is already the latest firmware, but IBM also show me a list while updating….then I click “OK”, a lower version…

Then something bad happened, a fatal error, the server is unavailable. Oh, shit… It can not be power off or remove the firmware or re-install…In a word, you can not do anything, it always pops up the error message…At last, press the power button to force shutdown, it comes quite…on HMC, power off the it too, after the state is “power off”, update Licensed Internal Code to the latest one again.

 

Q&A

 

1, Can I su to root remotely on HMC?

 

Basically NO, you need to apply for it through IBM, and play trick by google it.

If you are in front of the HMC machine:

You can become root by toggling Ctrl-Alt-F1 (Ctrl-Alt-F2 to exit) between the Gui and the command line, and su from hscroot to root.

 

2, Can HMC 6 be accessed by browser?

 

It seems NO, but HMC 7 can, support Opera/Firefox /IE.

Opera is so amazing…

 

3, How to make the font larger and beautiful on WebSM by opening a Virtual Terminal?

 

Right click the shortcut of WebSM — Options — Current Code Page – set to “U.S”

 
Leave a comment

Posted by on December 5, 2007 in AIX

 

漫谈IBM pSeries的逻辑分区和动态逻辑分区

From: http://www-900.ibm.com/cn/support/nav/200303/p04.shtml

简介:


LPAR
即逻辑分区指的是将一个物理的服务器划分成若干个虚拟的或逻辑的服务器,每个虚拟的或逻辑的服务器运行自己独立的操作系统,有自己独享的处理器、内存和
I/O资源。动态逻辑分区允许在不中断应用操作的情况下,增加或减少分区占用的资源。IBM将这些灵活的技术从大型机(mainframe)
平台带到了基于POWER4处理器的IBM pSeries平台上从而极大的降低了该技术的价格和成本。

下面的内容将会介绍逻辑分区和动态逻辑分区的一些概念和结构:

(一)逻辑分区和动态逻辑分区需要哪些软硬件支持?

(二)硬件管理控制台 (HMC)

(三)LPAR的内存分配策略

(四)动态 LPAR (5.2.0) 简介和体系架构

(五)动态 LPAR (5.2.0) 如何动态分配CPU、内存和I/O设备及花费时间的考虑

一、逻辑分区和动态逻辑分区需要哪些软硬件支持?

逻辑分区和动态逻辑分区软硬件支持表

IBM pSeries 支持分区的服务器的机型

LPAR

动态LPAR

最大分区的个数

pSeries 630 6c1

支持

支持

4

pSeries 630 6E1

支持

支持

3

pSeries 650

支持

支持

8

pSeries 655

支持

支持

4

pSeries 670

支持

支持

16

pSeries 690

支持

支持

32

上面的服务器需要配置硬件管理控制台 (HMC) 才可以支持逻辑分区和动态逻辑分区。


对于上面的服务器是否可以使用动态LPAR,还要看安装在服务器上的软件: 可以使用动态 LPAR : 在动态 LPAR
可用状态下,调整资源的分配可以不需要停止或重新启动相关的分区。如果希望实现动态LPAR需要在相关的分区安装 AIX 5L 5.2
版本,并且HMC recovery 软件必须至少是3.1 版本(或更高)。 如果分区运行的是 AIX 5L 5.1
版本或Linux操作系统,则不可以使用动态逻辑分区。


不可以使用动态 LPAR: 如果没用动态LPAR的功能, 分区的资源是静态的。动态LPAR对于运行AIX 5L 5.1
版本或Linux操作系统是不可用的。当需要改变或重新配置分区的资源时,由于没有动态LPAR,所有相关的分区必须被停止或重新启动以使得资源的改变生
效,但是不会影响其它分区的操作。 (一个服务器的分区可以同时拥有可以做动态LPAR的分区和不能做动态LPAR 的分区。)

注意:Reboot一个正在运行的分区只会重新启动分区上的操作系统并不会重新启动LPAR. 如果想要重新启动LPAR,必须shut down 操作系统然后再启动操作系统,不能用reboot方式。

每个LPAR至少需要一些资源,下面是每个LPAR的最小需求:

  1. 每个分区至少一个处理器。
  2. 至少256 MB 内存。
  3. 至少有一块硬盘用于安装和存储操作系统(对于AIX, 做为rootvg)。
  4. 至少一块硬盘适配器或集成的适配器用于连接硬盘。
  5. 至少一块网卡用于每个分区与HMC的连接。
  6. 每个分区必须有一个安装模式, 例如NIM。

二、硬件管理控制台 (HMC)


在LPAR模式中,IBM硬件管理控制台 (HMC)
是必须的。可以使用一个专用的7315-C01,7315-C02或在p670和p690上的一个已存在的HMC(功能编号:7316)作为硬件管理控制
台。如果服务器是应用于全系统分区模式(即没有做LPAR),则不需要配置HMC(只限对于p630和p650,若是p670,p690不论是否做
LPAR,都必须配置HMC)。


HMC 是一个专用的桌面工作站,可以提供一个图形用户接口,用于配置和管理没有分区的服务器、做分区 (LPAR
)服务器或集群环境的pSeries 服务器。它通过安装一组硬件管理应用软件在服务器上配置和划分分区。一个HMC能够控制多台pSeries
服务器。目前,一个HMC最多可以同时支持16台没有做集群的pSeries 服务器和最多64个LPAR。

HMC 通过特殊的连接线连接到服务器上。不论服务器需要划分多少个分区,均只需要一个串口将HMC连接到服务器上。

由于这些连接线有长度的限制:最长15米, 为了延伸连接长度,可以采用下面的方式:

  • HMC可以用于远程操作。用于远程操作的HMC必须首先通过一个网络连接将HMC连接到服务器上。
  • AIX 5L Web-based System Manager Client(WebSM)
    可以管理HMC的网络连接;或者使用Web-based System Manager PC
    client,该软件运行在Windows操作系统或Linux操作系统上。WebSM client 应用程序是一个嵌入HMC 的图形用户接口
    (GUI). 通过控制面板可以访问控制网络上的其它HMC。

  • 当使用128端口的异步控制卡时,RS-422 线缆将连接到一个RAN的盒子上, 其长度可达到330米。这个盒子可以用连接线缆将HMC端口和服务器相连。因此当使用15米连接线缆时,最远距离可达到345米,整根线缆的长度都可以用到。

HMC提供一系列功能用于管理和配置LPAR。这些功能包括:

  • 创建和存储LPAR的profile,用于定义分配给每个独立分区的处理器、 内存和I/O 资源。
  • 启动、停止和重新设置系统分区。
  • 通过选择一个profile启动引导一个分区或系统。
  • 显示系统和分区状态。

在不支持分区功能的系统上,LED 代码通过操作面板显示。在分区的系统上, 操作面板显示LPAR的信息而不是任何一个分区的LED代码。因此,所有系统分区的LED代码显示在HMC上.

  • 对每一个分区或系统可以作为一个虚拟控制台

每个LPAR可以通过HMC的连接访问服务器。 如果LPAR不能存取网络或者需要远程NIM安装时可以方便的使用这个功能。

HMC同时对其控制的系统也提供一个服务聚焦点。它可以通过其专有的串口连接去连接系统的服务处理器。 HMC同时提供了问题定位和服务的支持,例如可以通过类似电话线的装置拨打电话和错误日志通知。

三、LPAR的内存分配

在规划逻辑分区时需要额外考虑内存的因素。这些因素由于系统使用不同的操作系统而有所不同,例如:AIX 5L 5.1 版本、 AIX 5L 5.2 版本或Linux操作系统.


当一台机器运行在一个整体系统分区模式(没有LPAR)时, 所有的内存为AIX独享;
当一台机器运行在一个LPAR模式时,一些被AIX使用的内存被重新部署在AIX定义的内存区域之外。 例如:p630上有一个单独的小分区,
内存为256 MB,系统内存的第一块256 MB内存将会被分配给系统管理程序,下面的256 MB内存用于翻译控制单元(translation
control entries既TCE)和系统管理程序中每个分区的页表, 后面的256 MB分配给第一个分区的第一个页表.
TCE内存用于把I/O地址翻译成系统内存地址。对于额外增加的小分区的额外增加的页表将被放在页表数据块中。因此,如果只有AIX操作系统,
分配256MB内存的分区实际需要768 MB (0.75 GB) 内存。

基于前面内存分配的情况, 在p630上划分2个或更多的LPAR至少需要2 GB内存。当然也可以在1GB内存的机器上创建一个256MB内存的LPAR分区, 然而, 这种配置最好只用于测试目的:测试系统需要的最小配置。其它的系统应有不同的内存需求。

当从分区移走任何动态LPAR内存时,如果这些分区含有ISA或者IDE I/O,必须首先关闭所有的属于该分区的ISA或IDE设备。例如,这些设备包括:磁盘驱动器、串口、CD-ROM或DVD-ROM。

下面介绍AIX 5L的分区规则:

  • 一个LPAR 至少256 MB内存。 内存可以以256 MB的增量增加。
  • 内存在AIX之外的消耗从0.75 GB到2 GB,依赖于内存的数量和LPAR的个数.
  • 对于AIX 5L 5.1版本,在一个有64 GB内存系统中,如果LPAR的内存超出16 GB,那么该系统最多只能划分2个LPAR。这是由于在AIX 5L 5.1版本中有内存排列的限制。

大于16 GB的LPAR的内存, 将会按16GB的界限划分。因为系统管理程序的内存驻留在内存的低端,TCE驻留在内存的顶端,这里只有2个16 GB的内存边界可用。


服务器内的内存结构也需要计算在内。每个处理器卡有自己专有的内存排列。处理器卡1的范围是0到16 GB, 处理器卡2是从16 GB到32
GB,处理器卡3是从32 GB到48 GB,处理器卡4是从48 GB到64
GB。如果处理器卡没有配置到其最大可允许的内存,内存分配将会有一个空洞,系统将不会有16 GB 连续内存。

例如, 如果一个系统有3块处理器卡并且配置了36 GB的内存,内存的分配范围是:0-12、 16-28和 32-50。 在这种配置情况下,16 GB内存的边界只能分配12 GB内存, 对于需要超出16 GB 的内存的分区这样的内存太小了。

  • 在AIX 5L 5.2版本中,对于超出16 GB内存的分区没有预定的限制,只有最大整体内存的限制和系统管理程序占用的内存的限制。


注意:在AIX 5L 5.2版本或Linux系统上划分超出16GB内存的LPAR时,需要选中Small Real Mode Address
Region(在HMC, LPAR Profile,内存可选对话框中) 如果运行AIX 5L 5.1版本则不需要选择此项内容。

四、动态 LPAR (5.2.0) 简介和体系架构


IBM 在2001年12月发布的pSeries 690 服务器,使得pSeries平台开始支持静态逻辑分区 (LPAR)。 然而,静态逻辑分区
(LPAR) 提供的是可以从一个分区到另外的分区逻辑的移动和分配资源的解决方案,需要操作系统重新启动(reboot)
相关的分区,并且重新配置这些分区。

目前,IBM的pSeries 服务器的动态逻辑分区 (DLPAR)可以将硬件资源(例如处理器、内存和I/O插槽)从一个正在运行操作系统实例的逻辑分区移动到另外的分区而不需要重新启动 (reboot) 或重新配置这些分区。

图示(一) IBM pSeries DLPAR 系统体系架构

如图(一)所示,一个DLPAR系统由下面几个内容组成:

  • HMC
  • 系统管理程序 (Hypervisor)
  • 全局-固件 (Global-Firmware)
  • 本地-固件 (Local-Firmware)
  • AIX

DLPAR 体系架构 (5.2.0)

下面的图表2显示了DLPAR的操作的例子,用户通过HMC 将资源从一个分区移动到另外的分区。

下面是图表2包含的内容的描述:

  • HMC:硬件管理控制台 (HMC) 是命令中心,通过它做出所有移动资源的指示。
  • Chwres: chwres HMC命令的功能是从分区或在分区之间动态的增加和迁移资源。该命令可以通过HMC GUI或命令行使用。
  • DRM: 动态重配置管理器 (DRM) 是一个代理,用于处理DLPAR特殊的命令。DRM调用 AIX 命令去连接或断开DLPAR启用的资源。
  • RMC:RMC远程控制和监控分布的资源类。它是一种分布式的框架用于处理所有与网络相关的安全和连通性。与DRM结合在一起,可以启动远程命令去驱动配置的或没有配置的DLPAR可用的资源。
  • RTAS:RTAS(Run-时间 Abstraction
    Services)是一个固件,可以在每个分区之间复制。它运行在开放固件设备树的对象上,例如处理器、逻辑内存块 (LMB)、I/O
    插槽、日期芯片和NVRAM。运行内容包括:查询、分配、电子的隔离和释放资源。

  • 全局 FW: 一个全局固件 (FW) 实例生成整个系统。这个全局固件做为系统管理程序。它包括启动和分区管理器,物理内存和I/O映射,并且为资源提供全局命名空间。它规定了DLPAR启用的资源组和开放固件设备树。AIX通过RTAS层与之连接。

图表2:DLPAR 系统体系结构

下面是图表2操作流程的描述:

  1. HMC上的chhwres基于释放给定的资源的请求去调用RMC。
  2. RMC通过以太网络和AIX上的RMC建立连接,并且传递释放被该资源的请求。RMC到分区的连接是在启动时建立的。
  3. 然后,RMC根据释放该资源的请求调用DRM。
  4. DRM 初始化相应的AIX 命令从操作系统释放该资源。
  5. AIX 命令调用内核中相应的函数。操作系统试图去停止指定的资源。如果不能停止使用该资源,系统将会返回一个错误信息给用户。
    如果可以停止使用该资源, 操作系统将隔离该资源,关闭资源并且给该资源设置不可使用的状态。操作成功的信息将报告给HMC上的chhwres 命令。

  6. chhwres 命令调用全局固件和收回资源。
  7. chhwres 命令调用全局固件并把资源分配给分区。
  8. chhwres 命令根据配置资源的请求调用RMC。
  9. RMC通过网络建立同在分区上的RMC的连接并且传递该请求。该RMC的连接是在启动时建立的。
  10. RMC 根据配置资源的请求调用DRM。
  11. DRM 基于配置资源的请求通过调用相应的AIX命令为操作系统增加资源。
  12. AIX命令初始化相应的操作系统函数,操作系统试图使用RTAS调用让特定的资源可用。
    如果这个操作不成功,系统将会返回一个错误信息给用户。 如果操作成功,
    操作系统控制该资源和固件,并将它们从资源缓冲池中移走。然后该资源被启动和解除隔离, 最后由操作系统配置

五、动态 LPAR (5.2.0) 如何动态分配CPU、内存和I/O设备及花费时间的考虑

1、时间的因素


由于DLPAR操作的时间有可能非常长,时间对于DLPAR的操作是一个很重要的因素。例如,可能需要花费几分钟去重新配置一个大型数据库以便减少其使用
的内存。系统实施DLPAR操作花费的时间依赖于请求的大小和在分区中需要改变的资源的状况。通常,移动一个CPU按秒来计算,移动1GB内存按分钟计算
时间。

为了控制时间的超长使用,系统使用了两个time-out值。在一个DLPAR操作时应考虑到的时间的耗费有:

  • 对于全部的操作的时间限制
  • 分配给需要重新配置的应用程序所需要的时间


全部的操作的时间的超时由用户通过HMC设定,缺省值是零。零值意味着操作系统会尽可能完成请求而没有时间超时的限制。
如果用户定义了一个非零值,操作系统将会在定义的时间点停止重新配置资源;然而,系统仍可以继续调用script和信号
(signal),这些script和信号 (signal)
用于保证应用程序和操作系统一致性。如果请求的时间超出限制,资源不会被自动回滚到请求前的状态,系统会通知用户该命令只完成了一部分。


考虑到应用程序的time-out值,你必须区分两个应用程序窗口的通知。基于script机制的是同步调用 ("DLPAR scripts"on
page 116),调用script的drmgr命令将等待script结束或达到定义的time-out。
缺省的time-out值是10秒。但是,这个值可以通过script 重写, 也可以让用户通过用drmgr命令加上-w 选项在安装script
时重写。


基于API的管理器是异步被调用的。调用者总是在等待直到time-out值超出为止,不论管理器是否已经早些完成或根本没有完成。缺省的time-
out值也是10秒但是不能显式的被重写。然而,这个API
time-out值将会与总体的time-out值对比,如果总体的time-out值增加了,这个基于API管理器的time-out值也会随之增长。
注意:缺省的time-out值可以改变。

2、动态 LPAR (5.2.0)如何动态分配

CPU和内存 如前面介绍的,drmgr命令通过调用相应的命令处理所有动态重新配置的操作,并且控制重新配置资源的过程。

下面是动态重新配置的一般流程:

  1. 采用ODM锁去确保ODM、 开放固件 (Open Firmware,OF) 设备树和系统内核被自动更新。如果ODM锁保持了很长一段时间并且用户指明DLPAR操作有时间限制,这个步骤会失败。
  2. 动态重新配置命令读OF设备树。
  3. 动态重新配置命令调用系统内核按下面的步骤去启动DR操作:

    1. 确认请求
    2. 锁住DR操作 — 在同一时刻只有处理一个操作
    3. 将请求存入全局系统内核的DR结构,用于传递操作信号 (signal) 的信息, 与DR命令异步运行
    4. 开始检测阶段
  4. 检测被调用阶段的script。
  5. 检测该阶段信号 (signal) 的发出-在信号 (signal) 被发出后有条件的等待。
  6. 检测该阶段系统内核扩展 (kernel extension) 调用。 调用注册的内核扩展的Callback程序。

    注意:在4、5、6步骤时,如果任何检测阶段处理的信号 (signal) 有错误,操作将失败。一旦检测阶段没有错误并且LPAR操作在预处理阶段,所有预处理阶段的应用控制将被调用,甚至如果应用控制调用失败,动态重新配置仍然被启动。

  7. 系统内核标记预预处理阶段的开始。
  8. 调用预处理阶段的script。
  9. 预处理阶段的信号 (signal) 被发出。
  10. 系统内核标记"doit"阶段开始。 这是一个内部的阶段,通过它资源可以从系统内核中增加或移走。

    注意:11)到13)步骤基于请求可能会被重复。基于处理器的请求永远不会循环重复;在一次DLPAR操作中,同一时刻只有一个处理器可以被增加或移走。
    如果有多于一个处理器需要增加和移走,HMC对每个处理器调用一次AIX。 基于内存的请求在逻辑内存块 (LMB) 级别循环,它需要256
    MB内存段,直到全部的用户请求被满足。HMC在完成内存请求后远程调用AIX一次。

  11. 此步骤只用于增加资源. 在这个过程中:OF设备树被更新;资源被分配、解除隔离和配置连接器。当资源被解除隔离时,该资源被分配给分区并且其所有权从FW转移到AIX。

    • 对于处理器,全局和本地中断服务器信号 (signal)被检测。
    • 对于内存, 物理地址和尺寸被检测。
  12. 调用系统内核去增加或移走资源.

    1. 注册系统内核扩展的Callback函数被调用。系统内核扩展被通知指定的资源正在被移走或增加。
    2. 系统内核的资源被移走或增加。
    3. 发送系统内核扩展阶段被调用。

    如果a或b步骤失败,该操作将失败。

  13. 该步骤只用于移走资源。 OF被更新。资源被隔离并且不再分配。OF设备树必须保持更新以使得配置模式可以定义资源组,该资源组被配置并属于操作系统。
  14. 如果前面的步骤操作成功,系统内核标记发送阶段开始。
  15. 调用配置方式,使得DR-aware应用和scripts可以看到ODM内的状态改变。
  16. 发送script被调用。
  17. 发送的信号 (signal) 被发送到注册的进程。
  18. 系统内核清除动态重新配置的事件。
  19. 释放ODM锁。

下面内容介绍了AIX 5L 5.2版本上新增加的对动态移动和增加I/O插槽的支持的功能:

3、动态 I/O 的移动和增加

动态移动和增加I/O适配器的功能在AIX 5L 5.2版本之前的热拔插功能中已经实现。为了允许动态增加和移动DLPAR系统的PCI插槽和集成的I/O设备,例如在p690、 p670和p630的DLPAR上,提供了增强型的命令:lsslot

PCI插槽和集成的I/O设备可以通过lsslot命令使用新的连接类型显示出来:

lsslot -c slot 命令的输出如下:

# Slot


Description


Device(s)

U1.5-P1-I1


DLPAR slot


pci13 ent0

U1.5-P1-I2


DLPAR slot


pci14 ent1

U1.5-P1-I3


DLPAR slot


pci15

U1.5-P1-I4


DLPAR slot


pci16

U1.5-P1-I5


DLPAR slot


pci17 ent2

U1.5-P1/Z1


DLPAR slot


pci18 scsi0

在上面的插槽被移走之前,PCI设备和所有相关的字节点需要先被删除。例如,在U1.5-P1-I5 插槽上的ent2设备如果现在没有使用,可以用下面的命令移走该设备:

rmdev -l pci17 -d -R 在设备从AIX中移走后,该插槽可以用HMC GUI或命令行接口从分区移走。

GUI操作的图示如下:


注意,该插槽在该分区的profile 中不能被定义为"required"状态,只能是"desired "状态,或者在HMC
上没有给出移动此插槽的选项。如果要将前面移走的插槽再放回到系统中,需要首先用HMC将设备加到系统中,然后用cfgmgr命令将其加入到操作系统中。

 
Leave a comment

Posted by on June 13, 2007 in AIX