You are on page 1of 214

Internal use only ▲

AIX Basics

Intended for engineers responsible for commissioning and


maintenance of IBM mini-computers
Issued by GU Product Support Department
Internal use only ▲

Revision records
Version Date Author Reviewed by Revisions

R1.0 2011-1-22 Sun Jingye null

References
1. IBM training materials
2.
Internal use only ▲

Target
Know basic knowledge about IBM
minicomputers
Know basic management and
maintenance methods for AIX servers
Know how to manage AIX storage,
network and service
Know common operations and
commands of AIX, and know
important system files
Internal use only ▲

Contents

Introduction to IBM AIX Minicomputers


Storage Management
Equipment Management
User and Group Management
Process, Scheduled Tasks, Service Management
Network Management
Software Installation
Disk Array
Internal use only ▲

IBM Mini-compunter – IBM Power System Family


New Power System
New server name
• Power = i + p  Power 595
 Power 575

 Power 570
New trademarks and  Power 560
name  Power 550

• IBM i OS  Power 520

• Power HA  BladeCenter JS 12/22

• Power VM
Internal use only ▲

IBM Power 550 Server (Department Level) – Tower or Rack


Power 550 Rack & Deskside (Tower)
2, 4, 6 or 8 cores @ 3.5 & 4.2 GHz
Architecture
L3 Cache: 32 MB per chip
DDR2 Memory Up to 256 GB (Buffered )
Up to 6 DASD (3.5”)
Internal SAS Disks
Optional Up to 12 SFF DASD
 PCIe: 3 Slots
 PCI-X 266: 2 Slots
Expansion
 GX Bus: 2 Slots
–Shared with PCIe 2 slots
Integrated SAS / SATA Yes Optional: RAID support
3 USB, 2 Serial, 2 HMC
Integrated Ports
Optional: SAS port
Integrated Virtual  Dual Port 10/100/1000 Ethernet
Ethernet  Optional: Quad 1Gbt or Dual 10Gbt
1 Slim-line DVD
Media Bays
1 Half High Tape
Yes / Max: 8
Remote I/O Drawers
GX Bus connection: RIO2 / InfiniBand
Dynamic LPAR Up to 80 partitions
NEBS Yes
Redundant Power Optional
Redundant Cooling Yes

6
Internal use only ▲

Power 550 Rear View


Internal use only ▲

How to Manage IBM AIX Server

There are three way to manage IBM AIX Server:


 CONSOLE management by keyboard, mouse and displayer
 Serial port management by IBM serial port cable
 Management by WEB mode, which cannot replace the previous two methods,
and which needs not installation of the operating system.
Internal use only ▲

Connect P-Serial Mini-Computer Through Serial


Ports

Power520

Connect
System port
by serial port
of the
simulating
terminal

Baud rate: Power550


19200
Internal use only ▲

Review

 Please give two IBM mini-computers of P serials.


 Please describe the three ways to manage IBM mini-
computers of P serials.
 How to connect cables in case of managing mini-
computers of P serials through the serial port. What is the
baud rate?
Internal use only ▲

Contents

Introduction to IBM AIX Minicomputers


Storage Management
Equipment Management
User and Group Management
Process, Scheduled Tasks, Service Management
Network Management
Software Installation
Disk Array
Internal use only ▲

Basic Knowledge about the Storage System


Internal Only▲

Unit 5 LV Management
Internal use only ▲

Manage VG: View VG Information


Internal use only ▲

VG and PV Status
Internal use only ▲

PV Information
Internal use only ▲

Delete PV from VG
Internal use only ▲

Delete PV from VG
Internal use only ▲

Create VG

-s: defines the PP size in each PV on the VG is 256Mb.


When VG is being created, number of PPs is measured by the unit of 1K
(1024) . By default, number of PPs is 32 K (32768 PPs)
Internal use only ▲

View VG Information

Each VG has an exclusive 16-digit hexadecimal identifier, which is called VGID and
placed under the folder /etc/vg.
Internal use only ▲

Add PV to VG
Internal use only ▲

Delete PV from VG
Internal use only ▲

Delete the Last PV from VG


Internal use only ▲

Check PV Information
Internal use only ▲

Check Information of Each PP on PV


Internal use only ▲

Change PV Property: Diable PV


Internal use only ▲

Delete PV Equipment
Internal use only ▲

Configure PV Equipment File


Internal use only ▲

VG Quorum
 PVs in each VG include volume group descriptor area (VGDA)
and volume group status area (VGSA) .
 VGDA includes logic volumes, physical volumes and identifiers
of partitions.
 VGSA is a bit mapping relationship, used to show which files
are old and need updating by synchronization.
 When a VG is started by varyonvg or smit , LVM will check
whether it can access at least 51% of VGDA and VGSA copies,
and then the majority of 51% is called quorum, which is
compulsory for LVM to maintain the files
Internal use only ▲

Export VG
 Delete the definition of VG from the current system with the
command exportvg, but do not change any user data of the
VG. After execution of the command exportvg, the VG will be
unavailable for the VG. Hence, it is suggested to use the
command together with the command importvg.
 When there is a LV being used for paging space on VG, and
the paging space is active, the VG cannot be exported.
 If the length of the mount point is longer than 128 characters,
the information in LVCB will be lost. In this case, please record
the mount point information before exporting the VG. When you
import the VG with the importvg command, you need edit the
/etc/filesystems file manually.
 Please execute varyoff before exporting VG.
Internal use only ▲

Output VG
Internal use only ▲

Import VG
 Specify a PV and import VG by the command importvg. All PV
information included in the VG can be restored.
 If there are file system in the VG, etc/filesystems will be
updated after the VG is imported. To connect the file system in
the VG, please perform such operation as varyon and then
fsck. It is necessary to edit the file /etc/filesystems
manually. etc/filesystems
 varyon
 Then fsck
Internal use only ▲

