About Us

RSInfoMinds, a web based IT Training and Consultancy firm. It is established with high dreams in training people in IT Infrastructure Field. We provide Online and Class Room training in various fields of IT Infrastructure Management.

Join Us: http://www.facebook.com/RSInfoMinds
Mail Us: rsinfominds@gmail.com
Twitter: @RSInfoMinds

We are specialized in the below courses:

Redhat Linux Admin Redhat Linux Cluster
Redhat Virutualization IBM AIX Admin
IBM AIX Virtualization IBM AIX Cluster
HP Unix Admin HP Unix Cluster
HP Unix Virtualization Shell Scripting
Veritas Volume Manager Veritas Cluster
Oracle Core DBA VMWare


We provide training in such a way, So that you get in depth knowledge on the Courses you look for.

And we ensure you are very confident from each and every Techincal aspect that the IT Industry needs and expects from you.

We also conduct Workshops on the latest technology and the real time faculties sharing their work experiences to make you the best.

Wednesday, 21 December 2011

Volume Group Operation in AIX and HP_UNIX

HP_Unix:

1) #  vgdisplay <volume group name> : Display information about the volume group.

2) # vgdisplay -v <volume group name> : Display more detailed information on the volume group.

3) # vgchange -a y /dev/<VG name> : To activate a volume group.

4) # vgchnage -a n /dev/<VG name> : To deactivate a volume group.

5) # vgexport  /dev/<VG name> : To remove a volume group.

6) # vgimport /dev/<VG name> : To import an exported volume group.

IBM AIX:

1) # lsvg : List all the volume groups.

2) # lsvg -o : List all the active volume groups.

3) # lsvg <volume group name> : Information about the Volume group.

4) # lsvg -l <volume group name> : Information about the logical volumes in the volume group.

5) # lsvg -p <volume group name> : Information about the physical volumes in the volume group.

6) # lsvg -m <volume group name> : Information about the mirroed volume group.

7) # varyoffvg <volume group name> : To deactivate a volume group.

8) # varyonvg <voluume group name> : To activate a volume group.

9) # exportvg  <voluume group name> : To remove a volume group.

10) # importvg <voluume group name> : To import a volume group.

Volume Group Creation in HP_Unix and IBM AIX

HP-UNIX:

1) # ioscan -funC disk : Locate the disk you want to use for the creation of volume group.

2) # strings /etc/lvmtab : Shows the physical volumes that are part of LVM.

3) For Hp Unix Version 11:

We need to create a device file called "group" for the volume group which we are about create. The "group" file is a character based file with the major  "64" default for Hp_ux and minor number of out choice "0x010000"

# cd /dev/

# mkdir <volume group name>

# chown root:root <volume group name>

# chmod 755 <volume group name>

# cd /volumegroup name

# mknod /dev/volume group name/group c 64 0x010000

# chown root:sys group

# chmod 755 group

4) # pvcreate /dev/rdsk/c#t#d# : PV creation.

5) # vgcreate -s <PE size> /dev/<volume group name> /dev/dsk/c#t#d#

6) # vgdisplay : View the volume group created.

7) # strings /etc/lvmtab : Verify the same.

AIX:

1) # cfgmgr

2) # lspv :  Select the physical volumes in the none state.

3) # mkvg -y <volume group name> -s <PP size> <Physical volumes....>

4) # lsvg  : List all the volume group.

5) # cd /etc/vg/

6) # ls -l : Verify a "Zero Byte" file is created with the prefix "vg.<VG ID>" has been created..

Tuesday, 20 December 2011

Adding and Removing a Device in AIX and HP_UNIX

AIX: # cfgmgr :  Execute configuration manager.

HP_UNIX: # ioscan : Running hardware scan on the box.

AIX:  # rmdev -dl <Device name> : Command to remove a device.

HP_UNIX: # rmsf -a <Device path (/dev/dsk/c2t0d0)

AIX: # mkdev -l <Device name> : To bring the device active or # cfgmgr.

HP_UNIX: # insf -e and then run # ioscan

AIX : # lsdev -Cc <Class> -d <Device name> -F Parent : View the parent of the device.

HP_UNIX: # ioscan

Monday, 19 December 2011

LVM in IBM AIX and HP UX

Volume Group Creation:

# mkvg -y <VG name> -s <Size of PP> <Physical Volumes>  : AIX

# vgcreate -n <VG name> <Physical Volumes> : HP_UX

Physical Volume Creation:

# mkdev -l hdisk# : Intialize a physical volume : AIX

# pvcreate /dev/rdsk/c#t#d# : Create a physical volume : HP_UX

Logical Volume Creation:

