Friday 27 May 2011

AIX Data Storage- Part 2



Objectives for the module





1. Under the Logical Volume Manager and related Concepts like
–Volume Groups
–Physical Volume
–Logical Volume
–Physical Partitions
–Logical Partitions


2. Understand File systems and Logical Volumes



Wednesday 25 May 2011

AIX Data Storage- Part 1

Objectives for the module
Understand the data storage options available in AIX.



Components of AIX Storage
•Files
•Directories
•File systems
•Logical storage
•Physical storage
•Logical Volume Manager (LVM)



The above mentioned 6 options makes up the AIX storage.





Traditional UNIX Storage





Problems in a traditional UNIX system, in terms of data storage facilities are:


a.There are fixed partitions. While creating a partitions itself the administrators had to select the correct size for each partition. Changing the size of the partition and thus the file system sitting on a partition was not a very easy task in traditional UNIX storage systems.


b.Partitions had to consist of contiguous disk space. That means the size of the partition gets limited to the size of the hard disk. A partition cannot stretch itself to the other hard disk and make utilization of the free space available on other hard disk.


c.Time and effort was required in the planning stages.

Tuesday 24 May 2011

Two ways to request the ASCII character version of SMIT


Let the question be:
Specify two ways you can request the ASCII character version of SMIT from an X-windows environment command prompt:
Answer is:
#smitty
#smit -C

Devices In AIX


Objectives for the module
•Understand Pre-Defined and Customized Devices Databases
•Describe the states of a device
•Logical and physical devices
•Understand device location codes
•How to add/change/delete devices



Understanding Devices



Logical devices: These are also called special files. The users and applications use the logical devices which are the links to the physical devices.


Physical devices: Actual device connected to the system.


Device Drivers: Device drivers are software that resides in the kernel that controls the activities and the data that is sent to the devices.


/dev directory: The directory which contains all of the logical devices that can be directly accessed by the user.


Ports: The physical connectors/adapters in the system which allow
attachment of many different devices are called ports. Ports
are not only a connection point but they are also programmable by the system software.


/dev directory contents



You can get the above output when you execute the command
# ls–l /dev




In the output above, you can see that there are basically two types of devices,
a.Block devices (b)
Block devices use buffering to provide a block by block access to the device and its data.
b. Character devices (c )
Character devices are also called raw devices and are stream-oriented i.e. sequential access which provides no buffering.


Usually in the fifth field where we see the size of the file, for a logical device we see a pair of values (for eg19,2). The first value is called the major number and the second value is called the minor number. Major number usually specifies the type of the device that we are working with and the appropriate device driver in the kernel that has to be used to work with the device and the minor number refers to the behavior of the device i.e. particular device of that particular major type.




Predefined and Customized Devices





The predefined and Customized devices are the two databases that are maintained by the AIX system in the Object Data Manager (ODM)


The predefined devices database has information about all the supported devices on your AIX system. The customized devices database has information about all configured devices on your system.


The two states in which the devices could be in the customized devices databases are,Defined and Available.


If you want to use a particular device, it has to be in the available state.




Listing All predefined and Customized Devices


The list of commands to list the predefined and customized devices are here..


•lsdev –P –H-> displays all predefined devices (supported devices)
•lsdev –Pc disk-> displays all predefined devices of class type “disk”
•lsdev –C –H-> displays all customized devices (configured devices)
•lsattr –EH –l sys0-> display all effective attributes of the logical device sys0




Devices are classified by class, type and subclass where the “Class” indicates what the device does, “Type” indicates what model it is, and “subclass” indicates how it can be attached to the system.


The command lsdev can be used to list the devices.


There are various options available with this command, like:
a. –P -> show the devices from the predefined devices database. (show the supported devices)
b. -H -> Show a heading along with the output
c. -C -> Show the devices from the customized devices database (show the configured devices)
d. -c -> class of the device like disk, tape.


lsattr command can be used to list the attributes for a particular device. This command comes with lots of options like :-
-E -> show only the Effective attributes.
-l -> To specify the logical device name.



Device States



The states of the devices are as follows:
Undefined: The device is a supported device on the AIX system. Its present in the predefined devices database.


Defined: The device is present in the customized/configured devices database and the logical device files have been created but at present is un-available for use.


Available: The device information resides in the customized devices database and the device if fully configured and is ready for use.


When the device is for the first time configured by the cfgmgr command, its put into the available state. When you run the command rmdev–l over a available device it slips into Defined stage. When you run the command rmdev–dl over a defined or an available device, it slips into undefined state. Though there is no recognizable state called “Undefined”, it means that the device is just a supported device on your system and is still not configured to work.