Import VG
Internal use only ▲
Common Troubleshooting in Case of
Transferring VG
 VG is transferred by importing and exporting operations
(exportvg) and (importvg) .
 ODM updating related operations may fail, which makes the
whole VG locked. It can be unlocked by getlvodm and
putlvodm.
Internal use only ▲

Add New PVs


Add new disks and make the system able to identify them
 Method 1:
 Power off the PC----connect to the disk----power on the PC
 Method 2:
 Connect to the disk without powering off the PC- ---cfgmgr
 Method 3:
 Connect to the disk without powering off the PC----Run the
following command:
 mkdev -c disk -s subclass -t type -p parentname -w
whereconnected -a pv=yes
 pv=yes makes the disk become a PV, and write it into the boot
record as a unique PVID.
Internal use only ▲

Check PVs in the System


Internal use only ▲

Create LV
Internal use only ▲

Create LV on the Specified PV


Internal use only ▲

Stripping of LV
 LV can be created in one or more disks. It is called stripping of
LV when LV is created on different disks. Actually, it is a
software mirroring by the AIX.
Internal use only ▲

Check LV Information
Internal use only ▲

Check LV Information
Internal use only ▲

Copy LV
Internal use only ▲

Move File System/LV


1. Which VGs and
LVs are in the
system?
2. Which PVs are
the LVs to be
moved in?
3. Move the PP of
the LV from the
current PV to
another specified
PP, but in the
same VG.
4. If LV is not
specified, move all
of the PPs in the
source PV.

VGs are moved by


exportvg and
importvg.
Internal use only ▲

Maintain File System


Common file systems of the AIX include JFS and JFS2.

For JFS, a single file can be up to 2 GB by default. If the big file


system is selected when the JFS file system is being created, a
single file can be up to 64GB.

To create a file system in which a single file is greater than


64GB, please use JFS2 (enhanced JFS).
Internal use only ▲

Check File System Information


Internal use only ▲

Create File System


Internal use only ▲

Create File System


Internal use only ▲

Create Just Created File System Information


Internal use only ▲

Modify File System


Internal use only ▲

Modify File System: mount point


Internal use only ▲

Delete File System


Internal use only ▲

Check i-node Information of the File


Internal use only ▲

File System/Equipment Fragment Sorting


Internal use only ▲

Manage Paging Space and Virtual Memory 1


 When the memory has not enough space, the system will switch
data inactive to the disk. That disk is called paging space, which is
used to store memory data temporarily.
 Generally, size of the paging space is double of that of the
memory. For mini-computers configured with big memories, there
is a limit for the paging space. Each paging space should have the
same size.
 The default paging space in AIX is /dev/hd6, which is an LV
actually. It can be mirrored.
Internal use only ▲

Manage Paging Space and Virtual Memory 2


 Since the paging space will be accessed frequently, it should
be placed at centers of disks, and allocated to different disks. It
is suggested to place the paging space to the disk with less
frequent I/O to increase data access rate.
 If the utilization rate of the paging space is not high, it is
necessary to delete some space; otherwise, it is necessary to
increase the paging space.
 The paging space can defined in the local computer or use the
NFS file system. It should be activated with the swapon
command. The paging space activated automatically is placed
at the file /etc/swapspaces.
Internal use only ▲

Check Page Space Information


Internal use only ▲

Add New Page Space

创建换页空间时, 其大小通过-s参数以LP的数量为单位来指定, 如, 指定要


创建的换页空间的大小是3个LP。
Internal use only ▲

Activate Page Space


Internal use only ▲

Activate All Page Space


Internal use only ▲

Deactivate Page Space


Internal use only ▲

Delete Old Page in the Switch Space

Sometimes, the old page processing program is still


in the switch area, you can use the command
slibclean to clear space of the switch area.
Internal use only ▲

Mirroring Operations of Different Levels


 For mirroring of LV, use the command mklvcopy; To cancel
the mirroring, use the command rmlvcopy.
 For mirroring of VG, use the command mirrorvg, and the
internal command in the system is actually mklvcopy to mirror
all of the LVs in the VG; To cancel the mirroring, use the
command unmirrorvg.
Internal use only ▲

Review

 Please give some basic concepts about storage, such as


PP/LP/VG/PV/LV/FS.
 How to add, delete, check and modify PV/LV/VG/FS/PS?
Internal use only ▲

Contents

Introduction to IBM AIX Minicomputers


Storage Management
Equipment Management
User and Group Management
Process, Scheduled Tasks, Service Management
Network Management
Software Installation
Disk Array
Internal use only ▲

Equipment Management: Basic Concept 1


 Physical equipment: devices connected to the host through ports, for
example, monitors and printers.
 Equipment driver: the core software to control equipment and ports. It
receives information from the upper-layer software, and convert the
information into commands to control the equipment.
 Logic equipment: it is an interface for users or applications to access
the physical equipment. It exists in AIX as a special file. It is not one-to-
one relationship with physical equipment. For example, /dev/fd0
and /dev/fd0h correspond to the same physical equipment.
 Some devices are virtual, which correspond with none of physical
hardware. For example /dev/null and /dev/error.
 The logic equipment file is saved under the folder /dev. View the file
by the command ls –l /dev.
Internal use only ▲

Equipment Management: Basic Concept 2


 Block equipment: it is a kind of random access equipment.
Generally, it reads one block each time. In the /dev folder,
the devices of which the type is b are called block equipment.
The following are common block equipment:
 /dev/fd0 Floppy disk
 /dev/cd0 Compact disk
 /dev/hd? Logic volume
 /dev/hdisk? Hard disk
 Character equipment: it is a kind of original sequential access
equipment orienting to character stream. It reads a character in
sequence each time. For example, terminals, printers, logic
volumes, physical volumes, network adapters and memory.
Internal use only ▲

Equipment Management: Basic Concept 3

Main No.
Secondary No.
Internal use only ▲