# mklv -t  <Filesystem type> -y <Logical volume name> <Volume group name> <No.of PP's>  <Physical Volume Name> : AIX

# lvcreate -L <Size in MB> -n <Logical volume name> <Volume group name with the location> : HP_UX

File System Creation:

# crfs -v <Filesystem type> -d <Logical volume name> -m <Mount point> -A y/n : AIX

# newfs -F vxfs <Location of a Raw Logical volume name> : HP_UX

Mount Point:

# mount <Logical Volume Name> <Mount Point> : Same in AIX and HP_UX.





Friday, 16 December 2011

Compare Hp-Unix and IBM AIX Commands - Part 1

Hp-UX: # ioscan -C disk : To list all the Disk detected in the machine.
IBM AIX: # lsdev -Cc disk : To list all the Disk detected in the machine.

Hp-UX: #ioscan -fnC fc : To list the FC Adapter in the machine.
IBM AIX:  # lsdev -Cc adapter | grep -i fcs : To list the FC Adapter in the machine.

Hp-UX: # ioscan -funC fc /dev/td# : To view more information about a FC Adapter.
IBM AIX:  # lsattr -EHl fcs0 :To view the more information about a FC Adapter.

Hp-UX:  # /opt/fcms/bin/tdutil /dev/td# | grep -i "World Wide Name" : Command to view the WWN Number.
IBM AIX:  #  lscfg -vpl fcs# | grep -i "Network Address" : Command to view WWN Number

Hp-UX: # ioscan -m hwpath : Command to view hardware path of the disk.
IBM AIX:  # lcsfg -vpl hdisk# : Command to view the hardware path of the disk.

Hp-UX: # ioscan -m lun : Display all the LUN's connected.
IBM AIX: # lspv : Display all the LUN's connected.

Hp-UX: # swlist -l : Command to list all the softwares installed in the machine.
IBM AIX:  # lslpp -l : Command to list all the softwares installed in the machine.

Hp-UX: # bdf  : To view the disk and the filesystem usage.
IBM AIX:  # df : To view the disk and the filesystem usage.

Hp-UX: # lvlnboot -v : To veiw the current boot list.
IBM AIX:  @ bootlist -m normal/secure/both -o

Hp-UX: # setboot : Command to set the bootlist.
IBM AIX:# bootlist -m normal/secure/both -o hdisk# blv=hd5

Hp-UX: # swapinfo -a : Command to view the paging space.
IBM AIX:# lsps -a : Command to view the paging space.

Hp-UX: # diskinfo -v /dev/rdsk/c#t#d3 : To view the size of the disk.
IBM AIX:# bootinfo -s hdisk# : To view the size of the disk.

Tuesday, 13 December 2011

lastcomm better than history and last

By default the history command shows the "last executed command" in the machine. Rather # history and #last command failed to give more information which the #lastcomm provides.

To use the #lastcomm command, we need start the service:

1) bash-3.2# /usr/sbin/acct/startup

2) bash-3.2# lastcomm
bsh          S     root     pts/0      0.03 secs Tue Dec 13 08:15
bsh          S     root     pts/0      0.02 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
bsh          S     root     pts/0      0.01 secs Tue Dec 13 08:15
accton       S     root     pts/0      0.01 secs Tue Dec 13 08:15
1st col : Command executed.
2nd col: Command executed by whom. S:root
3rd col: Owner of the command.
4th col: Terminal.
5th col: Execution time of the command.
6th col: Date and Time.