How cfgmgr works





Cfgmgr(Configuration Manager) command configures all self-configuring devices. While configuring the devices, cfgmgr checks whether the device is a supported device on your AIX system by checking the Predefined database ie PdDv. Once it knows that the information of the device is found in the pre-defined devices database, it uses the information to complete entries into the customized devices database is CuDv. It also loads the appropriate device driver into the AIX kernel and makes the logical device entries under the /dev directory.


Most of the devices are self-configurable except for devices which are connected via parallel or serial ports like printers, ASCII terminals, modems etc.




Working with Devices



You can use the fastpath #smit devices to manage the configuration information about the devices.


Here you have all the options to configure the devices like Terminals, printers and plotters, console, hard disks, CDROMs etc.




Device Addressing



•The location code for a device is information about where exactly is that devices connection in your machine.


•It’s a path from the adapter, through the bus and to the device


•Location code is made up of 4 fields of information



As a system administrator some times it becomes necessary to have a good understanding of where exactly is a particular device connected to the system. This may be necessary during some troubleshooting scenarios.


The location code would be referred to on the LED whenever there is a hardware failure, making it easy for the administrator to figure out which device has actually failed.


The location code as mentioned above consists of up to 4 fields of information. Certain devices when listed could only show two pairs, that means this device is just an adapter. If a device’s location code is made up of four pairs of values then it’s a physical device attached to an adapter.




Location code for a non scsi device 
AB-CD-EF-GH



AB –00 -> devices attached to the processor
      01 -> devices attached to the ISA bus
      04 -> devices attached to the PCI bus
CD –01-99 -> pluggable cards
A-Z,0 -> integrated adapter cards
EF --> Connector ID
GH -> Port identifier, FRU for the device




ISA –Industry Standard Architecture. These are the bus types. These bus types are used in the RS/6000 to connect devices like the diskette and the keyboard.


PCI –Peripheral Component Interconnect. These are the industry standard buses which are used by RS/6000 to connect other devices.


Integrated adapter cards have electronics for that particular card/adapter built it and integrated in the system planar thus making it impossible to shift to a much better card if need arises. Whereas the advantage of a plug in card is that they are easily removable if there is a newer card available with newer features because the electronics of that card is inbuilt in the card itself.


Example: Non-scsi location code:



The picture is an example of a location code for a non-scsi device. The AIX System has a 128 port Async adapter card with 2 ports on it. To those ports are connected RANs(Remote Async Nodes) which looks like a hub with 16 ports on it. The ASCII terminals are connected to these ports of the RAN.


In the example we have an ASCII terminal connected to one of the ports of the RAN ie port number 11 on the 1stRAN connected to the second port of the 128 port Async adapter card. The adapter is a plug in adapter card connected to a PCI bus (04) and in the slot 5 (05). So the entire location code for the device would be
04 -05-21-11


i.e. on the PCI bus(04) , in the slot number 5 (05), on the port number 2 (2) and RAN number 1 (1) and port number 11 (11) the ASCII terminal is connected.





Location Code Format for SCSI Devices 
AB-CD-EF-G,H

AB-CD - Identifies the bus and the adapter location Same as with non-SCSI devices
EF      - For a single SCSI bus - 00
           For a dual SCSI bus:
                    Internal bus - 00
                    External bus - 01
G,H      G= SCSI address (SCSI ID) of the device
           H= Logical unit number of the device


Example: scsi Location code




The above picture is an example of location code for a scsi device. There is a scsi adapter card plugged into your system on the PCI bus slot number 01. The scsi adapter itself has the scsi id 7 assigned to it. To this scsi adapter, there is an external scsi tape drive attached. The external scsi tape drive is assigned 5 as the scsi id (either by using a jumper setting or by using a dip switch). So the location code for the external tape drive would be 04-01-00-5,0. That is on the scsi adapter whose address is 04-01, there is a scsi device attached to the single scsi bus (00) whose scsi id is 5 and no Logical Unit Number (LUN) (0).


Example 2: Location Code Example for SCSI Device


SCSI Devices (Disk, Tape, CD-ROM)





Listing Device Physical Locations


CuDv Customized Devices
# lsdev -C -H -F "name status physloc location description"


How to add a ASCII terminal


Most of the devices are self-configurable device which can be directly configured by the cfgmgr. Devices which get attached to the parallel port or the serial port like the printer, ASCII terminals, modems etc are not self configurable devices, so they have to configured separately.

