Wednesday, May 6, 2009

Fixing a full root file system


Step 1:

Read the contents of the /etc/security/failedlogin and if needed, backup the content of this file. Then remove the entries by using the following command.

#cp /dev/null /etc/security/failedlogin

Step 2:

Check the /dev directory. If there is any duplicate entry i.e. invalid device names (for ex. rmto instead of rmt0), remove it.

Step 3:

Check for very large files that might be removed. This can be done by using find command.

Before removing the large files, check whether the file is currently being used by the user. This can be done by the fuser filename command.

Network Installation Manager


Network Installation Manager is a kind of client/server application which follows object oriented approach.

It is used to install aix filesets over the network. Also It is used to manage those installed filesets on this machines in the network.

A basic NIM environment consists of several p series machines, minimum of two
Which will be connected through the TCP/IP network. A physical network can be shared by more than one NIM environment. So that one physical machine may be exists in more than one NIM environment.

Benefits and features – NIM

NIM is a free product which will be given in the AIX 5L CD.

NIM allows the aix system administrators to manage the server boxes remotely,

Using NIM, multiple machines can be installed at the same time.

Multiple AIX versions, Maintenance levels and Technology levels can be used in the NIM.

In case of disaster recovery, the local systems can be recovered quickly without the mksysb image and the AIX CD.

NIM supports cloning efficiently.

NIM Configuration

Login as root
Ensure all the filesets has been installed by using the command lslpp.
Configure the NIM server and NIM client by using smitty nim.

Tuesday, May 5, 2009

LVM and User administration commands on aix

LVM commands

1. Adding LUN.

#extendvg vg name pv name

2. creating Volume Group.

#mkvg –y vg name physical volume

3. creating Logical volume.

#mklv –y lv name -t file system volume group number of LP physical volume


4. creating file system.

#crfs –v file system type -g volume group -a size= size in M -m mt point

5. increasing & Decreasing file system.

#chfs -a size= +4194304 MOUNT_POINT

#chfs -a size=-16M MOUNT POINT

6. file integrating checking.

#fsck file

7. mount /umount the file systems.

# mount /dev/fslv02 /test
# umount /test

8. File permission /ownership changes.

#chmod u=permission,g=permission,o=permission file
#chown –R owner:group file

9. Rootvg mirroring

#mirrorvg rootvg new and empty pv

OR

#mklvcopy lvname copy pv


User Administration Commands

1) Create the user

To create the user account with the default values in /usr/lib/security/mkuser.default

#mkuser username

To create the user account as an administrator

#mkuser –a username

2) Remove the user

To remove the user from the local system

#rmuser username

To remove the user with its attributes including user authentication information.,

#rmuser –p username

3) To reset a password

#passwd username

4) To unlock the user Id

#chuser “account_locked=false” userid

5) To set a non expiry password for the user

#chsec –f /etc/security/user –a maxage=0

6) To change the characteristics of the user

#chuser –a attribute=value

Logical partition in AIX

LPAR’s managed by HMC/ IVM/ Virual partition manager

AIX
IBM i
Linux
Virtual IO server

Logical partition

Ability to run a server as if it were two or more independent servers.
When you logically partitioning the server, you need to share the resources such as memory.
You can install software on logical partition and each one will run as an independent server.
Need tool to create logical partition. The tool depends upon the OS in which the server has.

Logical partitioning – Benefits

Consolidating servers
Instead of using several servers which occupies more space, we can use Logical partitions.

Sharing resources
We can easily move the hardware resources from one LPAR to another LPAR.

Maintaining Independent servers
By dedicating a part of resources such as memory, disk, IO etc., each LPAR runs as an Independent server.

Creating a mixed production and testing environment
On the same server, we can use the LPARs as test and production LPARs.

Integrated clustering
Using high availability application software, we can use the partitioned server as an integrated cluster. So that we can prevent the system from the unscheduled failure.

Before creating logical partitions we need to consider the following.

Processor and memory failure results in entire server failure.
IO device failure results in failure of the particular LPAR.
To reduce the possibility of failure, use Advanced System Management Interface (ASMI) to set the server to deconfigure the failing processors.
Administrating LPARs is difficult when compare to administrate the different systems.

Managed system

A managed system is a single physical server with all the connected resources wit h it.
We can use a managed system as a single server or we can create more LPARs on that.

Logical Partition tools

Hardware Management Console
Partition profile
It is a record on HMC which defines the configuration of LPARs.
System profile
It contains ordered list of partition profiles in the HMC to start the logical partitions.
Integrated Virtualization Manager
Virtual IO server

Physical and Virtual hardware resources

Processors
Dedicated – Whole processor will be assigned to a single logical partition.
Shared – Processing capacity is shared among multiple logical partitions.
Virtual - Represent as a physical processor to the OS but uses shared processor.
Memory
IO devices

Mirroring rootvg in aix

Mirroring the root volume group should be done very carefully. Because If we don’t do it properly then the server will not boot properly. Do the following steps which will be useful for mirroring the root volume group.

Step 1:
For mirroring the rootvg, the vg should contain an empty hard disk i.e an empty physical volume. This can be done by the following command
#extendvg rootvg hdisk1

Step 2:
Then use the command: #mirrorvg rootvg hdisk1

Step 3:
If we don’t need to backup all the logical volume, then we can use the following command.
#mklvcopy hdisk1

Step 4:
When we use mklvcopy command, we need to issue the command #syncvg.

Step 5:
Initialize all the boot records by issuing the command #bosboot –a

Step 6:
Initialize the bootlist
#bootlist -m normal hdisk01 hdisk11


AIX logo

























AIX Versions

AIX stands for Advanced Interactive eXecutive. It is an Unix operating system. It will run only on IBM machines and can not be installed in Windows supported system. When comparing to other flavors of unix, AIX is very powerful. This is because of Logical Volume Manager which helps us to manage the hard disks very efficiently. Another important thing is, In aix all the commands are very easy to remember and related to the common terms.

AIX versions and the year of release

AIX 1 – 1986
AIX 2 – 1987
AIX 3 – 1989
AIX 3.1 – 1990
AIX 3.2.5 – 1990
AIX 4.0 – 1993
AIX 4.1 – 1994
AIX 4.1.1 – 1994
AIX 4.1.2 – 1994
AIX 4.1.3 – 1995
AIX 4.1.4 – 1995
AIX 4.1.5 – 1996
AIX 4.2 – 1996
AIX 4.2.5 – 1994
AIX 4.3 – 1997
AIX 4.3.1 – 1998
AIX 4.3.2 – 1998
AIX 4.3.3 – 1999
AIX 5L – 2000
AIX 5L 5.1 – 2001
AIX 5L 5.2 – 2002
AIX 5L 5.3 – 2004
AIX 6 open beta – 2007
AIX 6.1 – 2007
AIX 7 – To be released by 2010