Sunday, October 5, 2008

Important Notes while working on AIX


Important Notes while working in AIX


Note1- To Check Serial port connectivity (for HACMP), connect serial cable between two systems:-

On one server run
# cat < /dev/tty1

On second server run
# ls > /dev/tty1

Note2- Below is the steps / tips to keep in mind while calculating space in KB (512 or 1024):-

While calculating bytes for increase and decrease file system size, first check it is in 512KB blocks or 1024KB blocks.

Calculations-
Increase file system size in MB-
Formula- “MB to increase * 1024 = Value Multiply by 2 + Current bytes” = Total file system size in MB.
(Note- You have to multiply by two only when the existing file system is in 512KB Blocks and not requires to multiply when it is already in 1024KB Blocks)

Increase file system size in GB-
Formula- “GB to increase * 1024 * 1024 = Value Multiply by 2 + Current bytes” = Total file system size in GB.
(Note- You have to multiply by two only when the existing file system is in 512KB Blocks and not requires to multiply when it is already in 1024KB Blocks)

Note3- While restoring the mksysb in other machine, we can change the attributes in bosinst.data file, that is backed up with mksysb. Like- #vi bosinst.data

Note4- To identify the type of system hardware capability you have, either 32-bit or 64-bit, execute the bootinfo -y command. If the command returns a 32, you cannot use the 64-bit kernel.

Note5- The AIX 5L operating system previously contained both a uniprocessor and a multiprocessor 32-bit kernel. Effective with AIX 5L Version 5.3, the operating system supports only the multiprocessor kernel, regardless of the number of physical processors.

Note6- Types of VG’s and limitations.

Note7- To set any command to run by default during system boot, add the command in /etc/rc file.
For example- We can add the commands in rc file /usr/bin/quotacheck –a and /usr/bin/quotaon –a.

Note8- The default signal sending by kill command is terminate signal - “SIGTERM”, Signal no. 15. The signal names are listed in /usr/include/sys/signal.h.

Note9- Most common SIGNALS used by kill command are-
15- SIGTERM (Terminate) (Default)
9- SIGKILL (KILL)
18- SIGTSTP (STOP)

Note10- Svmon command display the current state of virtual memory in nine different parts-
1. global
2. user
3. command
4. class
5. tier
6. process
7. segment
8. detailed segment
9. frame

The flags and detailed information can be found at web site- http://publib.boulder.ibm.com/infocenter/pseries/index.jsp.

Note11- Startsrc, stopsrc and refresh command sends request to SRC to start, stop or refresh the sub-system, group of subsystems or subserver.

Note12- Zombie processes display as when listed by the ps command.

Note13- By using CTRL-C function in running command, you can cancel the whole process.

Note14- By using CTRL-Z function in running command, it will stop the process immediately.

Note15- The wildcard characters are- asterisk (*) and question mark (?).
Where, The metacharacters are- open and close square brackets ([ ]), hyphen (-), and exclamation mark (!).

Note16- When using smit menu for configuration, the wildcards meaning are-
* - Means mandatory things you have to select while using SMIT.
# - Numeric parameter.
+ - List of options available, can check with drop down menu.
/ - Full path is required.

Note17- In AIX5L AIX print subsystem is already configured. To enable System V Printing subsystem in AIXL, you have to installed the packages from AIX base CD.

Note18- Smitty installp command stores information if maintenance, removal and installation of packages in /var/adm/sw/installp.log, and some detailed information in $HOME/smit.log and $HOME/smit.script.

Note19- By default, when the instfix command is run from the command line, the command uses stdout and stderr for reporting. If you want to generate an installation report, you will need to redirect the output.
For example:
#instfix -aik IY73748 > /tmp/instfix.out 2> /tmp/instfix.err

Note20- Types of AIX Installations and difference between them-
New and complete overwrite
Preservation and
Migration

The difference is-

Note21- Default IP’s for HMC Ports on server are-
HMC Port1- 192.168.2.147
HMC Port2- 192.168.3.147
These IP’s are default for new p-series server until change.

Note22- Authentication for server HMC port is-
User – admin
Password- password
This is default until changed.

Note23- Default IP for HMC’s Ethernet port is-
eth0- 192.168.3.143

Note24- User name and password for HMC system login is-
User- hmcroot
Pass- abc123
This is default comes with system until changed.

Note25- Default IP for IBM SAN Switch management port is-
Management port- 10.77.77.77
This is default comes with all switches until changed.