Equipment Management: Basic Concept 3


 Equipment main No. and secondary No.:
 The 5th and 6th columns of equipment file properties represents
the main No. and the secondary No. respectively. The main No.
specify the equipment type, and the secondary No. specify a
particular equipment from that type. Both Nos. will be
transferred to the memory as parameters.
 Equipment are classified into different categories by type, sub-
type and model in AIX. A type includes multiple sub-types, and
a sub-type includes multiple models.
Internal use only ▲

Object Database Manager


 Object Database Manager (ODM) is a unique system
configuration management mechanism. It is a kind of data
management method orienting to data entity.
 ODM includes system equipment information, parameter settings
and internal structure of SMIT.
 ODM can be modified dynamically. ODM and the dynamic core
are the core of flexible AIX dynamic configuration and
management.
Sometimes, ODM also refers to the object database managed by
the ODM.
 ODM files are saved in binary mode.
 Check ODM files with the AIX commands.
 ODM files are saved in /etc/objrepos,
/usr/lib/objrepos and /usr/share/lib/objrepos.
Internal use only ▲

Equipment and ODM


 To connect new tapes, disks or CD-ROM, there must
descriptions about them in the AIX.
 All of the devices and their features defined in the system are
saved in ODM.
 ODM includes two types of database (predefined and customied) to
save information and properties of the logic equipment.
 Predefined database includes data configuration of the equipment

supported by the system. The purpose of creating predefined


database is to support internal or external equipment.
lsdev -P

 Customied database includes devices defined in the current system.

lsdev -C
Internal use only ▲

Equipment Management: Equipment Status

 The equipment has three states:


 Undefined: there is no information about the equipment in the
system.
 Defined: the system includes all information about the equipment,
and it has assigned logical equipment file name and port for that
equipment. However, the equipment in defined status cannot be
used normally, and the corresponding equipment file name and port
cannot be accessed.
 Available: the equipment in available status can be used normally.
 Command to view equipment status: lsdev
Internal use only ▲

Equipment Configured by the System


l Equipment Configured by the System refers to devices that
can be configured by the system automatically as the
system starts or when you executing the cfgmgr command.
l It has a unique identifier on the ROM chip.
l Cfgmgr reads those identifiers, and search programs
required for configuring those devices in the database pre-
defined by the ODM.
l Please power on the external equipment before running the
cfgmgr command so that the cfgmgr can find the external
equipment and configure it correctly.
l The information about equipment location and type is stored
in the ODM.
Internal use only ▲

Equipment Management Command


cfgmgr/mkdev
Configure new equipment in the system
lsattr
Read configuration properties of the specified equipment.
Some properties can be changed.
Lscfg
Display type, serial No. and supplier of the specified
equipment.
rmdev
Delete equipment from the system, or make the equipment
in defined status.
lsdev /prtconf
List the devices defined in the system.
Internal use only ▲

CD-ROM (/dev/cd0)
 It is configured by the system automatically.
Install cdrom
 Use the following command:
mount -rv cdrfs /dev/cd0 /mnt
 Or create a CD-ROM file system and then

install the CD-ROM


smit cdrf

mount /cdrom

Uninstall cdrom
 unmount /cdrom

 Or umount
Internal use only ▲

Floppy disk

It is configured by the system automatically. Use


dd to access the floppy disk driver. It takes the raw
format of IBM itself in this case.
Only after the floppy disk is formatted can the tar
command be used.
To use DOS floppy disks, the bos.dos.utils
package needs be installed first.
DOS/AIX command, the folder /usr/bin/
 dosdir
 dosread dosfile aixfile

 doswrite aixfile dosfile

 dosformat
Internal use only ▲

Equipment Management: Equipment Status Conversion

The command rmdev –l makes the equipment status changes from


available to defined;
The command rmdev –l –d makes the equipment status changes
from available to undefined.
Internal use only ▲

Check Equipment Information


-r, display the value of the specified
column
-F, specify the column to be displayed
-C, display information in the database
defined by the user .
Internal use only ▲

Check Equipment Information


Internal use only ▲

Check Equipment Information


Internal use only ▲

Check Equipment Information


Internal use only ▲

View Default Property of Equipment


Internal use only ▲

View System Configuration Information


Internal use only ▲

Commands to Display Equipment Information


 Display system configuration: prtconf
 Display equipment configuration: lscfg -vp
 Display the detailed property of some specified equipment: lsattr
–E –l mem0
 lsattr –E –l inet0
 lsattr –E –l sys0
Internal use only ▲

Delete Equipment
Internal use only ▲

Equipment Management: Create Equipment


in the System

 Generally, it is unnecessary to create equipment manually.


Internal use only ▲

Modify Equipment Information


Internal use only ▲

Review

 What’s the meaning of physical equipment, equipment


driver and logic equipment, and what are the relationships
between them ?
 What are the three states of the AIX ?
 Commands to display and modify equipment information
Internal use only ▲

Contents

Introduction to IBM AIX Minicomputers


Storage Management
Equipment Management
User and Group Management
Process, Scheduled Tasks, Service Management
Network Management
Software Installation
Disk Array
Internal use only ▲

Manage Users and Groups


 About the file /etc/group and the file etc/security/group:
 The /etc/group file lists the name and GID of each user group.

 The /etc/security/group file includes user group settings in

/etc/group, and defines whether the user group can be


managed by other users except the user root.
Internal use only ▲

Commands to Manage User Groups


 Mkgroup: create a new user group
 Chgroup: modify properties of user groups
 Lsgroup: list user groups and properties
 Chgrpmem: modify administrators or members of user groups
 getgroup: re-configure current user groups
 newgrp: set user group ID of the session temporarily
 rmgroup: delete a user group
Internal use only ▲

Manage Users and Groups 1


mkuser/useradd/usermod/lsuser/rmuser/userdel/id
mkgroup/lsgroup/chgroup/rmgroup