3) bash-3.2# who
root        pts/0       Dec 13 06:20     (ABTS-TN-Static-067.62.165.122.airtelbroadband.in)
root        pts/1       Dec 13 06:24     (122.248.161.91)
root        pts/2       Dec 13 08:05     (ABTS-TN-Static-102.64.165.122.airtelbroadband.in)
root        pts/3       Dec 13 08:18     (122.165.62.67)
root        pts/4       Dec 13 07:16     (122.248.161.91)
4) bash-3.2# lastcomm root pts/3 : List the command executed by a root user on the terminal pts/3
tty          S     root     pts/3      0.01 secs Tue Dec 13 08:18
sar          S     root     pts/3      0.01 secs Tue Dec 13 08:18
sadc         S     root     pts/3      0.14 secs Tue Dec 13 08:18
5) bash-3.2# lastcomm root : List all the commands executed by the root user.
lastcomm     S     root     pts/0      0.03 secs Tue Dec 13 08:19
lastcomm     S     root     pts/0      0.03 secs Tue Dec 13 08:19
lastcomm     S     root     pts/0      0.03 secs Tue Dec 13 08:19
lastcomm     S     root     pts/0      0.03 secs Tue Dec 13 08:19
nfssync_kpro    DX root     __         0.01 secs Tue Dec 13 08:18
who          S     root     pts/0      0.01 secs Tue Dec 13 08:18
tty          S     root     pts/3      0.01 secs Tue Dec 13 08:18
lastcomm     S     root     pts/0      0.03 secs Tue Dec 13 08:18
sar          S     root     pts/3      0.01 secs Tue Dec 13 08:18
sadc         S     root     pts/3      0.14 secs Tue Dec 13 08:18
sar          S     root     pts/3      0.01 secs Tue Dec 13 08:18
termdef      S     root     pts/3      0.01 secs Tue Dec 13 08:18
setmaps      S     root     pts/3      0.01 secs Tue Dec 13 08:18
tty          S     root     pts/0      0.01 secs Tue Dec 13 08:18
lastcomm     S     root     pts/0      0.02 secs Tue Dec 13 08:18
nfssync_kpro    DX root     __         0.01 secs Tue Dec 13 08:17
lastcomm     S     root     pts/0      0.02 secs Tue Dec 13 08:17
clear        S     root     pts/0      0.01 secs Tue Dec 13 08:17
file         S     root     pts/0      0.02 secs Tue Dec 13 08:17
more         S     root     pts/0      0.01 secs Tue Dec 13 08:17
ls           S     root     pts/0      0.03 secs Tue Dec 13 08:17
nfssync_kpro    DX root     __         0.01 secs Tue Dec 13 08:16
nfssync_kpro    DX root     __         0.01 secs Tue Dec 13 08:15
lastcomm     S     root     pts/0      0.02 secs Tue Dec 13 08:15
bsh          S     root     pts/0      0.03 secs Tue Dec 13 08:15
bsh          S     root     pts/0      0.02 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
rm           S     root     pts/0      0.01 secs Tue Dec 13 08:15
bsh          S     root     pts/0      0.01 secs Tue Dec 13 08:15
accton       S     root     pts/0      0.01 secs Tue Dec 13 08:15
6) bash-3.2# date
Tue Dec 13 08:22:09 CST 2011
bash-3.2# lastcomm date : Shows when the date command was executed.
date         S     root     pts/0      0.01 secs Tue Dec 13 08:22

              S  The root user executed the command.
              F  The command ran after a fork, but without a following subroutine.
              C  The command ran in PDP-11 compatibility mode.
              D  The command terminated with the generation of a core file.
              X  The command was terminated with a signal.

Find Your Device Driver Fileset In 3 Steps

In case you want to the device drive fileset name of your tape drive rmt#:

1) bash-3.2# odmget CuDv | grep -p rmt
CuDv:
        name = "rmt0"
        status = 1
        chgstatus = 2
        ddins = "tape"        location = "10-60-00-5,0"
        parent = "scsi0"
        connwhere = "5,0"
        PdDvLn = "tape/scsi/scsd"
Make a note of the ddins="tape"

2) bash-3.2# find / -name "tape" -ls
30861   60 -r-xr-xr-x  1 root      system       58964 Aug  5  2005 /usr/lib/drivers/tape122898    4 drwxr-xr-x  2 root      system         512 Jan 10  2006 /usr/lpp/bosinst/tape

3) bash-3.2# lslpp -w /usr/lib/drivers/tape
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/drivers/tape          devices.scsi.tape.rte        File

So the device driver of the tape drive belongs to the fileset "devices.scsi.tape.rte"

Monday, 12 December 2011

Types of AIX Boot

There are four basic boot types.

·         Warm boot:
Booting a running system by performing a shut down and reboot in a single operation. This type of boot is also known as a soft IPL (Initial Program Load).

·         Cold boot:
Booting a halted system.

·         Timed boot:
Booting a halted system automatically after a specified period of time.

·         Crash boot:
Automatic reboot of a system that has crashed.

lastcomm Command

Displays information about the last commands executed.

The lastcomm command displays information, in reverse chronological order, about all previously executed commands that are still recorded in the /var/adm/pacct summary file. You need to run the /usr/sbin/acct/startup command before you can execute the lastcomm command.

lastcomm [ -X ][ Command ] [ Name ] [ Terminal ]

/var/adm/sulog

The su log file is used to log attempts to become a superuser.

SU 07/08 10:57 + pts/0 root-root
SU 07/11 12:44 + pts/0 root-nobody
SU 07/25 16:37 + pts/5 dcoca-root
SU 09/11 10:21 + pts/1 mrj1-root

SU : Switch User action was performed.

07/08 : Date and Month at which the action was performed.

10:57 : Time at which the action was performed.