The picture above shows an example of how to configure/add a ASCII terminal to your AIX system.

You can use the fastpath# smit tty to add /configure a ASCII terminal on your system.
Choose the option Add a tty
-> you may have to select the terminal type is rs232 or rs422. rs232 is the most common tty type
-> now you may have to select the parent adapter name ie where exactly is the terminal attached ie serial port 1 (sa0) or serial port 2 (sa1) etc.

Adding a terminal

In this final dialog panel to add a terminal, the only mandatory field for you to enter is the port number. Enter the port number and you can add the ASCII terminal on your system.

Friday 20 May 2011

How to use alias in the Korn shell?

You can use alias in korn shell by 2 steps:




Step 1: Add in $HOME/.kshrc : alias  l='ls -l'   
Step 2: Add in $HOME/.profile: export ENV=$HOME/.kshrc

How to change the prompt in AIX

Here is the method

Add in $HOME/.profile : export PS1=`hostname`:'$PWD#  '


Note: don't forget the ' before the $ 

Thursday 19 May 2011

AIX System Start-up and Shut-down

AIX Boot Process


Objectives for this module
•Describe how AIX system boots up
•Understand /etc/inittab file
•Work with System Environment
•How to shut down the system

AIX Documentation

Today let us have a look at the AIX documentation.
Before proceeding further into depth, let us see a small figure of understanding of AIX documentation.
Here it goes:

AIX softcopy documentation is loaded on a documentation server. Any other computer on the network with a web-browser software can access the documentation from the server, these machines are called Documentation Clients.

To configure the Documentation Server, the following has to be installed and configured:

a.AIX softcopy documentation

b.Eclipse Web Server

c.Web Browser Software

The Documentation Client needs to just have a web browser software like Internet explorer.



Configuration of online AIX documentation

•Install the Web Server Software and start the Web Server Software

•Install the Web Browser Software

•Install the AIX documentation

•Install the Information Center run time environment

–AIX 5L V5.3 Documentation CD

–Includes internal eclipse Web server

–infocenter.aix.rte

•Configure Documentation Services

#smit change_documentation_services