Note26- Default IP’s for SAN Storage (DS4300) management ports are-
Controller A management port- 192.168.128.101
Controller B management port- 192.168.128.102
Subnet mask- 255.255.255.0
This is default comes with storage DS4300 until changes.

Note27- System booting modes are-
Normal mode
System management services (SMS)
Maintenance mode
Diagnostics

Note28- 32767 Users can connect with AIX server at single time.

Note29- First 512 bytes in hdd reserved for VGDA and Quoram.

Note30- CAPP EL4 is for SSL in AIX and TCB – Trusted computing base, it is for security reasons, we can restore some important files with tcbck commands.

Note31- Crontab command uses the following format-

minutes hours day-of-month monthly weekday “command”
0 to 59 0 to 23 1 to 31 1 to 12 0 to 6
(0 for Sunday)

For every we can use wildcard- *.

Note32- File /etc/environment is to set the basic environments for the system.

Note33- System is using following file sequence when user logged in the system:-


/etc/motd (Global, for all users)
/etc/profile (Global environments for all users)



$HOME/.profile (Single user wise environment settings)



$HOME/.hashlogin (If this file is created, message from motd will be hidden)


Note33- To clear the wall and console messages, use “esc+ctrl+l” key.

Note34- In HACMP, minimum nodes capacity is 2 and maximum is 32.

Note35- Four different types of hardware platform (Architectures) are-

RS6k: RS6000 (MCA-based uni-processor models)
RS6kSMP: RS6000 SMP (MCA-based symmetric multiprocessor models)
RSPC: ISA-bus models
CHRP: Common hardware reference platform (PCI-bus models)

Note36- Format for the date command is:-

mmddHHMMccyy, where mm-Month, dd-day, HH-Hour, MM-Minutes, and ccyy is for century and year.

Note37- Logical track group (LTG) size is the maximum allowed transfer size for an I/O
disk operation.

Note38- While working with errpt commands, these things are required to keep in mind-

Classes: General source of the error, the possible error classes are:

H Hardware.
S Software.
O Informational messages.
U Undetermined.

Type: Severity of the error that has occurred. The following types of errors are possible-
PEND The loss of availability of a device or component is imminent.

PERF The performance of the device or component has degraded to below an acceptable level.

PERM A condition that could not be recovered from. Error types with this value are usually the most severe errors and are more likely to mean that you have a defective hardware device or software module. Error types other than PERM usually do not indicate a defect, but they are recorded so that they can be analyzed by the diagnostics
programs.

TEMP A condition that was recovered from after a number of unsuccessful attempts. This error type is also used to record informational entries, such as data transfer statistics for DASD devices.

UNKN It is not possible to determine the severity of the error.

INFO The error log entry is informational and was not the result of an error.

Note39- While taking backup of rootvg or uservg, it will take only filesystem that is mounted, unmounted file systems and raw devices will not include in vg backup.

Note40- Spilliting a VG means to divide the mirrored VG in to two VG’s. We can give the new VG name in splitvg command. The pv for splitvg will show as snapshot pv. To rejoin the vg, can use the command – joinvg VGNAME.

Note41- Types of devices in UNIX are-

Block device: Block device is a structured random access device. Buffering is used to provide a block-at-a-time method of access. Usually only disk file systems.

Character (raw) device: Character (raw) device is a sequential, stream-oriented device which provides no buffering.

Tips- Most block devices also have an equivalent character device. For example, /dev/hd1 provides buffered access to a logical volume whereas /dev/rhd1 provides raw access to the same logical volume.

Tips- To identify the block and character device, we can see the difference between them with #ls –l /dev command, in the beginning of device file, it will show b letter for block device and c for character device.

Some of the commonly used block and character devices in system are-

Examples of block devices:
cd0 CD-ROM
fd0, fd0l, fd0h Diskette
hd1, lv00 Logical Volume
hdisk0 Physical Volume

Examples of character (raw) devices:
console, lft, tty0 Terminal
lp0 Printer
rmt0 Tape Drive
tok0, ent0 Adapter
kmem, mem, null Memory
rfd0, rfd0l, rfd0h Diskette
rhd1, rlv00 Logical Volume
rhdisk0 Physical Volume

Major and minor numbers: Major number refers to the software section of code in the kernel which handles that type of device, and the minor number to the particular device of that type.