/usr/libThe default settings used to create users are saved in the file
/security/mkuser.default
Internal use only ▲

Manage Users and Groups 2


User IDs are saved in the file /etc/passwd. Security related information such
as the password is saved in the file /etc/security/passwd.

AIX has set passwords simply in the file /etc/security/login.cfg. The


settings apply to all of the users in the system.
Internal use only ▲

Manage User Accounts


/etc/environment takes effect for all of the users.

/etc/profile takes effect for all of the users


AIX will use those files to
set environment variables
/etc/security/environ takes effect for some
individual users.

 The file /etc/environment includes the preset variable that


can be invoked by the exec () system.
 The file /etc/profile includes environment variables to be
set and commands to be executed before the user enters into
the system. The contents can be read before the local shell
starts. It is suggested to keep them non-shell-specific.
 /etc/security/environ takes effect for some individual users.
Internal use only ▲

/etc/environment and /etc/profile

/etc/environment is a file to define


system environment variables

 /etc/environment is a file to set environment variables, which


apply to all of the users.
 /etc/environment can only be used to define environment
variables, but cannot be used to execute the command.
Internal use only ▲

/etc/security/environ File

 Special environment variables of some user can be set in the file


/etc/security/environ.
 For environment variable pairs “variable = value” are separated by
commas. The environment variables defined by usrenv are set in
case of login.
Internal use only ▲

Shell and Shell Environment Variables


 The preset shell and the boot file are set by
/usr/security/mkuser.sys and
/usr/security/mkuser.default. mkuser.sys will read
the file mkuser.default. Create a root folder and set user
rights. When you create a new user with the command smit or
the command mkuser, it will invoke mkuser.sys to perform the
tasks above.

Shell boot file:


Sh .profile
Ksh .profile, .kshrc (if specified by ENV)
Csh, tcsh .login, .cshrc, .logout

When the user logs into the system, the information in


/etc/motd will be displayed.
Internal use only ▲

About the File /etc/login.cfg


 Specify the path of shell in the file
/etc/security/login.cfg to define the shell supported by
the system.
 List all of shells supported as specified in the file
/etc/security/login.cfg . For example:
 usw:
 shells = /bin/sh, /bin/bsh, /bin/csh, … .

After modifying values of shells in the file /etc/security/login.cfg


are modified, the above commands can be executed
successfully.
Internal use only ▲

Limit of User Resources


 AIX limits available system resources of each user by the
operating system. It defines CPU utilization rate, memory
utilization rate and disk utilization rate of each program.
 The default limiting value for users are defined in the file
/etc/security/limits. When some program exceeds the
specified limit, the program will be killed.
 Check parameters with the command lsattr –E –l sys0.
The output result of the command is as follows:
Internal use only ▲

Description of Settings in the File


/etc/security/limits
 If the value is -1, it means there is no limit.
 Limits for resources can be modified by the smit command or
the chdev command.
 The core parameter maxuproc limits the maximum number of
programs that can be processed by each user. The default
value of this parameter is 40, which means one user can
proceed 40 programs at most.
 #chdev -l sys0 -a maxuproc = 200
Internal use only ▲

Disk Quotas for User and User Group


 Disk quotas limits of the user or user group can be set by the
system administrator by the edquota command. There are
three parameters:
 1. soft limit: when the used disk resources reach the soft limit
allocated to the user or user group, the system will alarm the user
or user group.
 2. hard limit: when the used disk resources reach the hard limit
allocated to the user or user group, the user cannot get more
resources.
 3. grace period: if the used disk resources reach the soft limit of the
user or user group for sometime which is called grace period, the
soft limit will become the hard limit.
Internal use only ▲

Configure File System Quotas

 Edit the corresponding parameters in the /etc/filesystems


file
 Select either quota=<userquota> and <groupquota>
 User quota and group quota are recorded in the quota.user
folder and the quota.group folder. If userquota =
<pathname> and groupquota = <pathname> are defined in
the file system, the name of the quotas file can be changed. If the
file does not exist, it can be created by the touch command.
Internal use only ▲

Configure File System Quotas


 For JFS file system, set the quota with the edquota command.
For JFS2 file system, set the quata with the j2edlimit
(AIX6.1) command.
 Edit the quotas with the edquota command.
 #edquota stimpy (user name)
 Set quotas for other users with the command edquota –p
<default-user> <new-user>.
 #edquota -p stimpy ren
Internal use only ▲

Configure File System Quotas


 Start the quotas system with the quotaon command
 Update the quotas file with the quotacheck command, and
update all of the quotas file with the parameter –a.
 Commands to update quotas:
 #quotaoff -a
 #quotacheck -a
 #quotaon -a
 Display Quotas:
 # quota rem (user name)
 #repquota
Internal use only ▲

Review

 How to add/delete/modify/view users and groups in AIX?


 Create the related configuration files
 System file about user environment
 Knowledge about disk quotas
Internal use only ▲

Contents

Introduction to IBM AIX Minicomputers


Storage Management
Equipment Management
User and Group Management
Process, Scheduled Tasks, Service Management
Network Management
Software Installation
Disk Array
Internal use only ▲

Process Management: View


Internal use only ▲

Process Management: Control


 Control the process with the kill command

 #kill [-singnal] [PID PID PID]

 #/bin/kill -l lists all of the supported signal sets.


Internal use only ▲

Signal Set Supported by the Process


Internal use only ▲

General Rules of Process Management


 Do not use kill -9 until all of the other signals are invalid.
 #kill –1 [PID] try the HUP signal
 #kill -6 <PID> try the ABRT signal (a core file will be generated
for troubleshooting in the process)
 #kill -9 <PID> try the kill signal if none of the above signals takes
effect.
 #nohup <command> &: make the command execute in
background, with the hangup signal ignored.
Internal use only ▲