**NOTE: - [Steps to configure the AIX Online Documentation on the Documentation server are as follows:-

•Install the mozilla web brower from expansion Pack CD.

#smit change_documentation_services ]

DOCUMENTATION SERVICES 
Use the fast path smit change_documentation_services to configure the documentation server. If installation is correct then these values will come automatically as shown in the slide. Eclipse Web server listen the requests on port 64111. So you have to check the port number. It should be 64111.

IBM pSeries Information Center


Once the AIX Documentation is configured on your machine, you can access it

Using the web browser. In the web browser’s address bar you can type in

http://hostname:64111/help/index.jsp

Instead of hostname you can also use the ip address.

Information Center Documents

NOTE:-Once you type the proper address in address bar you will get the home page of documentation. On the home page you will get links for PDFs that contains the AIX commands. You can download these PDFs to your machine and save them for future use.



Information Center Search


Here you can see the search box where you can type command name and then click on go button. It will show all the pages links in the left pane that contains the word you typed in search box.

Incoming Search Terms:
How to document in AIX
AIX documentations
AIX documentation services
documentation service
configuration of online documentation
Reference for AIX documentation

Wednesday 18 May 2011

Software Maintenance



 This is the command used to maintain the software installed in an AIX machine.

#smit maintain_software

The screen looks like:-


Software Maintenance and Utilities
Move cursor to desired item and press Enter.
Commit Applied Software Updates (Remove Saved Files)
Reject Applied Software Updates (Use Previous Version)
Remove Installed Software
Rename Software Images in Repository
Clean Up Software Images in Repository
Copy Software to Hard Disk for Future Installation
Copy Software Bundle to Hard Disk for Future Installation
Check Software File Sizes After Installation
Verify Software Installation and Requisites
Clean Up After Failed or Interrupted Installation
Service Update Management Assistant (SUMA)
  F1=Help      F2=Refresh       F3=Cancel       F8=Image
  F9=Shell      F10=Exit           Enter=Do





AIX FIX REPOSITORY


FIX REPOSITORY:-

When working with modification or fixes, it is common to download the fixes to a directory on your hard disk before installation. This location is commonly referred to as the fix repository.
While /usr/sys/inst.images is a standard location for storing software images and will appear in the smit input device/directory (F4) list, you may use any directory for this purpose.


AIX Fix Central Web site:
www.ibm.com/servers/eserver/support/pseries/aixfixes.html.
Maintenance packages

Maintenance packages are released every four to six months.

Use the  oslevel –r  to determine your current level.

Specific fixes
These are generally available fixes that resolve specific problems.

Emergency Fixes
When resolution to a problem is urgent and it cannot wait for a generally available fix. IBM may provide a way around the problem in the form of an emergency fix.

Critical Fixes
IBM periodically publishes information about generally available fixes that may apply to your system.

Commands used to manage fixes:-

The command instfix allows you to install a fix or a set of fixes 
The same command can also be used to determine if a fix is installed on your system or not.


•Installs a fix: 
 # instfix -k IY58143 -d /dev/cd0 

•Searches for a fix: 
 # instfix -ik IY58143 
All filesets for IY58143 were found. 

•Searches for a fix by keyword: 
 # instfix -s SCSI -d /dev/cd0 

•List which AIX BOS maintenance levels are partly or full installed: 
 # instfix -i | grep ML 
 All filesets for 5.3.0.0_AIX_ML were found. 
All filesets for 5300-01_AIX_ML were found. 

•List which filesets are missing in a partly installed AIX BOS maintenance level: 
 # instfix -ciqk 5300-01_AIX_ML | grep :-:


Some useful options with this command are:-
-s – search for and show entries containing this particular string
-k – install filesets for a keyword
-T – just display table of contents
-I – Give information only
-d – to specify the input device.

Fix central Web-site:-

Incoming Search Terms:
AIX Fix
Emergency Fix for AIX
AIX emergency fix
Managing fix in AIX
IBM site for AIX fix
Certical fix for AIX
Fix repository AIX fix
AIX fix install

Installing Optional Softwares on AIX Machine


How will you install optional software on a AIX machine?

Firstly, what is optional software?
Optional softwares are those which are not pre-installed when you install an AIX machine.


Secondly, how will you identify the software product?
The OS software could be identified with the following format as:- 


versionnumber.releasenumber.modificationlevel.fixlevel


Versionnumber- it may be 1 to 2 digits.
Releasenumber- It may be 1 to 2 digits.
Modificationlevel- It can be from 1 to 4 digits.
Fixlevel- It can be from 1 to 4 digits.


How to remember this? vrmf


Eg:- 05.02.0000.0000
Eg2:- 5.3.0083.2233

This is useful when we need to find the level of the AIX OS using the #oslevel command


Now let us see some of the key words required to go further:-

1. Fileset- It is the smallest installable unit for the AIX OS, example of a completely installable unit is bos.net.uucp & example of a separately installable part of a product like bos.net.nfs.client

2. Packages- It is a group of separately installable filesets, which provides a set of related functions. Eg:- bos.net

3. Licensed Program Products (LPP) - They are a complete software product including all packages associated with that licensed program. Eg: - BOS

4. Bundles - They are a list of sofwares which contains filesets, packages, LPPs, which are used for a specified use. Bundles are the actual software. 

Example:- Server bundle, network bundle, graphics bundle

5. PTFs- It stands for Program Temporary Fix. It is a temporary solution to the problem. The problem is a result of a defect in a current unaltered release of the program. This problem is diagnosed by IBM.

6. APAR - It stands for Authorized Program Analysis Report. This is just a report of the problem caused due to the defect in a current unaltered release of the program. It is an emergency fix.

Now let's see how the software hierarchy in AIX looks like:-

The Naming Conventions used for the fileset are:-

SOFTWARE STATES

As you can see from the above pic... There are 2 states when you are installing any software.
Applied state and Committed state.

Let’s say you already have an older version of software available on your system. Now you want to install a newer version of the software. In this example, you can install this software in applied mode. If you install software in applied mode, it maintains the older version in un-available state (not removed) and the newer version will be in Applied mode and made available to you. That means both the old and the new version are there on your system. If you are convinced with the newer version you can commit the newer version. Once the newer version is committed, the older version which was maintained will be removed and if the newer version is rejected, then the older version is made available again and the newer version gets removed i.e. rejected.

Coming to the final part of the article, let us get into the business of installing software.

The command used to install software is:-
 #smit install



Now immediately the System Installation window pops up.


If you choose the first option i.e. Install and Update Software, you will again see submenus:





Now we can see that the software is installed using SMIT in this way.

We can list the installed softwares using the command
#smit list_installed
            Or
#lslpp -l bos.rte.*



>>Hope you enjoyed the knowledge in this post :)
Have a nice day :)

Incoming Search Terms:
Installing AIX optional softwares
AIX installation of softwares
Software installation in AIX
software states in AIX
AIX softwares
AIX optional software
format of AIX software