+ : Indicate a successful Switch User.

pts/0 : In which Pseudo Termial the action was performed.

dcoca-root : From which user, the root was switched from.

FIBER CHANNEL ADAPTER SETTINGS

root@aix21b09: / # lsattr -El fscsi0
attach       switch       How this adapter is CONNECTED         False   <-- shows actual connection protocol (None,switch,al lehet)
dyntrk       no           Dynamic Tracking of FC Devices        True    <-- dynamically follows SAN changes
fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True    <-- 3. delayed_fail or fast_fail
scsi_id      0x133300     Adapter SCSI ID                       False
sw_fc_class  3            FC Class for Fabric                   True

root@aix21b09: / # lsattr -El fcs0
bus_intr_lvl  305        Bus interrupt level                                False
bus_io_addr   0xffc00    Bus I/O address                                    False
bus_mem_addr  0xfffbf000 Bus memory address                                 False
init_link     al         INIT Link flags                                    True    <--al or pt2pt
intr_priority 3          Interrupt priority                                 False
lg_term_dma   0x800000   Long term DMA                                      True    <--deafault 0x200000, max. 0x8000000
max_xfer_size 0x100000   Maximum Transfer Size                              True    <--default is 100000, max 1000000
num_cmd_elems 200        Maximum number of COMMANDS to queue to the adapter True    <--default 200, max is 1024 or 2048
pref_alpa     0x1        Preferred AL_PA                                    True
sw_fc_class   2          FC Class for Fabric                                True


attach:(sets the Fiber Channel topology)
    none: if no cable has been plugged in
    al: all devices are in a loop or ring, similar to token ring networking. The failure of one device causes a break in the ring.
    switch: all devices or loops of devices are connected to Fibre Channel switches, similar conceptually to modern Ethernet implementations  

dyntrk:
    http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/fast_fail_dynamic_interaction.htm
    If it is on yes, it enables dynamic changing of fibre channel cable connections on switch ports or storage ports.
    We have changed few StoragePorts to another Switch last saturday ==> that means, that the HardwarePath changed for these servers,
    where the Option "dyntrk" is set to no. --> reconfigure your disks

fc_err_recov:
    http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/fast_fail_dynamic_interaction.htm

    delayed_fail: waits some time before acting.
    fast_fail is useful where multipathing software is used. This would support faster failover to alternate paths

init_link:
    from online help: "Do not change this attribute unless directed by IBM support."
    al: arbitrared loop : first tries al, then pt2pt, if not succes then link remains down
    pt2pt: tries pt2pt, if not succes then link remains down

lg_term_dma:
    it controls the DMA memory resource that an adapter driver can use.
    If you have a dual port adapter the maximum value is divided between the adapter ports.

max_xfer_size:
    controls the maximum transfer size. You can increase this value to improve performance.
    Different storages might need different values to utilize the performance

num_cmd_elems:
    Maximum number of commands to be queued to the adapter.
    When a large number of supported storage devices are configured, you can increase this to improve performance.

Setting the LHEA to promiscuous mode

To use a Shared Ethernet Adapter with a Host Ethernet Adapter (or Integrated Virtual Ethernet), you must set the Logical Host Ethernet Adapter (LHEA) to promiscuous mode.
In the navigation area, expand Systems Management and click Servers.
  1. In the contents area, select the server on which the Virtual I/O Server logical partition is located.
  2. Click Tasks and select Hardware (information) > Adapters > Host Ethernet. The HEAs page is shown.
  3. Select the physical location code of the Host Ethernet Adapter.
  4. Select the physical port associated with the Logical Host Ethernet port on the Virtual I/O Server logical partition, and click Configure. The HEA Physical Port Configuration page is shown.
  5. Select VIOS in the Promiscuous LPAR field.
  6. Click OK twice to return to the contents area.

lsmksysb

The rootvg backup taken on the tape drive could be listed using the lsmksysb command.

1) # lsattr -EHl rmt0 : Command to display the attribute of a tape drive.

2) To execute the lsmksysb command, the block size of the tape drive should be 512 Bytes. If not change it using the command.

# chdev -l rmto -a block_size=512

3) # lsmksysb -lf /dev/rmt0 : Command to list the contents of the rootvg backup.

VOLUME GROUP: rootvg
BACKUP DATE/TIME: Thu May 7 15:42:48 CDT 2009
UNAME INFO: AIX shaevelbso 3 5 00059D5C4C00
BACKUP OSLEVEL: 5.3.7.0
MAINTENANCE LEVEL: 5300-07
BACKUP SIZE (MB): 7168
SHRINK SIZE (MB): 4358
VG DATA ONLY: no




 

Create a System Dump

The below steps shows how to create a dump device:

1) # sysdumpdev -l : Command to list the current dump device.

2) # sysdumpdev -e : Command to estimate the size of the dump device, in bytes. We can covert the value into MB and create a system dump is appopriate number of PP's.

3) # mklv -y <system_dump_name> -t sysdump Volume_Group_name no_of_LP's Physical_Volume_Name

4) Once the device is created. We can assign the dump device as the primary one or secoundary one.

5) AIX Machine having RAM size of less that 4GB, hd6 becomes paging device as well as system dump device.

6) # sysdumpdev -p <Dump_Devicename> : Command to assign primary dump device.

7) # sysdumpdev -s <Dump_Devicename> : Command to assign secoundary dump device.

Thursday, 8 December 2011

CPU Virtualization - Power 5 Based





On a Power 5 system it is possible to create a logical parition with dedicated processor or shared processor. The concept of shared processore refers to virtualization of CPU's processing unit.

Power5 introduced the concept of "Global Shared Processor Pool". It contains group of processor that will be shared among the logical partition that are created using the shared resources (CPU).

Processing unit of a CPU is always measured in 1/10 th of the CPU Power.  So, with the single CPU 1/10=0.1 Processing unit can be assigned to a logical partition. So a single CPU can support 10 LPAR's (logically).

The granulartiy of increasing the processing unit is 0.01 ( As per IBM Standards).

The above diagram shows a P5 machine with 6 Physical Processors.
The machine has 4 partitions namely A,B,C and D.

Partitions A and B are created with the dedicated processors. 3 Processor per partition. So, A and B are allocated with 6 Physical Processor.

Remaining processors available : 16-(3+3)=10 Processors.

Processing unit of a single processor is expressed as 1/10, therefore 10 Processors hold : 10*10 : 100 Processing units.

The 10 Processors are combined in a "Global Shared Processor Pool" with the processing capacity of 100 units.

Logical Partitions use these processing units as a Virtual Processor. i.e., Virtual processors provide required amount of processing units to the logical partitions.

Now, Partition C has 52 Processing units with 7 virtual processor and Partition D has 23 Processing units with 5 Virtual Processor.

So, Total processing units occupied by C and D : 52+23=75 Processing units.

Now, available processing unit in the Global Shared Processor Pool = 100-75 = 25 Processing units.

These 25 Processing units are not allocated.

No.of Processing unit allocated to a partition is called : Entitlement.

Capped Partition: Partition cannot get more processing unit than that of allocated to it.

Uncapped Partition: Partition can acquire more processing unit than that of allocated to it.

Similarily, an "uncapped partition" can also consume less processing units than that of allocated to it. This should give a clear understanding between "Physical consumption" and "Entitlement consumption".

Physical Consumption: Refer to percentage of processor power/unit consumed by a partition.

Entitlement Consumption: Refer to percentage of processor power/unit currently consumed compared to the no.of processing units allocated to that partition.

So, its evident that an "uncapped partition" can have an "Entitlement Consumption" of more than 100%.




Explore # topas -C

In this report, you see the global memory consumption metrics:

mem : Represents the sum of monitored memory for all shared partitions in the pool.
muse : Represents the sum of memory consumed for all shared partitions in the pool.
Mem : Represents the amount of memory allocated to the partition.
InU : Represents the amount of memory consumed by the partition.
mon : Represents the total amount of memory allocated to the partitions.

Restoring an AIX System with mksysb

In the event of a disaster, you can boot from tape, CD/DVD, or the network and do a full restore. The processes are very similar, so we'll cover them as one procedure:
  1. If the system is still running, you can set it up to boot from tape or CD before you shut it down:
    1. To boot from CD/DVD:
    2. Client # bootlist m normal cd0
                              
    3. To boot from tape:
    4. Client # bootlist m normal rmt0
                              
    5. To boot from the network:
    6. Client # bootlist m normal en0
                              
  2. Power down the system.
  3. Attach a system terminal (or monitor and keyboard).
  4. Prepare the media:
    1. If this is a tape restore, attach a tape drive and insert the tape in the drive.
    2. If this is a CD restore, insert the first CD/DVD in the drive.
  5. Power up the system.
  6. Display the SMS menu. If you weren't able to set the boot list to the proper device before powering down, you need to tell the system to boot from the proper device on power up. On HMC-attached systems, you can select the boot mode before you start the partitions; it then defaults to the SMS menu. On other AIX systems, you need to interrupt the boot process to display the SMS menu. On some older systems, you press F1 while the POST icons are appearing on the monitor. On most later model systems, you press F5 while the POST icons are appearing on the monitor. Consult the hardware guide that shipped with your AIX system for the interrupt sequence for your model of hardware.
  7. Once in the SMS menu, select Maintenance Mode, and set one of the following restore/boot options:
    1. Choose Select Boot Device, and specify CD, DVD, or tape restore.
    2. For a NIM install, select "Installation from Network." Selecting NIM install may require you to supply additional network parameters depending on how your NIM server is set up.
  8. The backup is checked for compatibility. If the backup is compatible with the hardware it is being restored onto, it pauses for five seconds and then continues unprompted and restores the rootvg based on the settings in image.data and/or bosinst.data. If you want to interrupt the install, press the 0 key three times (000) during the five-second pause. This forces the restore into prompted mode. In the event that the backup does not match the hardware of the system, it automatically begins a prompted restore. The prompted restore looks very much like the initial AIX installer, but at the end you have a restore of your system.
  9. If you are not performing a prompted restore, the restore continues uninterrupted until it completes. If you are performing a prompted restore, it allows you to change the physical disk(s) that the restore is performed to, shrink filesystems, etc.
  10. When the restore finishes, the system changes its boot device to the install target devices for the rootvg and reboot.

Wednesday, 7 December 2011

Link Aggregation on a Single VIOS


The below document explains the need and the process involved in link aggregation. Link aggregation is also called as "Ethernet Bonding". Which ensure continous availability of network service to avoid any failures in the networking service.

The above illustration shows link aggregation by using 3 physical ethernet adapters namely ent0, ent1 and ent2. Link aggregation is made upof primary and secondary adapters.

In this example, the primary adapter is formed my aggregating ent0 and ent1 from the ethernet switch on the left hand side. Another adapter ent2 act as a secondary adapter which is connected to the ethernet switch on the right hand side, to tolerate the failover of the switch on the left hand side.

Configuration:

1) Login into VIOS.

2) $ lsdev -type adapter
name status description
ent0 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent1 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent2 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890

3) Ensure all the attributes of the physical adapters that form the link aggregation must be the same.

# lsdev -dev ent* -attr : Command to view the attributes of an adapter.
# chdev -dev ent* -attr attribute=value : Command to change the attribute of an adapter.

4) Forming Link Aggregation:

$ mkvdev -lnagg ent0,ent1 -attr backup_adapter=ent2
ent3 Available
en3
et3

5) Verify the newly created Link Aggregation.
 ent3 Available EtherChannel / IEEE 802.3ad Link Aggregation

6) View the attributes of the Link Aggregation.

$ lsdev -dev ent3 -attr
attribute value description user_settable
adapter_names ent0,ent1 EtherChannel Adapters True
alt_addr 0x000000000000 Alternate EtherChannel Address True
auto_recovery yes Enable automatic recovery after failover True
backup_adapter ent2 Adapter used when whole channel fails True
hash_mode default Determines how outgoing adapter is chosen True
mode standard EtherChannel mode of operation True
netaddr 0 Address to ping True
noloss_failover yes Enable lossless failover after ping failure True
num_retries 3 Times to retry ping before failing True
retry_time 1 Wait time (in seconds) between pings True
use_alt_addr no Enable Alternate EtherChannel Address True
use_jumbo_frame yes Enable Gigabit Ethernet Jumbo Frames True

$ lsdev -type adapter
name status description
ent0 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent1 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent2 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890

7) Using HMC, create a new virtual ethernet adapter. Ensure the "Access External Network" flag is checked.

$ lsdev -type adapter
name status description
ent0 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent1 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent2 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent3 Available EtherChannel / IEEE 802.3ad Link Aggregation
ent4 Available Virtual I/O Ethernet Adapter (l-lan)

8) Configure Shared Ethernet Adapter using the newly created Link Aggregation (ent3) and Virtual Ethernet Adapter (ent4).

$ mkvdev -sea ent3 -vadapter ent4 -default ent4 -defaultid 2
ent5 Available
en5
et5

9) Verify the Shared Ethernet Adapter.

$ lsdev -type adapter
name status description
ent0 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent1 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent2 Available 2-Port 10/100/1000 Base-TX PCI-X Adapter (1410890
ent3 Available EtherChannel / IEEE 802.3ad Link Aggregation
ent4 Available Virtual I/O Ethernet Adapter (l-lan)
ent5 Available Shared Ethernet Adapter

10) Assign IP over the SEA ent5.

$ mktcpip -hostname <machine name> -interface en5 -inetaddr 10.0.01 -netmask 255.0.0.0

Binding a specific device interrupt to a processor

Every device in AIX has interrupt level. It denotes the way in which the request from the device are submitted to the CPU for execution of task.

Interrupt : It stops the current execution of the processor and executes the interrupted process.

Steps to do binding:

# lsattr -EHl ent0 : Command to view the interrupt level of a device.

# bindprocessor -q : Command to view the processors available in the box.

# lsattr -EHl proc* : Ensure the processors have SMT on. (Simultaneous Multi-threading).

# bindintcpu <interrupt level> <processor no> : Command to bind a interrupt to a specific processor.

# vmstat -i : Command to view the bind interrupt execution.

Do IP_Tracing

IP Tracing utility is handled by the demon called "iptrace".

1) # startsrc -s iptrace -a -s <source machine> -d <destination machine> -p <protocol> -i <interface> <location of the output file>

The above commands monitors/traces all the network related activity happening between the specified source and the destination machine through the specified interface. Finally the output is stored in the desired location.

2) # stopsrc -s iptrace : Command to stop the iptracing demon.

3) # ipreport -srn <output file> : Command to interpet the iptrace output.

TCP/IP Tracing

# iptrace -e -i <interface> <location name> : Command to trace activities on a particular interface and the output is stored in the location.

# ipreport <location of the iptrace output> : Command to view the output of the iptrace command.

Handling Etherchannel Device

# /usr/lib/methods/ethchan_config -f  etherchannel device :  Command to cause maual failover to an etherchannel.

# /usr/lib/methods/ethchan_config -a -b etherchannel backupadapter : Command to add a backup adapter to an etherchannel device.

# /usr/lib/methods/ethchan_config -c etherchannel netadd ping_address : Command to change the address of the control channel.

Monday, 5 December 2011

Restoring files from mksysb backup

Restoring the /image.data from the mksysb tape backup:.

 
/image.data is stored on the 2nd block of the tape.

1) Change the block size of the tape drive to 512.
# chdev -l rmt0 -a block_size=512

2) Check to make sure the block size of the tape drive has been changed:
# tctl -f /dev/rmt0 status

rmt0 Available 10-60-00-1,0 4.0 GB 4mm Tape Drive
attribute value description user_settable
block_size 512 BLOCK size (0=variable length) True
compress yes Use data COMPRESSION True
mode yes Use DEVICE BUFFERS during writes True
ret_error no RETURN error on tape change or reset True

3) Change the location where you would like to restore the /image.data
# restore -s2 -xqvf /dev/rmt0.1 ./image.data.

Restoring the /image.data from the mksysb file backup:
Change the location to restore the backup.
# restore -xqvf <location of mksysb backup> ./image.data

Memory Checking in all the UNIX machines

Solaris

  1. dmesg grep mem
  2. prtdiag grep Memory
  3. prtconf -v grep Memory

AIX

  1. bootinfo -r
  2. lsattr -E1 sys0 -a realmem
  3. getconf REAL_MEMORY

HPUX

  1. dmesg grep Physical
  2. /opt/ignite/bin/print_manifest grep Memory
  3. machinfo grep Memory

Linux

  1. dmesg grep Memory
  2. grep -i memtotal /proc/meminfo
  3. free

OpenVMS

  1. show mem /page

Update:

FreeBSD

  1. dmesg grep memory
  2. grep memory /var/run/dmesg.boot
  3. sysctl -a grep mem

How to delete file with special characters

If you have files with the name of any special characters they are handled:

Eg: Filename is -s.

# cat -- -s : View the file with the name -s
# ls -l -- -s : To list the file.
# rm -- -s : Remove the file.

Listing and Restoring a mksysb content


# listvgbackup -f /dev/rmt0 : List the mksysb files in the tape backup.

# listvgbackup -f /filename : List the mksysb files in the file backup.

# restorevgfiles -r -f '/dev/rmt0' /dir : To restore the /dir from the tape /dev/rmt0

Migrating Users from One AIX System to Another AIX System

Files that can be copied over

/etc/group
/etc/passwd
/etc/security/group
/etc/security/limits
/etc/security/passwd
/etc/security/.ids
/etc/security/environ
/etc/security/.profile

NOTE: Edit the passwd file so the root entry is as follows:

root:!:0:0::/:/usr/bin/ksh

When you copy the /etc/passwd and /etc/group files, make sure they contain at least a minimum set of essential user and group definitions.

Listed specifically as users are the following:
  • root
  • daemon
  • bin
  • sys
  • adm
  • uucp
  • guest
  • nobody
  • lpd
Listed specifically as groups are the following:
  • system
  • staff
  • bin
  • sys
  • adm
  • uucp
  • mail
  • security
  • cron
  • printq
  • audit
  • ecs
  • nobody
  • usr