Scheduled Jobs (cron)


 Errors are recorded in the /var/adm/cron/log cron file.
 1. Create the crontak file
 Format:
 minutes hours day month weekday command
 For example: 0, 30 * * * * /bin/uptime>/dev/console
 2. Make the cron to control the crontab file by the crontab
command.
 #crontab <yourCrontabFile>
 3. All of crontabs are named with names of their owners, and
saved in the /var/spool/cron/crontabs folder.
 4. The /usr/adm/cron/{cron.allow, cron.deny} file
lists user names to control who can use the cron service.
Internal use only ▲

How to Use crontab

Please refer to usages about at and


batch.
Internal use only ▲

System Resource Control Program (SRC)


 System Resource Controller (SRC): it provides a simple
interface to display status, update, start and stop system
service.
 SRC allows the operator or the administrator to perform
operations on sub-service programs, sub-system or sub-system
group services .
Internal use only ▲

SRC Components
 SRC is provided by the srcmstr daemon, and the daemon will be
started as the system boots, which is defined in the
/etc/inittab file. Srcmstr identify sub-system components
according to the definition in the /etc/objrepos{SRCsubsys,
SRCnotify} of the ODM.
 Sub-system group, sub-system and sub-service program are
organized to the ODM. They can use the following commands:
 startsrc : start a sub-system
 stopsrc: stop a sub-system
 refresh: restart or re-update
 Trace {on, off} : trace sub-system
 lssrc : display sub-system status
 The sub-system can be started when it is being loaded into the
system. It is a part of the rc command file (startsrc srcmstr).
It can also be started by /etc/inittab.
Internal use only ▲

Start TCPIP Sub-system Group


Internal use only ▲

Check Service Status lssrc

For the lssrc command,


the parameter –g
corresponds to the Group
(indicates sub-system
group) column in the
output result ; The
parameter –s
corresponds to the
Subsystem column; The
parameter –p represents
the process ID of the sub-
system (service).
Internal use only ▲

Check Service Status (lssrc)

Get the states of the


subsystem, a group of
subsystems or the
subserver
Internal use only ▲

Review

 How to manage processes, scheduled tasks and system


services in AIX?
 Please describe the function of the
startsrc/stopsrc/refresh/lssrc command?
Internal use only ▲

Contents

Introduction to IBM AIX Minicomputers


Storage Management
Equipment Management
User and Group Management
Process, Scheduled Tasks, Service Management
Network Management
Software Installation
Disk Array
Internal use only ▲

Management Network in AIX


 In AIX, a network card involves two concepts: adapter and
interface. The adapter corresponds to the physical layer of the
protocol stack, which is one-to-one relationship with the
hardware (some specified network port). The interface
corresponds to the link layer of the protocol stack.

Adapt ent tok tty atm fddi Interface Meaning


er prefix
prefix en Standard
Interfa en tr sl at fi Ethernet
ce et 802.3
prefix1
sl slip
Interfa et
ce at atm
prefix2 fi fddi
lo loopback
Internal use only ▲

Check Adapter and Interface in the AIX


Internal use only ▲

Check Data Configuration of the Equipment


(adapter)
Internal use only ▲

Check Properties of the Network Adapter


Internal use only ▲

Modify Properties of the Network Adapter


 Do not modify properties of the network adapter if you are not
sure about it.
 Modify properties of the network adapter with the chdev
command:
 Command format: chdev –l ent1 –a property name=property
value
Internal use only ▲

Display Properties of the Network Interface


Internal use only ▲

Modify IP Address (Property) of the Network Interface


Method 1: modify IP address (property) with the ifconfig command.
The modification is temporary, which will not be written into the ODM. The
modification does not take effect after the system restarts.

Method 2: modify IP address (property) with the chdev command. The


modification is permanent, which will be written into the ODM. The
modification still takes effect after the system restarts.

Method 3: modify IP address (property) with the smit command. The


modification is permanent, which will be written into the ODM. The
modification still takes effect after the system restarts.
Internal use only ▲

Delete and Add Network Adapter


[SJY@p550a ]# ifconfig en1 down Stop the network interface
[SJY@p550a ]# ifconfig en1 detach Delete all of the properties of
the network interface from the network interface list

[SJY@p550a ]# rmdev -d -l en1 Delete the definition of the


network interface
en1 deleted
[SJY@p550a ]# ifconfig et1 down
[SJY@p550a ]# ifconfig et1 detach
[SJY@p550a ]# rmdev -d -l et1
et1 deleted

[SJY@p550a ]# rmdev -d -l ent1 Delete the network adapter


ent1 deleted
[SJY@p550a ]# lsdev -Cc adapter |grep ent1
[SJY@p550a ]# lsdev -Cc if | grep e\*1
Internal use only ▲

Delete and Re-recognize NIC


Internal use only ▲

netstat Command
 netstat -n display the IP address in the numeric form
netstat -in display the status of the configured network interface,
and display the IP address in the numeric form instead of the
host name.
netstat -r display the route table on the host
netstat -a display all of the socket states
netstat -s display the statistic information of each protocol
netstat -c display the statistic information of network buffer
netstat -m display the statistic data recorded by the memory
management function
netstat -Zi/Zs/Zc/Zm: clear the related statistic information
Internal use only ▲

View Network Information with netstat


Internal use only ▲

ifconfig Command
ifconfig en0 192.168.1.1 netmask 255.255.255.0 up: configure an IP address
for a network interface and activate it
ifconfig lo0 inet 127.0.0.1 up: activate lo0
ifconfig en0 down: deactivate the network interface en0
ifconfig en0 up: activate the network interface en0
ifconfig en0 192.168.1.2 netmask 255.255.255.0 alias: bind an IP address at
the network interface en0
ifconfig en0 192.168.1.2 netmask 255.255.255.0 delete: delete the IP
address-bind.
ifconfig en0 delete/ifconfig en0 192.168.1.2 delete: delete IP address of a
network interface
ifconfig en0 detach: delete all of the properties of the network interface from
the network interface list. This command is used to remove a network
adapater, and it can be added again with the ifconfig en0 command.
ifconfig en0 mtu 1492: change the MTU value of the network interface en0.
Internal use only ▲