Note42-
SRC: The System resource controller provides a set of commands to make it easier for the administrator to control subsystems.

Subsystem, Subserver and group of Subsystems: A subsystem is a program (or a set of related programs) designed to perform a function. This can be further divided into subservers. Some subsystem have subservers. Subservers are similar to daemons. SRC was designed to minimize the need for user intervention since it provides control of individual subsystem or groups of subsystems with a few commands.

Example: The tcp/ip group contains a subsystem, inetd, that has several subservers, for example ftp and telnet.

Note43-
VGDA: The Volume Group Descriptor Area (VGDA) is an area of disk, at least one per
PV, containing information for the entire VG. It contains administrative information about the volume group (for example, a list of all logical volume entries, a list of all the physical volume entries and so forth). There is usually one VGDA per physical volume. The exceptions are when there is a volume group of only either one or two.
In exception case, If VG contain only one hdd, there will be two VGDAs and if VG contain two hdd, then total VGDA’s will be 3, two VGDAs one disk and one VGDA on second disk.

Quorum: There must be a quorum (quorum meaning in dictionary is - minimum number of members that must be present to constitute a valid meeting) of VGDAs available to activate the volume group and make it available for use (varyonvg). A quorum of VGDA copies is needed to ensure the data integrity of management data that describes the logical and physical volumes in the volume group. A quorum is equal to 51% or more of the VGDAs available.

Tips: A system administrator can force a volume group to varyon without a quorum. This is not recommended and should only be done in an emergency.

Note44- For starting subsystems and subservers automatically while machine booting, edit file /etc/rc.tcpip and remove the hash mark from particular stanza.

Note45- Password to go in SMS menu -
Password- admin
This is default until changed.

Note46- Two types of modes available to set securities on files and directories. There are-


1. Symbolic mode
2. Numeric or absolute mode


1. Symbolic mode:
To specify a mode in symbolic form, you must specify three sets of flags.

The first set of flags specifies who is granted or denied the specified permissions,
as follows:
u File owner.
g Group and extended ACL entries pertaining to the file's group.
o All others.
a User, group, and all others. The a flag has the same effect as specifying the ugo flags together. If none of these flags are specified, the default is the a flag and the file creation mask.

(umask) is applied.

Tip: Do not separate flags with spaces.

The second set of flags specifies whether the permissions are to be removed, applied, or set:
- Removes specified permissions.
+ Applies specified permissions.
= Clears the selected permission field and sets it to the permission specified. If you do not specify a permission following =, the chmod command removes all permissions from the selected field.

The third set of flags specifies the permissions that are to be removed, applied, or set:
r Read permission.
w Write permission.
x Execute permission for files; search permission for directories.
X Execute permission for files if the current (unmodified) mode bits have at least one of the user, group, or other execute bits set. The X flag is ignored if the File parameter is specified and none of the execute bits are set in the current mode bits.

These flags set the search permissions for directories:
S Set-user-ID-on-execution permission if the u flag is specified or implied. Set-group-ID-on-execution permission if the g flag is specified or implied.
t For directories, indicates that only file owners can link or unlink files in the specified directory. For files, sets the save-text attribute.


2. Numeric or absolute mode:
The chmod command also permits you to use octal notation for the mode. The
numeric mode is the sum of one or more of the following values:

4000 Sets user ID on execution.
2000 Sets group ID on execution.
1000 Sets the link permission to directories or sets the save-text attribute for files.
0400 Permits read by owner.
0200 Permits write by owner.
0100 Permits execute or search by owner.
0040 Permits read by group.
0020 Permits write by group.
0010 Permits execute or search by group.
0004 Permits read by others.
0002 Permits write by others.
0001 Permits execute or search by others.

Note47- During system boot, fsck command will by default scan and fix if any errors found for four file systems, these are-

/
/usr
/var
/tmp.

Note48- By default devices / logical volumes are created in rootvg while installing new system with AIX-

LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 2 2 closed/syncd N/A
hd6 paging 4 8 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 1 2 2 open/syncd /
hd2 jfs2 9 18 2 open/syncd /usr
hd9var jfs2 1 2 2 open/syncd /var
hd3 jfs2 1 2 2 open/syncd /tmp
hd1 jfs2 1 2 2 open/syncd /home
hd10opt jfs2 1 2 2 open/syncd /opt

Note49- To go in SMS menu while system startup, press “1” and to select factory default bootlist press “5”.

No comments: