Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Tuesday 11 December 2012

PowerVM Definitions:


PowerVM Definitions:


CoD - Capacity on Demand. The ability to add compute capacity in the form of CPU or memory to a running system by simply activating it. The resources must be pre-staged in the system prior to use and are (typically) turned on with an activation key. There are several different pricing models for CoD.



DLPAR - Dynamic Logical Partition. This was used originally as a further clarification on the concept of an LPAR as one that can have resources dynamically added or removed. The most popular usage is as a verb; ie: to DLPAR (add) resources to a partition.



HEA - Host Ethernet Adapter. The physical port of the IVE interface on some of the Power 6 systems. A HEA port can be added to a port group and shared amongst LPARs or placed in promiscuous mode and used by a single LPAR (typically a VIOS LPAR).



HMC - Hardware Management Console. An "appliance" server that is used to manage Power 4, 5, and 6 hardware. The primary purpose is to enable / control the virtualization technologies as well as provide call-home functionality, remote console access, and gather operational data.

IVE - Integrated Virtual Ethernet. The capability to provide virtualized Ethernet services to LPARs without the need of VIOS. This functionality was introduced on several Power 6 systems.


IVM - Integrated Virtualization Manager. This is a management interface that installs on top of the VIOS software that provides much of the HMC functionality. It can be used instead of a HMC for some systems. It is the only option for virtualization management on the blades as they cannot have HMC connectivity.


LHEA - Logical Host Ethernet Adapter. The virtual interface of a IVE in a client LPAR. These communicate via a HEA to the outside / physical world.
LPAR - Logical Partition. This is a collection of system resources that can host an operating system. To the operating system this collection of resources appears to be a complete physical system. Some or all the resources on a LPAR may be shared with other LPARs in the physical system.


Lx86 - Additional software that allows x86 Linux binaries to run on Power Linux without recompilation.

MES - Miscellaneous Equipment Specification. This is a change order to a system, typically in the form of an upgrade. A RPO MES is for Record Purposes Only. Both specify to IBM changes that are made to a system.


MSPP - Multiple Shared Processor Pools. This is a Power 6 capability that allows for more than one SPP.



SEA - Shared Ethernet Adapter. This is a VIOS mapping of a physical to a virtual Ethernet adapter. A SEA is used to extend the physical network (from a physical Ethernet switch) into the virtual environment where multiple LPARs can access that network.



SPP - Shared Processor Pool. This is an organizational grouping of CPU resources that allows caps and guaranteed allocations to be set for an entire group of LPARs. Power 5 systems have a single SPP, Power 6 systems can have multiple.



VIOC - Virtual I/O Client. Any LPAR that utilizes VIOS for resources such as disk and network.

VIOS - Virtual I/O Server. The LPAR that owns physical resources and maps them to virtual adapters so VIOC can share those resources.

VIOS Useful Commands :


VIOS Commands :

Accept all VIOS license agreements
license -accept

(Re)Start the (initial) configuration assistant
cfgassist

Shutdown the server
shutdown
›››    Optionally include -restart

List the version of the VIOS system software 
ioslevel

List the boot devices for this lpar 
bootlist -mode normal -ls

List LPAR name and ID
lslparinfo

Display firmware level of all devices on this VIOS LPAR
lsfware -all

Display the MOTD
motd

Change the MOTD to an appropriate message 
motd "*****    Unauthorized access is prohibited!    *****"

List all (AIX) packages installed on the system 
lssw
------ Equivalent to lslpp -L in AIX
Display a timestamped list of all commands run on the system 

lsgcl

   display the current date and time of the VIOS 

chdate
Change the current time and date to 3:03 PM AUGUST 4, 2012

chdate -hour 1 \
       -minute 2 \
       -month 3 \
       -day 4 \
       -year 2009

Change just the timezone to AST 
chdate -timezone AST (Visible on next login)
›››   The date command is availible and works the same as in Unix.
Brief dump of the system error log

errlog
Detailed dump of the system error log

errlog -ls | more
Remove error log events older than 30 days

errlog -rm 30
›››   The errlog command allows you to view errors by sequence, but does not give the sequence in the default format.
• errbr works on VIOS provided that the errpt command is in padmin's PATH.

VIOS Network Related Commands :


Vios Network Commands :

Enable jumbo frames on the ent0 device 
chdev -dev ent0 -attr jumbo_frames=yes

View settings on ent0 device 
lsdev -dev ent0 -attr

List TCP and UDP sockets listening and in use 
lstcpip -sockets -family inet

List all (virtual and physical) ethernet adapters in the VIOS 
lstcpip -adapters
Equivalent of no -L command

optimizenet -list
Set up initial TCP/IP config (en10 is the interface for the SEA ent10)

mktcpip -hostname vios1 \
        -inetaddr 10.143.181.207 \
        -interface en10 \
        -start -netmask 255.255.252.0 \
        -gateway 10.143.180.1

Find the default gateway and routing info on the VIOS 
netstat -routinfo

List open (TCP) ports on the VIOS IP stack 
lstcpip -sockets | grep LISTEN

Show interface traffic statistics on 2 second intervals 
netstat -state 2

Show verbose statistics for all interfaces 
netstat -cdlistats

Show the default gateway and route table 
netstat -routtable

Change the default route on en0 (fix a typo from mktcpip) 
chtcpip -interface en0 \
        -gateway \
        -add 192.168.1.1 \
        -remove 168.192.1.1

Change the IP address on en0 to 192.168.1.2 
chtcpip -interface en0 \
        -inetaddr 192.168.1.2 \
        -netmask 255.255.255.0

VIOS User Mangement :


VIOS User Related Questions :

•padmin is the only user for most configurations. It is possible to configure additional users, such as operational users for monitoring purposes.
 
List attributes of the padmin user 
lsuser padmin

List all users on the system 
lsuser
›››   The optional parameter "ALL" is implied with no parameter.
Change the password for the current user 
passwd

VIOS Unix SubSystems:


Vios Unix Subsyatems :

 -The current VIOS runs on an AIX subsystem. (VIOS functionality is available for Linux. This document only deals with the AIX based versions.)

• The padmin account logs in with a restricted shell. A root shell can be obtained by the oem_setup_env command.

• The root shell is designed for installation of OEM applications and drivers only. It may be required for a small subset of commands. (The purpose of this document is to provide a listing of most frequent tasks and the proper VIOS commands so that access to a root shell is not required.)

• The restricted shell has access to common Unix utilities such as awk, grep, sed, and vi. The syntax and usage of these commands has not been changed in VIOS. (Use "ls /usr/ios/utils" to get a listing of available Unix commands.)

• Redirection to a file is not allowed using the standard ">" character, but can be accomplished with the "tee" command.

Redirect the output of ls to a file
ls | tee ls.out

Determine the underlying (AIX) OS version (for driver install)
oem_platform_level

Exit the restricted shell to a root shell
oem_setup_env

Mirror the rootvg in VIOS to hdisk1
extendvg rootvg hdisk1 
mirrorios hdisk1
›››    The VIOS will reboot when finished

Virtual Disk Assisngment :


Virtual Disk Assignment through Vios Server to Clinet Logical Partitions :

• Disks are presented to VIOC by creating a mapping between a physical disk or storage pool volume and the vhost adapter that is associated with the VIOC.
• Best practices configuration suggests that the connecting VIOS vhost adapter and the VIOC vscsi adapter should use the same slot number. This makes the typically complex array of virtual SCSI connections in the system much easier to comprehend.
• The mkvdev command is used to create a mapping between a physical disk and the vhost adapter.

Create a mapping of hdisk3 to the virtual host adapter vhost2.
mkvdev -vdev hdisk3 -vadapter vhost2 -dev vhd3

›››   It is called vhd3 for "WholeDisk_Client3_HDisk3". The intent of this naming convention is to relay the type of disk, where from, and who to.

Delete the virtual target device vhd3
rmvdev -vtd vhd3

Delete the above mapping by specifying the backing device hdisk3
rmvdev -vdev hdisk3

Storage Pool Concept in Vios :


Storage Pool Concept :

• Storage pools work much like AIX VGs (Volume Groups) in that they reside on one or more PVs (Physical Volumes). One key difference is the concept of a default storage pool. The default storage pool is the target of storage pool commands where the storage pool is not explicitly specified.
• The default storage pool is rootvg. If storage pools are used in a configuration then the default storage pool should be changed to something other than rootvg.

List the default storage pool
lssp -default

List all storage pools 
lssp

List all disks in the rootvg storage pool 
lssp -detail -sp rootvg

Create a storage pool called client_boot on hdisk22
mksp client_boot hdisk22

Make the client_boot storage pool the default storage pool 
chsp -default client_boot

Add hdisk23 to the client_boot storage pool 
chsp -add -sp client_boot hdisk23

List all the physical disks in the client_boot storage pool 
lssp -detail -sp client_boot

List all the physical disks in the default storage pool 
lssp -detail

List all the backing devices (LVs) in the default storage pool 
lssp -bd

›››   Note: This command does NOT show virtual media repositories. Use the lssp command (with no options) to list free space in all storage pools.

Create a client disk on adapter vhost1 from client_boot storage pool
mkbdsp -sp client_boot 20G \
       -bd lv_c1_boot \
       -vadapter vhost1

Remove the mapping for the device just created, but save the backing device
rmbdsp -vtd vtscsi0 -savebd

Assign the lv_c1_boot backing device to another vhost adapter
mkbdsp -bd lv_c1_boot -vadapter vhost2

Completely remove the virtual target device ld_c1_boot
rmbdsp -vtd ld_c1_boot

Remove last disk from the sp to delete the sp
chsp -rm -sp client_boot hdisk22

Create a client disk on adapter vhost2 from rootvg storage pool
mkbdsp -sp rootvg 1g \
       -bd murugan_hd1 \
       -vadapter vhost2 \
       -tn lv_murugan_1
›››   The LV name and the backing device (mapping) name is specified in this command. This is different than the previous mkbdsp example. The -tn option does not seem to be compatible with all versions of the command and might be ignored in earlier versions of the command. (This command was run on VIOS 2.1) Also note the use of a consistent naming convention for LV and mapping - this makes understanding LV usage a bit easier. Finally note that rootvg was used in this example because of limitations of available disk in the rather small example system it was run on - Putting client disk on rootvg does not represent an ideal configuration

Vios The Lsmap Command :



The Lsmap Command : 

Used to list mappings between virtual adapters and physical resources.
List all (virtual) disks attached to the vhost0 adapter 
lsmap -vadapter vhost0

List only the virtual target devices attached to the vhost0 adapter 
lsmap -vadapter vhost0 -field vtd

This line can be used as a list in a for loop 
lsmap -vadapter vhost0 -field vtd -fmt :|sed -e "s/:/ /g"

List all shared ethernet adapters on the system 
lsmap -all -net -field sea

List all (virtual) disks and their backing devices 
lsmap -all -type disk -field vtd backing

List all SEAs and their backing devices 
lsmap -all -net -field sea backing

What is Vios?


What is Vios? 


 The virtual i/o server is an appliance that provides virtual storage and shared ethernet adapter capability to client logical partitions.it allow a physical adapter with attached disks on the virtual i/o sever partition to be shared by one or more partitions,enbling clients to consolidate and potentially minimize the number of physical adapters required.


VIOS is a special purpose partition that can serve I/O resources to other partitions. The type of LPAR is set at creation. The VIOS LPAR type allows for the creation of virtual server adapters, where a regular AIX/Linux LPAR does not.
• VIOS works by owning a physical resource and mapping that physical resource to virtual resources. Client LPARs can connect to the physical resource via these mappings.
• VIOS is not a hypervisor, nor is it required for sub-CPU virtualization. VIOS can be used to manage other partitions in some situations when a HMC is not used. This is called IVM (Integrated Virtualization Manager).


Depending on configurations, VIOS may or may not be a single point of failure. When client partitions access I/O via a single path that is delivered via in a single VIOS, then that VIOS represents a potential single point of failure for that client partition.

• VIOS is typically configured in pairs along with various multipathing / failover methods in the client for virtual resources to prevent the VIOS from becoming a single point of failure.
• Active memory sharing and partition mobility require a VIOS partition. The VIOS partition acts as the controlling device for backing store for active memory sharing. All I/O to a partition capable of partition mobility must be handled by VIOS as well as the process of shipping memory between physical systems.

ROOT(/) Full In Aix:

ROOT(/) Full In Aix:
# df –g’ ‘df –k’, find out the highly utilized filesystem.
If root (/) is full
1)    Check the /etc/security/failedlogin file.
    Use the following command to read the contents of the file.
        who /etc/security/failedlogin
The condition of tty's respawning too rapidly will create failed login entries.
To clear the file after reading or saving the output, execute the following command:
      # cp /dev/null /etc/security/failedlogin
  
2)  Check the /dev directory.
    If a device name is typed incorrectly, as in rmto instead of rmt0, a file will be
created in /dev called  rmto. The command will normally proceed until the entire
 root file system is filled before failing. /dev is part of the / file system. Look for
entries that are not devices (that do not have a major or minor number).
    Execute the following:
   #cd /dev
     #  ls -l |pg
    Whereas a file size on an ordinary file would normally be seen, a device
file will have two numbers separated by a comma.
    Example:
       crw-rw-rw-   1 root     system    12,0 Oct 4 10:19 rmt0
    If the output looks like the following, the file should be removed.
       crw-rw-rw-   1 root     system   9375473 Oct 4 10:19 rmto
NOTE: The /dev directory has some valid file names. Look for a file that has a
large size (larger than 500    bytes).
NOTE: If system auditing is running, the /audit directory (default) may
rapidly fill up and require attention.
    Check for very large files.
Large files can be located with the find command. For example, to find all
files in the root (/) directory  larger than 1 MB, enter the following command:
       find / -xdev -size  +2048 -ls |sort -r  +6
This will find all files greater than 1 MB and sort them in reverse order with
the largest files first.
NOTE: When checking the root directory, entries from the /dev directory that have
major and minor numbers instead of file sizes will be interspersed with real files
and can be ignored.
Other useful find command flags may be helpful, such as the -newer flag.
Review the product  documentation to learn more about such flags.
NOTE: Before removing any files, the user should check to see if the file is currently in use by an active user process. Execute the following command:
    fuser
is the file name that is being checked by the active user process. If a
 file is open at the time of removal,it is only removed from the directory listing.
 The blocks allocated to that file are not freed until the process holding
 the file open is killed.
You can also remove smit.log and smit.script in the / directory.


4)  If require increse the file system size.

Ex : #chfs -a size=+1G /

/VAR Full In Aix:

/VAR Full In Aix:

#‘df –g’ ‘df –k’, find out the highly utilized filesystem.
1. Check for the sizes and accordingly cleanup following files:
 #   find /var -xdev -size +2048 -ls| sort -r +6
    /var :
     /var/spool/mail/*
     /var/adm/cron/log
     /var/tmp/*
     /var/adm/messages
    /var/adm/syslog
     /var/adm/wtmp
     /var/preserve/*
     /var/spool/mqueue/* .
2.  any old files we will gip.
    Ex: #gzip file_name
3.    If reqires increse the file system size .
Ex:   #chfs -a size=+1G /var
4.   Check whether the trcfile file in this directory is large. If it is large and a trace is not currently being
run, you can remove the file using the following command:
#rm /var/adm/ras/trcfile
 #rm  /var/adam/ras/vmcore10
5.Check the /var/spool directory, which contains the queueing subsystem files. Clear the queueing
subsystem using the following commands:
#stopsrc -s qdaemon
#rm /var/spool/lpd/qdir/*
#rm /var/spool/lpd/stat/*
#rm /var/spool/qdaemon/*
#startsrc -s qdaemon

/TMP Full In Aix:

/TMP Full In Aix:
1.  #‘df –g’ ‘df –k’, find out the highly utilized filesystem.
2. Check for the sizes and accordingly cleanup following files:
/tmp – application files; software dumps; logs
3.  #du -max /tmp | sort -nr | head -10
Ex:
196.18  /tmp
64.75   /tmp/Mystic_db2look_dw02.ddl
39.26   /tmp/db2diag.log
26.38   /tmp/e-admin.cache
4. find which file and which directory using more space
    To list the files which are over 6 months old:
/usr/bin/find /tmp -type f \( -name "*.gz" -o -name "*.Z" \) -mtime +186 -exec ls -l {} ';' -exec rm -f {} ';'
Ex:
-rwxr-x---    1 patrol   system       964172 Apr  9 2009  /tmp/2/emcgrab/tools/bin/inq.aix32_51.Z
-rwxr-x---    1 patrol   system       611359 Jan 17 2006  /tmp/2/emcgrab/tools/bin/inq.aix43.Z
-rwxr-x---    1 patrol   system       642331 Jan 17 2006  /tmp/2/emcgrab/tools/bin/inq.aix64_43.Z
5.remove snap file
Ex: # snap -r
it will remove the file from /tmp/ibmsupt
6.If reqires increse the file systemsize
Ex: chfs -a size=+1G /tmp

/USR Full In Aix:

/USR Full In Aix:
# df –g’ ‘df –k’, find out the highly utilized filesystem.
1. move failedlogins into utmp file
Ex: mv /etc/security/failedlogin /etc/utmp
2. find which file and which directory using more space
. To list the files which are over 6 months old:
/usr/bin/find /var -type f \( -name "*.gz" -o -name "*.Z" \) -mtime +186 -exec ls -l {} ';' -exec rm -f {} ';'
Ex:
-rw-r--r--    1 root     system        63079 Jun 27 2007  /var/adm/ras/install_all_updates.log.Z
-rw-r-----    1 root     system     14764428 Dec  1 2009  /var/log/ARCH/failedlogin.0.gz
-rw-r-----    1 root     system        45452 Sep 30 2010  /var/log/ARCH/failedlogin.10.Z
-rw-r-----    1 root     system        32859 Aug 31 2010  /var/log/ARCH/failedlogin.11.Z
3.check the recent application filesets.
#lslpp -h
Ex:
 bos.txt.tfs.data
                  5.3.0.0   APPLY      COMPLETE     12/27/07     14:15:38
  devices.common.IBM.modemcfg.data
                  5.3.0.0   COMMIT       COMPLETE     12/27/07     14:13:44
 bos.txt.spell.data
                  5.3.0.0   COMMIT       COMPLETE     12/27/07     14:15:38
Note:  change apply to commit by using installp -c file setname
           installp -c bos.txt.tfs.data
                     (or)
         installp -Cgx all (it will commit all the file sets)
4. If require increse the file system size.

Ex : #chfs -a size=+1G /usr