A Physical Network Adapter Bound with Multiple IP Addresses


Method 1: use the ifconfig command, which takes
effect immediately, but no longer takes effect after the
system restarts
方法2, 用chdev命令, 永久有效, 重启不丢失;
Internal use only ▲

A Physical Network Adapter Bound with Multiple IP Addresses

The modification by the chdev command is permanent. It is


written into the ODM and takes effect immediately.
Internal use only ▲

TCPIP Daemon Process


 Services started automatically as the system starts are generally
saved in the /etc/inittab file.
 The network start file is /etc/rc.net or /etc/rc.bsdnet,
which is generally invoked by the cfgmgr command as the
system starts.
 The tcp/ip daemon process is saved in the /etc/rc.tcpip
file, which is invoked by init. The /etc/rc.tcpip file
includes syslogd, lpd, routed/gated, sendmail,
portmap, inetd, named, timed, rwhod and other
processes. By default, only syslogd, lpd, sendmail,
portmap, inetd are started.
Internal use only ▲

Internet Service Management Process


 Program: /usr/sbin/inetd
 The startsrc -s inetd command can start the inetd daemon
process, which is started as the TCP/IP daemon process starts.
Generally, it read the /etc/inetd.conf file.
 When the /etc/inetd.conf file is modified, it is necessary to
execute the refresh -s inetd command to make the
modification effective. Make it read the /etc/inetd.conf file or
execute the ps -ef |grep inetd (inetd process ID)
kill -1 inetdpid command (send a SIGHUP signal to the inetd
process), and
 The /etc/inetd.conf process includes such sub-processes
ascomsat, ftpd, fingerd, rlogind, rexecd, rshd, talkd,
telnetd, tftpd and uucpd.
 lssrc -ls inetd: check detailed information of the inetd sub-process
 stopsrc -s inetd: stop the inetd daemon process
Internal use only ▲

View and Control TCPIP Daemon Process


 lssrc -g tcpip: check states of TCPIP processes
 sh /etc/tcp.clean: stop TCP/IP daemon process, which will stop
the process in /etc/rc.tcpip (except portmap and nfsd)
 stopsrc -g tcpip: stop all of the TCP/IP daemon processes
 stopsrc -s syslogd: stop some tcp/ip daemon process
 sh /etc/rc.tcpip: start all of the tcp/ip daemon processes
 startsrc -s syslogd: start some tcp/ip daemon process
 startsrc -g tcpip: start all of sub-systems belonging to the TCPIp
group defined in odm, but do not start the TCP/IP daemon
process
Internal use only ▲

Manage AIX Routes Manually


 Manage route table with the route commands manually:
 route add: add routes
 route delete: delete routes
 route change: modify routes
 route monitor: monitor route table
 route flush or route –f: clear route table

 View the route table with the netstat –r command.


Internal use only ▲

Add/Modify/Delete Routes with the route Command

The route command takes effect immediately , but the modification will not be
written into the ODM and it will no longer take effect after the system restarts.
Internal use only ▲

Other Methods to Modify Routes


 There are many more methods to modify routes in AIX:
 Use the smit command, which is simple and convenient
 Use the chdev command, which is complex. The modification will
be written into the ODM, and it still takes effect after the system
restarts.
 Use the rout command. The modification will not be written into
the ODM, and it will no longer take effect after the system restarts.
 Trace routes with the traceroute command.
Internal use only ▲

The Command (no) to Adjust Network Parameters


 Many network parameters cannot be modified by the smit command. They should be
adjusted by the no command.
 no -o ipforwarding=1 starts the IP forwarding function. If the parameter value is 0, it
means the function is disabled; if the parameter value is 1, it means the parameter is
enabled. Only when the function is enabled, the AIX host has the routing function.
 The modification above is saved in the memory, but not written into the ODM. There are
two ways to save the modification permanently.
1. Write the no command above into the /etc/rc.tcpip file
2. For AIX5.2 and the later version, you can use the –p parameter provided with the no
command.
Internal use only ▲

Remote Access and Remotely Executed Command


 telnet server/ip
 rlogin rhostname -l username
 rlogin rhostname/ip
 rexec hostname/ip: execute the command on the remote host
 Pseudo terminals are used to process session connection requests by
telnet, rlogin, rsh. If such sessions as telnet, rlogin,
rsh cannot be established, the reason may be that the pseudo
terminals are not enough. In this case, it is necessary to modify the
number of pseudo terminals.
 smit chgpty: set number of pseudo terminals. By default, there are 256
pseudo terminals.
 Pseudo terminals are in the /dev/pts folder. View pseudo terminals
with the ls -l /dev/pts |more command. crw-rw-rw- means
pseudo terminals not in use, and crw--w--w- means pseudo
terminals in use.
Internal use only ▲

Set Trust Hosts/Users in AIX


 /etc/hosts.equiv (trust host file. Its file security must be set as 600)
/$HOME/.rhosts file
 The format of /etc/hosts.equiv is hostname [username], in which,
hostname represents trust host, and username represents a user on
the trust host.
 +hostname [username]: trust the specified user on any host
 hostname [+username]/hostname: trust any user on the specified host
 -hostname [username]: refuse to trust the specified user on any host
 $HOME/.rhosts (trust user file. Suggest to set Its file security as 600)
 The file format is hostname [username]. If username is not specified, it
means to trust the owner of the file. It is the same with
/etc/hosts.equiv in other aspects.
 In the AIX system using hacmp, both the /etc/hosts file and the
/.rhosts file must be configured correctly. The /.rhosts file can
be generated by the cllsig -x > /.rhosts command in hacmp.
Internal use only ▲