If the bos.compat.links fileset is installed, you can copy the /etc/security/mkuser.defaults file over. If it is not installed, the file belongs in the /usr/lib/security directory.

If you copy over mkuser.defaults, changes must be made to the stanzas.
Replace group with pgrp, and program with

shell
. A proper stanza should look like the following:

user:
            pgrp = staff
            groups = staff
            shell = /usr/bin/ksh
            home = /home/$USER

The following files may also be copied over, as long as the AIX version in the
new machine is the same:

/etc/security/login.cfg
   /etc/security/user

NOTE: If you decide to copy these two files, open the
/etc/security/user
file and make sure that variables such as tty, registry, auth1 and so forth are
set properly with the new machine. Otherwise, do not copy these two files, and
just add all the user stanzas to the new created files in the new machine.
Once the files are moved over, execute the following:

usrck -t ALL
    pwdck -t ALL
    grpck -t ALL

This will clear up any discrepancies (such as uucp not having an entry in
/etc/security/passwd). Ideally this should be run on the source system
before
copying over the files as well as after porting these files to the new system.
NOTE: It is possible to find user ID conflicts when migrating users from
older versions of AIX to newer versions. AIX has added new user IDs in
different release cycles. These are reserved IDs and should not be deleted.
If your old user IDs conflict with the newer AIX system user IDs, it is advised
that you assign new user IDs to these older IDs.

Friday, 2 December 2011

"Server refused to allocate pty"

The symptoms may indicate that there is an application that is holding on to ptys and not releasing it. Try using the 'fuser' command to find the culprit application, like this:

# cd /dev/pts

# fuser *

The 'fuser' command will list all PIDs associated with each pty device.
If there is a process that is not releasing its ptys, you will see its PID occur many times in the fuser output.

Solution: Restart the application.

Various Commands for Hardware Inventory

The following commands provide system hardware configuration:
  • To provide a system inventory of processor memory,disks, network information:
    prtconf

Processor-related commands:
  • To read ODM:
    lsdev -Cc processor
    
  • To read running processor:
    bindprocessor -q
    
    or
    lsattr -El proc0
    
  • To performance statistics on running processor:
    sar -P ALL 1 5
  • To process running on what processor:
    pstat -S

Memory-related commands:
  • To check status of memory:
    lsdev -Cc memory
    
  • To check memory size:
    In kilobytes:
    bootinfo -r
    In megabytes:
    lsattr -El mem0
    or
    topas
    In 4 kilobyte pages,
    svmon -G

Disk-related commands:
  • To check status of disk and type of disk:
    lsdev -Cc disk
  • To check characteristics of hdisk0 including size:
    lsattr -El hdisk0
  • To check vital product data, including size:
    lscfg -vp |more
    
Tape-related commands:
  • To check tape status and type:
    lsdev -Cc tape
  • To check characteristics of tape drive:
    lsattr -El rmt0
  • To check vital product data, including size:
    lscfg -vp |more
    

Thursday, 1 December 2011

Remove a static route

First Option: Smitty

Step 1: Run netstat -rn
Step 2: Verify the route you want to remove. Also look at the ODM so you can see later that it was removed from there to. To verify from the odm run lsattr -El inet0. In this example we will remove the route circled in red. Notice on the flags column and you will see it has a flag of H, meaning it is a Host route.

Remove a static route

Here is the odm output and circled in red is the same route from the netstat -rn output. It also shows you that it is a Host route we are going to remove. It looks similar to the route above it, but one is a network route and the other is a host specific route.
Remove a static route

Step 3: Type smitty route

Step 4: Select remove a static route

Remove a static route

Step 5: Enter the information for destination and gateway exactly how you see it in the routing table.

For Destination Type we can hit F4 and it will give us two options: net and host. In our case we will select host since we are removing a host specific route.

Under Destination Address we will enter what is in the Destination column of the
netstat -rn.

The Gateway value will be what’s in the Gateway column of the netstat -rn.

Hit enter when done.

Remove a static route

Step 6: Verify that it was gone with the lsattr command. lsattr -El inet0.

Notice we don’t see the following value for route any longer:

host,-interface,,,,,,153.6.24.0,153.6.24.56

Remove a static route

Second Option: Command line using chdev command.

Step 1: Verify the route we want to remove in the netstat -rn output.


Remove a static route
Step 2: Verify which route is the offending route in the lsattr -El inet0 output.

Remove a static route

Step 3: Run the following command:

chdev -l inet0 -a delroute=”net,-interface,,,,,,153.6.24.0,153.6.24.56”

Step 4: Verify that the route is gone in the ODM.

Remove a static route

That is it!