Execute the shell Command Remotely


 rsh remotehost [-a] [-n] [-l user] [command]: execute the
command on the remote host
 rcp [-p ] (keep file security mode and modification time) [-r]
(copy all of the cascaded directories) source destination:
remote copy command
 rcp -r directory name root@192.168.1.1: /home/oracle
Internal use only ▲

Review

 Please describe adapter and interface in AIX according to


your understanding?
 How to configure an IP address for the network adapter?
 How to set routes?
 What is the function of the parameter adjust command no

Internal use only ▲

Contents

Introduction to IBM AIX Minicomputers


Storage Management
Equipment Management
User and Group Management
Process, Scheduled Tasks, Service Management
Network Management
Software Installation
Disk Array
Internal use only ▲

System Boot
 Three boot methods:
 1. Hard Disk boot: boot image is from the local hard disk.
 2. Standalone boot: the system boots from the floppy disk, disk
cartridge or the CD driver. Generally, it will be used in case of
installing or upgrading the operating system.
 3. Diskless boot: boot from network

 Three stages of boot:


 1. Initialize the kernel
 2. Configure the equipment
 3. Boot the system
Internal use only ▲

Shutdown the System


 The shutdown command is the safest mode to shutdown the system. All of the
processes will exit and all of the files will be uninstalled after execution of the
command. Hence, it is suggested to notify all of the users logged in before
shutting down the system.
 Execute the shutdown command with the -F parameter to shutdown the system
upon emergency.
 You can also use the halt command to shut down the system, which will not
make the system restarts.
 You can also use the reboot command to shut down the system.
 The shutdown command has many optional parameters. By default, it will alert
the user for about 1 minute, and then terminate processes and synchronize the
file system and stop the CPU:
 #shutdown –m +5 : make the system in single-user mode in 5 minutes
 #shutdown –r: restart the system after shutting down the system
 #shutdown now: shut down the system immediately
 #shutdown –k: abort the operation of shutting down the system
 # shutdown –F: shut down the system fastly
Internal use only ▲

System Backup
 You can use the mksysb command. The command is only used to
back up the mounted file system on rootvg.
 The backup tape made by the mksysb command can be used to boot
system.
 You can also use the savevg command to back up all of the mounted
file systems in the rootv.
 Back up and restore with the backup command and the restore
command.
 For directories and files, you can use the tar command or the pax
command. The pax command has no limit to the file size, and the tar
command limits the size of files (5.2 and 5.3) within 8GB.
Internal use only ▲

Install Software in AIX: about Installation Level


 The olslevel command (for example, olslevel-r) is used
to view the maintenance level. The maintenance level is actually
a patch package.
Internal use only ▲

Install software in AIX: about instfix


Internal use only ▲

Install Software in AIX: about installp


 It is complex to execute the installp command as the
command line. Generally, use smitty installp.
 When installp install software from CDROM, it is unnecessary to
mount CD drive in advance because installp will mount the CD
drive automatically.
 It is unnecessary to mount the CD drive before installing
software with the installp command in CDROM.
 Three software states in AIX:
 Apply,
 Commit: the software in this state cannot be uninstalled.
 Reject: it can be used to uninstall software.
Internal use only ▲

Review

 How to install software in AIX (installp) ?


 How to power on the system correctly ?
Internal use only ▲

Contents

Introduction to IBM AIX Minicomputers


Storage Management
Equipment Management
User and Group Management
Process, Scheduled Tasks, Service Management
Network Management
Software Installation
Disk Array
Internal use only ▲

Some Basic Concepts about Disk Array


 Array (raid)

 LUN (Logic)

 Hot spare
Internal use only ▲

Configure IBM DS5020 Disk Array


Rear view of DS5020

Serial port: connect RS232 serial port cable


Ethernet ports: connect the debugging PC
Dual-port drive channel: to connect the extended rack
Fibre Channel host channels: to connect the host
Internal use only ▲

Connection between the Debugging PC and DS5020

DS5020 has two


controllers: Controller A
and Controller B, and
each have a network
port.

The default IP address of


the network port of the
controller A is
192.168.128.101/255.25
5.255.0.
The default IP address of
the network port of the
controller B is HBA1 HBA2
192.168.128.102/255.25
5.255.0.
Internal use only ▲

Management Software of DS5020

StartprogrammDS Storage Manager 10 ClientDS


Storage Manager 10 Client

Use the DS Storage Manager software to manage the disk array


Internal use only ▲

Delete Storage System Managed by the Client

Only the display on the DS client is deleted, which has


no impact upon the data in the disk array.
Internal use only ▲

How to Use Disk Array


 Add storage subsystem
 Create array on the disk array (Raid)
 Create Logical Drive on the Array (LUN)
 Create Hot Spare Coverage (optional)
 Map LUN to a single or multiple hosts
 Use the LUNs mapped out from the disk array on the host
 Check configuration information of the disk array(any time)
Internal use only ▲

Add Storage Sub-system

If there are two controllers, please input both IP addresses of the controllers. If only
the IP address of one controller is input, the other controller will be unavailable
for the DS storage management client.
Internal use only ▲

Change the Name of the Storage Sub-system


Internal use only ▲

Disk Array Configuration Interface

Double click the disk array to pop up the disk array configuration
interface. It is OK if you don not set the password for the storage
sub-system this time.
Internal use only ▲

Disk Array: SUMMARY


Internal use only ▲

Disk Array: Logical


Internal use only ▲

Disk Array: Physical


Internal use only ▲

Disk Array: Mapping


Internal use only ▲

Create Array: STEP1


Internal use only ▲

Create Array: STEP2


Internal use only ▲

Create Array: STEP3


Internal use only ▲

Create Array: STEP4


Internal use only ▲

Create Array: STEP5


Internal use only ▲

Create Array: STEP6


View ARRAY creation result – end of the step
Internal use only ▲

Create Logical Drive (LUN) on the Array: Step1


Internal use only ▲

Create Logical Drive (LUN) on the Array: Step2


Internal use only ▲

Create Logical Drive (LUN) on the Array: Step3


Internal use only ▲

Create Logical Drive (LUN) on the Array: Step4


Internal use only ▲

Create Logical Drive (LUN) on the Array: Step5


Internal use only ▲

Create Logical Drive (LUN) on the Array: Step6


Internal use only ▲

Create Logical Drive (LUN) on the Array: Step7


Internal use only ▲

Create Hot Spare Coverage: STEP1


 In the Physical tab page, right click a disk not in use, and
select Hot Spare Coverage
Internal use only ▲

Create Hot Spare Coverage: STEP2

Specify the disk protected by the hot spare disk manually.


Internal use only ▲

Create Hot Spare Coverage: STEP3


Difference in disk icons

Allocated Disks not Hot spare


disk in use allocated disk
Internal use only ▲

Create Hot Spare Coverage: STEP4 – View the


Creation Result 1
Internal use only ▲

Create Hot Spare Coverage: STEP4 – View the


Creation Result 2
Internal use only ▲

Create Hot Spare Coverage: STEP4 – View the


Creation Result 3

Array protected: yes means the ARRAY is protected.


End of creating hot spare coverage
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP1

Host interface

Connect Host and Disk Array Correctly


Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP2

Run the cfgmgr –v command on the host, which will find the
connected LUN automatically.
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP3

Confirm the fiber channel adapters


in the system
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP4


Determine the correspondence between the physical position,
the logic name and the WWN of the fiber adapter.

Host

T1 represents the 1st port


C4 is the 4th I10 slot

WWN of the fiber adapter


Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP5


Check the physical position, the logic name and the WWN of the
fiber adapter used on the host.

for FCS in `lsdev -Cc adapter |grep


fcs|awk '{print $1;}'`; do
FCS_PHY_LOCATION=`lscfg -vl
$FCS|grep fcs`;
FCS_WWN=`lscfg -vl
$FCS|grep -i network|awk -F. '{print
$NF;}'`; echo ==========Firbre
channel card information:
$FCS==========; echo
Physical location information: ;
printf "\t
$FCS_PHY_LOCATION\n";
echo Network address\
(WWN\) : ; printf "\t $FCS_WWN\n";
echo "";done
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP6


Click Mapping in the interface below. There will be a prompting
message, as shown below:
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP7

Click Mappings, right click Default Group > Define >Host


to specify the host to access the LUN.
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP8

Type in the host name


Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP9


Select identifier according to the WWN from the drop-down menu
Internal use only ▲
Map the LUN (Logical Drive) to a Single Host:
STEP10
Select fcs0 and fcs2 according to the result above

Another name of the fiber interface

Click Add to add mapping


Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP11

Select a host type.


To select the AIX server, select AIX.
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP12

To map an LUN to only one host (only that host can access the
LUN), please select the second option.
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP13

Preview of the defined host

Select No to exit
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP14


Check host properties. Go on define the mapping relationship if all
of the properties are correct.
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP15


Right click an LUN and map it to the host

The mapping with “?”


means it is not defined.
The LUN cannot be
accessed by any host
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP16


Specify a host to which the LUN will be mapped
Internal use only ▲

Map the LUN (Logical Drive) to a Single Host: STEP17


Check the mapping result after mapping is done.
Internal use only ▲

Map LUN (Logical Drive) to multiple hosts

To make two or most hosts share the LUN on the same disk array,
it is necessary to perform the following steps:
1. Re-create a host group.
2. Add all of the hosts needing to access the shared storage to the
Host Group;
3. Select the Host Group created in step 1 for the mapping object
of the LUN.
Internal use only ▲

Map LUN (Logical Drive) to multiple hosts: STEP1

Create HostGroup
Internal use only ▲

Map LUN (Logical Drive) to multiple hosts: STEP2

Name the Host Group and select the hosts included in the group
Map LUN (Logical Drive) to multiple hosts: Internal use only ▲

STEP3
Select Host group to map the LUN to a host group so that the
LUN can be accessed by any host in that group.

Select Host Group to map


to multiple hosts
Internal use only ▲

Map LUN (Logical Drive) to multiple hosts: STEP4

Check the mapping result:


The LUN named EMS has been mapped to the host group
EMS_Server_Shanghai, which means all of the hosts in the
group can access that LUN.
End of the mapping operation.
Internal use only ▲

Use the LUN on the Disk Array of the Host


After the LUN has been mapped to the host, you can use the LUN
on the host
1. Check the existent hard disks on the host.
2. Recognize the LUN mapped out from the disk array.
3. Use the LUN on the host.
Internal use only ▲

Use the LUN of the Disk Array on the Host: STEP1


Check the existent hard disks on the host
Internal use only ▲

Use the LUN of the Disk Array on the Host: STEP2


Execute the cfgmgr command to configure the device:
Internal use only ▲

Use the LUN of the Disk Array on the Host: STEP3

View hard disks found by the system:


Internal use only ▲

Use the LUN of the Disk Array on the Host: STEP4

Initialize the hard disk. After the hard disk is configured as PV, the
PVID will be displayed.
Internal use only ▲

Use the LUN of the Disk Array on the Host:


STEP5

Create VG, LV and FS by using the LUN on the disk array.


Please refer to the previous related contents.
Internal use only ▲

Review

 What are the default management address and


management software name of DS5020?
 How to understand Array, Logical Drive and Hot spare
correctly?
 Which parameter is used to map an LUN to a single host?
How to map an LUN to multiple hosts?
Internal use only ▲

Review and Questions


General Introduction to IBM AIX Mini-Computers
Storage Management
Equipment Management
User and Group Management
Process, Plan Task and Service Management
Network Management
Software Installation
Disk Array
内部公开▲

You might also like