Showing posts with label AIX. Show all posts
Showing posts with label AIX. Show all posts

Monday, November 30, 2009

User and Group Administration - Part 2

GROUP ADMINISTRATION


Few Restrictions on the Group Name:

1. Group names cannot start with the below signs:
  • Dash or minus sign (-).
  • Plus sign (+)
  • At symbol (@)
  • Tilde (~)
2. Groups cannot be named ALL or default, as these names are reserved for the AIX OS.
 
3. Group names cannot include :

  • Colon (:)  
  • Quotation marks—single or double (' or ")
  • Pound or hash sign (#)
  • Comma (,)
  • Equal sign (=)
  • Slashes—back or forward (\ or /)
  • Question mark (?)
  • Back quote or tick (`)
  • White space (space or tab)
  • New-line characters
4.  Group names can have max. 8 characters in AIX V 5.2 or earlier. Starting with AIX 5.3, you can have a
max. of 255 characters.



Now let us look at the configuration files for groups.


/etc/group :

This file contains the basic group configuration details in the following format.

Group Name : Password Flag : GID : User(s)

where
Password Flag - This field is not used in AIX.
GID                 - Group ID is the unique identification number for every group. 0 is the gid for system group.
User(s)             - List of users belonging to the group

/etc/security/group :

This file contains the extended attribtues for the groups.
Here are the parameters used in this file.

adms  - List of users with admin rights to ths group
admin - If set to true, this group will have administrative rights.

There are 4 main commands used in the administration of group :

mkgroup - Add a group
chgroup - Change an attribtue of a group
lsgroup  - List the attribtues of a group
rmgroup - Remove a group

These words can also be used as fastpaths for smitty.

For example, # smitty mkgroup will open a form to create a group.

For doing the whole group administration, you can use

# smitty group and go thru the menu items for various operations.


Now let us see the commands to administrate groups ...

1. To create a group called dba :

# mkgroup dba

2. To create a admin group called admin1 :

# mkgroup -a admin1

3. To create dba group and add jack as the admin :

# mkgroup adms=jack dba

4. To change the members of dba group, you can use any of the below commands :

# chgroup users=jack,tom,michelle dba

# chgrpmem dba

# chgrpmem -m + raja dba

5. To remove the membership of a user from the dba group :

# chgrpmem -m - jack dba

6. To add a user as admin for the dba group :

# chgrpmem -a + raja dba

7. To remove the group administrator :

# chgrpmem -a - raja dba

8. To list the attributes of a group :

# lsgroup dba

9. To remove a group from the system :

# rmgroup test

Tuesday, November 17, 2009

Backup and Restoration

System [rootvg] Backup :

Few Points:
a. rootvg backup can be taken thru mksysb command. Most people refer it as mksysb backup.
b. This type of backup on a tape is bootable. Hence its been widely used to restore the system incase of system crash.
c. Mksysb backup contains 4 images
i. BOS Boot Image - Kernel Device Drivers
ii. mkinsttape image - ./image.data, ./tapeblksz, ./bosinst.data and few other commands
iii. dummy .toc - Nothing but a dummy table of contents file
iv. rootvg data - This is where the actual data resides

Files used by mksysb:

/image.data :
Contains information about the image installed during the BOS installation process. This includes the sizes, names, mount points of LVs and file systems in the rootvg [Actually nothing but the rootvg structure]. It can be created using mkszfile command.

/var/adm/ras/bosinst.data :
It allows you to customize the OS installtion. Modified mostly to use the mksysb image to install new servers.

Few Commands :

To generate just /image.data :
# mkszfile

To create /image.data and generate a system backup on the tape :
# mksysb -i /dev/rmt0

To generate a system backup on the tape but to exclude /home directory and to create /image.data :
# echo /home > /etc/exclude.rootvg
# mksysb -ei /dev/rmt0

To list the contents of a mksysb image :
# lsmksysb -f /backup/system1.mksysb

To restore a specific file from mskysb image :
a. Rewind the tape :
# tctl -f /dev/rmt0 rewind
b. Move the tape forward to the end of 3rd image :
# tctl -f /dev/rmt0.1 fsf 3
c. Restore the specific file:
# restore -xqvf /dev/rmt0.1 /home/user1/file1

Non-rootvg Backup :

Few Points:
a. Volume groups other than rootvg can be backup'ed using savevg command.
b. You can exclude certain files by creating /etc/exclude.vgname.
c. VG data files are kept under,  /tmp/vgdata/vg-name/vg-name.data.

Few Commands :

To backup a datavg to the tape drive :
# savevg -if /dev/rmt0 datavg

To backup a datavg to the tape drive and exclude certain files :
# savevg -ief /dev/rmt0 datavg

To restore the datavg image from the tape onto the disks specified in /tmp/vgdata/datavg/datavg.data file :
# restvg -f /dev/rmt0

To create the data file (/tmp/vgdata/oravg/oravg.data) for oravg :
# mkvgdata oravg

File System Backup :
File systems can be backup'ed using many ways.Few commands used for this are backup, cpio, dsm [TSM Client].

To back up all the files and subdirectories in the /home directory using full path names :
# find /home -print l backup -if /dev/rmt0

To back up all the files and subdirectories in the /home directory using relative path names :
# cd /home
# find . -print l backup -if /dev/rmt0

I have used "l" for the pipe symbol as it was not displaying properly in blog.

To backup a list of files:
# cat bakfile
/home/raja/file1.txt
/home/raja/file2.txt
/home/raja/file3.txt

# backup -iqvf /dev/rmt0

I-node Base Backup:


Here is  the syntax for the backup command in case of inode based backup

Syntax:
# backup [-u] [-level] [-f device] filesystem

u -> Updates the /etc/dumpdates file
-level -> Values available from 0 to 9 where 0 is the full backup and 1-9 for backup the changes since the previous level.

To back up the /home file system by i-node :
# backup -0 -uf /dev/rmt0 /home

i-node based backup has the advantage of making incremental and differential backups. Here we use the numeric flags (0 to 9) to make the difference in the way it back ups. It actually updates the date/time/mode of last backup in /etc/dumpdates when you use the 'u' flag.

Here are the different numeric flags used and their meanings,

0 - Full Backup
1 - Back ups the files created/modified from the date/time of 0th backup
2 - Back ups the files created/modified from the date/time of 1th backup
3 - Back ups the files created/modified from the date/time of 2th backup
4 - Back ups the files created/modified from the date/time of 3th backup
5 - Back ups the files created/modified from the date/time of 4th backup
6 - Back ups the files created/modified from the date/time of 5th backup
7- Back ups the files created/modified from the date/time of 6th backup
8 - Back ups the files created/modified from the date/time of 7th backup
9 - Back ups the files created/modified from the date/time of 8th backup

Few Examples for i-node based backup :


Scenario 1 - Full and Incremental Backup :


If you want to have full backup of /home on sunday night and incremental backup on other nights, then follow the below procedure.

Sunday Night - Full Backup :
# backup -0 -uf /dev/rmt0 /home

Monday Night - Incremental Backup :
# backup -1 -uf /dev/rmt0 /home

Tuesday Night - Incremental Backup
# backup -2 -uf /dev/rmt0 /home

Wednesday Night - Incremental Backup :
# backup -3 -uf /dev/rmt0 /home

Thursday Night - Incremental Backup :
# backup -4 -uf /dev/rmt0 /home

Friday Night - Incremental Backup
# backup -5 -uf /dev/rmt0 /home

Saturday Night - Incremental Backup :
# backup -6 -uf /dev/rmt0 /home

Advantages of Incremental Backup:
a. It takes lesser time to restore the specific data.For example, if you lose a file that was created on thursday morning, then you need only the wednesday night tape to restore the specific file.
b. This method consumes less tapes for backup. Hence its cost effective compared to differential backup.

Disadvantages of Incremental Backup:
a. You need more number of tapes (from sunday-full to last night-incre) to restore the entire file system.

Scenario 2 - Full and Differential Backup :


If you want to have full backup of /home on sunday night and differential backup on other nights, then follow the below procedure.

Sunday Night - Full Backup :
# backup -0 -uf /dev/rmt0 /home

Monday Night - Differential Backup :
# backup -1 -uf /dev/rmt0 /home

Tuesday Night - Differential Backup :
# backup -1 -uf /dev/rmt0 /home

Wednesday Night - Differential Backup :
# backup -1 -uf /dev/rmt0 /home

Thursday Night - Differential Backup :
# backup -1 -uf /dev/rmt0 /home

Friday Night - Differential Backup :
# backup -1 -uf /dev/rmt0 /home

Saturday Night - Differential Backup :
# backup -1 -uf /dev/rmt0 /home

Advantages of Differential Backup:
a. It takes less tapes (from sunday-full and last night-incre) to restore the entire file system.Hence it is easy for the backup operator to restore the data.

Disadvantages of Differential Backup:
a. It consumes more tapes for backup. (since we are going to backup the same old files again and again for the whole week).Hence cost is more in this type of backup.

To list the contents of backup on the tape :
# restore -Tvf /dev/rmt0

To restore individual files from backup created by 'backup -i' command :
# restore -xvf /dev/rmt0 /home/user1/file1

To restore the entire file system :
# restore -rvf /dev/rmt0

Other Unix Backup Commands:

TAR:
tar is the only command (i think so) in UNIX which doesnot require a dash(-) infront of a flag.

To create a tar image in /tmp for a directory :
# tar cvf /tmp/oradata.tar /opt/oradata

To view the contents of a tar image :
# tar tvf /tmp/oradata.tar

To restore the tar image :
# tar xvf /tmp/oradata.tar

CPIO :
cpio reads and writes from stdin and stdout.

To backup the current directory to a /tmp/file.cpio file :
# find . -print cpio -ov > /tmp/file.cpio
To view the table of contents of the cpio archived tape :
# cpio -itvcC1 < /dev/rmt0


To restore data from the cpio archive file :
# cpio -idv < /tmp/file.cpio

To restore a selective file from cpio archived tape :
# cpio -imv /home/roger/.profile < /dev/rmt0

To restore selectively only the *.c and *.cpp file :
# cpio -i "*.c" "*.cpp" < /dev/rmt0


DD Command :
'dd' command copies (also converts) from an input device to an output device. This command will not span multiple tapes.
To copy a file and converting all the chars to upper case :
# dd if=/tmp/unixfile.txt of=/tmp/dosfile.txt conv=ucase

Tcopy Command :
Copies from one tape device to another.
To list the contents of a tape media :
# tcopy /dev/rmt0
To copy all the data from one tape to another tape device :
# tcopy /dev/rmt0 /dev/rmt1

tctl Command :
tctl has been widely used to control tape drives.
To rewind a tape device :
# tctl -f /dev/rm0 rewind
To fast forward to the beginning of 2nd tape mark :
# tctl -f /dev/rmt0.1 fsf
To do retension :
# tctl -f /dev/rmt0 retension
Retension is nothing but moving the tape to beginning, end and again to the beginning. You have to do this, if you encounter multiple read errors during the restoration operation.
To display the status of atape device :
# tctl -f /dev/rmt0 status
To eject a tape device :
# tctl -f /dev/rmt0 offline
TSM Client :

Few Points:
a. It requires a connection to TSM server and also a registeration in the TSM server.
b. You can take the 'backup' and 'archive' based on the TSM server configuration.
c. Archive can be taken for 90 days, 180 days, ... based on the management class.
d. Backup can have different versions. Last backup is the new and current version and oldest backup is the old version for every file that is backed up.
e. Most of the small sized companies keep 3 versions of backup, that means can have 3 backup version for each file.

To Backup a file :
# dsm backup /tmp/file1

To archive a file :
# dsm archive /tmp/file1

To list all the backed up filesystems :
# dsm query filespace

To verify the backup of a file :
# dsmc query backup /tmp/file1

To verify the inactive version of a backup of a file :
# dsmc query backup -inactive /tmp/file1

To verify the archive of a file :
# dsmc query archive /tmp/file1


To backup VIO Server :

To take the OS backup in a CD ROM :
# backupios –cd /dev/cd1 -cdformat

To take the OS backup in a DVD-RAM :
# backupios –cd /dev/cd1 -udf

To take the OS backup in a tape drive :
# backupios –tape /dev/rmt0

To verify the backup available in a tape :
# backupios –tape /dev/rmt0 -verify

To generate vio backup (tar file) in a file  :
# backupios –file /opt/file1

To generate vio backup (mksysb image) in a file :
# backupios –file /opt/file1 -mksysb

Note:    To restore a backup image on vio server, you have to use "installios" command in HMC. installios is a menu driven command (tool) which will ask for machine name, vio server(lpar) name, profile name for restoring the mksysb image.

Please let me know for any comments or corrections.

Friday, November 13, 2009

Performance Monitoring and Tuning in AIX

Performance Monitoring :

1. How to find out the system-wide memory usage ?
# svmon -G -i 2 5

2. How to list top 10 memory consuming processes ?

You can use any of the below commands
# svmon -Put 10
# ps aux head -1; ps aux sort -rn +3 head

3. How to list top 10 cpu consuming processes ?

# ps aux head -1; ps aux sort -rn +2 head -10

4. What is the best command for general performance monitoring :

# topas

You can even use 'jtopas', which is a java based system monitoring tool.

5. How to start trace for the entire system ?

# trace -a

6. How to stop trace ?

# trcstop

7. Where is the log file for trace tool located ?

/var/adm/ras/trcfile

8. What is the command used to generate trace report from a trace log file ?

# trcrpt

9. How to generate report on utilization statistics related to an LPAR ?

# lparstat

10. How to display the LPAR configuration report ?

# lpstat -i

11. What are the mostly used commands to find the cpu, memory,disk i/o statistics ?

# sar -> CPU, Memory statistics
# vmstat -> CPU, Memory statistics
# iostat -> CPU, Disk I/O satistics
# topas -> CPU, Memory, Network and Disk I/O statistics
# ps aux -> CPU, Memory statistics

12. How to display processes related to a specific user ?

# ps -fu username

13. How to list all the 64bit processes running in a system ?

# ps -efM

14. How to enable Interface Specific Network Options in AIX ?
# no -o use_isno=1

By enabling use_isno option, you can set buffer settings on a specific interface, giving you better control over performance management of network interfaces.

15. What is 'thewall' and how to set ?
'thewall' in AIX defines the upper limit for network kernel buffers.

When running AIX 5L V5.3 running a 32 bit kernel is 1GB or half the size of real memory depending on which of the two is the smallest. If you have AIX 5L V5.3 running a 64bit kernel the size of thewall will be 65GB or half the size of real memory, depending on which of the two is smaller.
To display the size of the thewall,

# no -o thewall

Note:
the size of thewall is static from AIX 5L Version 5.1 and later, and cannot be changed, to reduce the upper limit of memory used for networking make use of the maxmbuf tunable.

16. What is maxbuf tunable variable and how to set it ?

The maxmbuf tunable used by AIX specifies the maximum amount of memory that can be used by the networking subsystem.

It can displayed by using the below command,
# lsattr -El sys0 -a maxbuf

By default the maxmbuf tunable is disabled, it is set to 0, this means that the value of thewall will be used to define the maximum amount of memory used for network communications. By setting a non zero value to maxmbuf will override the value of thewall. This is the only way of reducing the value set by thewall.

The value of maxbuf's is defined by 1Kb units. To set its value to 1GB,
# chdev -l sys0 -a maxmbuf=1000000

17. How to find out the media speed of a network interface ?

# netstat -v ent0 grep Media

18. How to view the statistics for a specific network adapter ?

# entstat -d ent1

You can also use "netstat -v ent1".

19. How to reset the above network statistics ?

# entstat -r ent1

20. How to start iptrace on a specific network adapter ?

To Start :
# startsrc -s iptrace -a "-i en0 iptrc.out" &

To Stop:
# stopsrc -s iptrace

21. How to generate report from the iptrace's output file ?

# ipreport -r -s iptrc.out > ipreport

22. How to get the NFS statistics ?

NFS server RPC statistics : # nfsstat -sr
NFS server NFS statistics : # nfsstat -sn
NFS client RPC statistics : # netstat -cr
NFS client NFS statistics : #netstat -cn
Statistics on mounted file systems : # nfsstat -m
To reset the nfsstat statistics : # nfsstat -z

23. How to list the current values of all the network tunables?

# no -a

24. How to display the current value of a specific network tunable?

# no -o tcp_recvspace

25. How to display all the values (current, default, boot, min, max..) values of a network tunable ?

# no -L tcp_recvspace

26. What is the file that holds the next boot tunables's values ?

/etc/tunables/nextboot

27. What is the file that automatically generated with all the values of the network tunables that were set immediately after the reboot ?

/etc/tunables/lastboot

28. How to change the current value of a network tunable's value as well as add the entry to the /etc/tunables/nextboot file ?

Use the 'p' flag in the no command.

For Ex., # no -p -o tcp_recvspace=16k

29. How to display all the NFS network variables ?

# nfs -a

30. How to enable the collection of disk input/output statistics ?

# chdev -l sys0 -a iostat=true

31. How to display the 5 busiest logical volumes in a VG ?

# lvmstat -v datavg -c 5

32. How to display, enable and disable the statistics collection for a VG ?

To enable: # lvmstat -v datavg -e
To disable: # lvmstat -v datavg -d
To show : # lvmstat -v datavg

33. How to display the statistics for a LV ?

# lvmstat -l lv001

34. How to report disk statistics ?

# sar -d 5 60
Abovc command displays the disk i/o statistics 60 times in 5 sec interval.

35. How to list top 10 real memory consuming processes ?

# svmon -Put 10

36. How to list top 10 paging space consuming processes ?

# svmon -Pgt 10

37. How to list the files opened by a process ?

# svmon -pP Process_id

38. How to find out the memory usage of a specific process ?

# svmon -wP

39. How to display the paging (swap) usage ?

# swap -s allocated = 4718592 blocks used = 1475527 blocks free = 3243065 blocks

#swap -l
device maj,min total free
/dev/paging02 38, 4 4608MB 3166MB
/dev/paging01 38, 3 4608MB 3168MB
/dev/paging00 10, 14 4608MB 3167MB
/dev/hd6 10, 2 4608MB 3167MB

40.

Under Construction ....

Saturday, October 24, 2009

LDAP in AIX

LDAP can be implemented in AIX using IBM Directory Server software which is available in the AIX installation CDs.

Required File Sets:
ldap.server - Fileset for IBM Directory Server software.
ldap.client - Fileset for IBM Directory client library, header files, utilities.
ldap.max_crypto_server - Fileset for IBM Directory server software, encryption version; Required for SSL setup.
ldap.max_crypto_client - Fileset for IBM Directory client software, encryption version; Required for SSL setup.
gskkm.rte - Fileset for IBM GSKit software; Required for IDS v4 SSL setup.
gskak.rte - Fileset for IBM GSKit software; Required for IDS v6 SSL setup.

DB2:
DB2 database is installed by default along with the ldap.server fileset.

mksecldap command creates the default db2 instance and database while setting up the LDAP server.

Default DB2 instance created, managed by LDAP: ldapdb2
Default DB2 database created, managed by LDAP: ldapdb2

LDAP Daemons in AIX :

slapd - Server Daemon :
It runs in LDAP server, processes the requests forwarded by secldapclntd.

secldapclntd - Client Daemon :
It accepts requests from the LDAP load module, forwards the request
to the LDAP Security Information Server, and passes the result from
the server back to the LDAP load module.
This daemon reads the configuration information defined in the /etc/
security/ldap/ldap.cfg file during its startup, and authenticates to
the LDAP Security Information Server using the server administrator's
distinguished name and password, and establishes a connection between
the local host and the server.

LDAP Configuration Files:

/etc/slapd32.conf
- Server Config File

/etc/security/ldap/ldap.cfg
- Client Config File contains ldap server names,port numbers, Admin
DN, Admin DN password, SSL key/path, user/group/id Attr Map Path, user/
group cache size, cache TTL, heart beat interval, # of thread.

/usr/lib/security/methods.cfg
- Loadable module config file contains the LDAP stanza.

LDAP module entry in /usr/lib/security/methods.cfg :

LDAP:
program = /usr/lib/security/LDAP
program_64 = /usr/lib/security/LDAP64

Attribute Map Files:
These map files are used by the /usr/lib/security/LDAP module and the secldapclntd daemon for translation between AIX attribute names to


LDAP attribute names.
Each entry in a mapping file represents a translation for an attribute.

For Example, "accountlocked" user attribute in AIX is mapped to
"isaccountenabled" LDAP attribute.

# /etc/security/ldap/2307aixuser.map
# /etc/security/ldap/2307aixgroup.map
# /etc/security/ldap/idmap.map

User Attributes related to LDAP:
1. hostsallowedlogin = List of hosts where login is enabled
2. hostsdeniedlogin - List of hosts where login is disabled
3. SYSTEM = LDAP
4. registery = LDAP

Management of secldapclntd daemon:

start-secldapclntd - Starts the daemon
stop-secldapclntd - Stops the daemon
restart-secldapclntd - Restarts the daemon
ls-secldapclntd - Lists the daemon status including current server,
port number, caching status, etc.
flush-secldapclntd - Clears the cache of the daemon

Note: secldapclntd daemon is started by "mksecldap -c" command and it
gets started on boot time thru /etc/inittab entry.

LDAP Server Commands:

To setup the server,
# mksecldap -s -a cn=admin -p pwd -S rfc2307aix

where
cn=admin is the administrator DN
pwd is the password
rfc2307aix is the schema. Other available schemas are aix and rfc2307.

This will export the locally defined users and groups to the LDAP server with RFC2307AIX schema.

To do the above task without migrating local users and groups,
# mksecldap -s -a cn=admin -p pwd -S rfc2307aix -u NONE

To undo a previous server setup,
# mksecldap -s -U

To generate/import SSL certificate,
# gsk5ikm

To export all locally defined users and groups to a ldif file,
# sectoldif -d cn=aixsecdb,cn=aixdata -S rfs2307aix > /tmp/ ldapusers.ldif

To import users and groups from ldif file to the LDAP server,
# Use ldif2db or ldapadd command

LDAP Client Commands:
To setup LDAP client without SSL,
# mksecldap -c -h servername -a adminDN -p passwd

To setup ldap client using SSL,
# mksecldap -c -h servername -a adminDN -p passwd -k /usr/ldap/etc/
mykey.kdb -p keypwd

To undo a previous client setup,
# mksecldap -c -U

DB2 commands for managing LDAP database:

To drop(delete) the ldapdb2 database:
# su - ldapdb2
$ db2 drop database ldapdb2
$ exit

To drop the ldapdb2 instance:
# /usr/lpp/db2_07_01/instance/db2idrop ldapdb2

User/Group Related Commands:

To create a LDAP user from a client:
# mkuser -R LDAP joe

To modify the authentication method to LDAP for user1:
# mkuser SYSTEM=LDAP registry=LDAP user1

To lock a LDAP user:
# chuser -R LDAP account_locked=true user2

To allow user1 to login from host1 and host2:
# chuser -R LDAP hostsallowedlogin=host1,host2 user1

To deny user1 to login from host2:
# chuser -R LDAP hostsdeniedlogin=host2 user1

To allow user1 to login from the machine with IP 192.9.200.1 :
# chuser -R LDAP hostsallowedlogin=192.9.200.1 user1

Please post your comments and questions.

Friday, October 23, 2009

My Notes on NIM - Network Installation Manager

Required Filesets:

For Server - bos.sysmgt.nim.master and bos.sysmgt.nim.spot
For Client - bos.sysmgt.nim.client

Few Resource Definitions:

SPOT - Shared Product Object Tree is a directory containing files required to boot a machine and the boot image

LPP_SOURCE - Licensed Program Product source is a directory containing images/filesets that AIX uses to load software

MKSYSB - Mksysb resource used to build a machine

Requirements for NIM Server:

Disk Space :
1. 3 GB per base lpp_source resource
2. 500 MB + per mksysb resource
3. 500 MB per SPOT resource
4. Additional buffer space for future growth

Other Requirements:
# Minimum 512 MB real memory
# 10 or 100 MBPS ethernet adapter


My Recommendations for NIM VG and Filesystems :


1. Create a seperate VG called 'nimvg' with enough space.


2. Create the following filesystems in nimvg based upon your requirement


 a. /tftpboot - To hold boot images
 b. /export/nim - To hold the resources like SPOT, LPP, Mksysb


Directory Structure :
/export/nim/lpp_source - To hold lpp source resources
/export/nim/spot             - To hold spot resources 
/export/nim/mksysb       - To hold the mksysb backup for clients

Naming Schemes:


Follow the below schemes to easily identify during regular operations :

spot530TL6              - SPOT for AIX V 5.3 TL 6
spot530TL9              - SPOT for AIX V 5.3 TL 9
lpp_source530TL6  - LPP_SOURCE for AIX V 5.3 TL 6
lpp_source530TL9  - LPP_SOURCE for AIX V 5.3 TL 6
client_server1          -  Mksysb image of the host server1
client_server2          - Mksysb image of the hsot server2


How to setup the NIM Master :

0. Create the /tftpboot and /export/nim file systems as per yoru requirement

1. Initial setup of NIM Master
  a. ODM database
  b. Boot Area: /tftpboot directory that is used to store boot files (images)
  c. /etc/niminfo         -  Is the Key configuration file that exists on both master and clients
  d. nimesis daemon - This is the daemon which used to communicate with the nim clients

2. Insert the AIX CD into the master server's CD Drive

3. Create LPP_SOURCE and SPOT resources


Commands to manage NIM master and clients:


To setup NIM Server:
# nim_master_setup -B -a device=/dev/cd0 -a file_system=/nim -a volume_group=nimvg


To setup NIM installation in a client:
# smitty nim_bosinst


To view the status of NIM installation in a NIM client:
# lsnim -l client_hostname


To define a lpp_source resource:
# nim -o define -t lpp_source -a source=/dev/cd0 -a server=master -a location=/nim/lpp_source/AIX_5_3_4 AIX_5_3_4

To define a spot resource:
# nim -o define -t spot -a server=master -a location=/export/nim/spot -a source=lpp_source530 spot530
To remove a resource:
# nim -o remove AIX_5_3_4


To initialize a NIM client for diag operation:
# nim -o diag client_hostname


To initialize a NIM client for maintenance operation:
# nim -o maint client_hostname


To unconfigure a NIM server:
# nim -o unconfig master_server


To allocate a SPOT to a NIM client:
# nim -o allocate -a spot=AIX_5_3 client_hostname


To deallocate a SPOT from a NIM client:
# nim -o deallocate -a spot=AIX_5_3 client_hostname


To remove a NIM client after deallocating all its resources:
# nim -o remove client_hostname


To reboot a client:
# nim -o reboot client_hostname


To list all the NIM resources:
# lsnim


To list detailed information about a nim client:
# lsnim -l client_hostname


To list the resources allocated to a NIM client:
# lsnim -c resources client_hostname



This post is under construction. Please visit later for the upgraded version.

Wednesday, August 5, 2009

A Video on User Administration

Under Construction

User Administration - Part 1


User Administration - Part 2


User Administration - Part 3


User Administration - Part 4




User Administration - Part 5



User Administration - Part 6

Multibos - Video



Tuesday, November 11, 2008

AIX Commands – Part I

Volume Group Commands

Display all VGs:

# lsvg

 

Display all active VGs:

# lsvg –o

 

Display info about rootvg,

# lsvg rootvg

 

Display info about all LVs in all VGs,

# lsvg -o |lsvg –il

 

Display info about all PVs in rootvg

# lsvg -p rootvg

 

Create VG with name vgxx on hdisk1 with partition size 8MB,

# mkvg -s 8 hdisk1

 

Create VG with name sivg on hdisk1 with partition size 8MB,

# mkvg -s 8 -y sivg hdisk1

 

Create sivg on hdisk1 with PP size 4 and no of partions 2 * 1016,

# mkvg -s 4 -t 2 -y sivg hdisk1

 

To make VG newvg automatically activated at startup,

# chvg -a y newvg

 

To deactivate the automatic activation at startup,

# chvg -a n newvg

 

To change maximum no. of PP to 2032 on vg newvg,

# chvg -t 2 newvg

 

To disable quorum on VG newvg,

# chvg -Q n newvg

 

Reorganises PP allocation of VG newvg,

# reorgvg newvg

 

Add PV hdisk3 and hdisk4 to VG newvg,

# extendvg newvg hdisk3 hdisk4

 

Exports the VG newvg,

# exportvg newvg

 

Import the hdisk2 with name newvg, and assign major number 44,

# importvg -V 44 -y newvg hdisk2

 

Remove PV hdisk3 from VG newvg,

# reducevg newvg hdisk3

 

To deactviate VG newvg,

# varyoffvg newvg

 

To activate VG newvg,

# varyonvg newvg

 

To sync the mirrored LV in the VG sivg,

# syncvg -v sivg

 

To mirror LVs of sivg with hdisk2 (-m for exact mirror, -S forbackground mirror),

# mirrorvg -S -m sivg hdisk2

 

To remove the mirrored PV from the set,

# unmirrorvg sivg hdisk2

 

To synchronize ODM with LVM(VGDA) for datavg,

# synclvodm datavg

 

File System  Commands … In next part

Friday, November 7, 2008

IBM AIX - Features and Limits

Its a bit old table. But its a really good doc for people working in different versions of AIX.

AIX Quick Sheet

AIX Quick Sheet

AIX 5.1 Installation Document -

Here is a nice doc on AIX 5.1 Installation. It got screen by screen slides

Thursday, October 30, 2008

AIX Version 6.0 Study Materials

Here are some study materials from IBM





Below are AIX v6 materials from rootvg







Some YOUTUBE videos on pSeries and AIX

How to boot a pSeries/LPAR to AIX from Service Processor:


Tour of the new p695 pSeries Server:


Creation of LPAR via HMC:


Introduction to HMCv7:


Dynamically changing LPARs:


Installing AIX from CDROM:


Installing AIX from NIM:


Ethernet Options with Virtual Ethernet:


Setting up Virtual Ethernet via the Virtual I/O Server:

Thursday, July 5, 2007

Boot List - Overview

BOOT LIST/MODE:

There are 2 types of boot.
a) Normal mode
b) Service mode.

They are explained below

Normal Boot:

A normal boot is represented by the runlevel 2. This is the type of boot which is used while the system is in running/ production state.

To view bootlist for service mode,
# bootlist -m service -o hdisk0
hdisk1


To set bootlist for normal mode boot use the below command,

bootlist -m normal hdisk0 hdisk1 rmt0 cd0

You can also change this in SMS menu.

Service Boot:
The service boot list is used when booting the system for maintenance tasks. No applications or network services will be started.

To view bootlist for service mode,
# bootlist -m service -o fd0 cd0 rmt0 hdisk2 ent0

Another feature introduced with AIX Version 4.2 is the use of generic device names. Instead of pointing out the specified disk, with hdisk0 or hdisk1, you can use the generic definition of SCSI disks.

For example: # bootlist -m service cd rmt scdisk

This will cause the system to probe any CD, then probe any tape drive, and finally, probe any SCSI disk for a BLV. The actual probing of the disk is a check of sector 0 for a boot record, which, in turn, will point out the boot image.


You can also change bootlist using diag.

At the Diag Main Menu, select Task Selections, choose Display or Change Bootlist. Finally, you have to choose whether to change the Normal mode bootlist or the Service mode bootlist.

Wednesday, April 4, 2007

Daylight Savings Time Change in United States in 2007

In 2007 the Daylight Saving Time start/end dates will change in the United States. The new start date is the second Sunday of March; the new end date is the first Sunday of November. For more information, see "Managing the Time Zone Variable" at http://www-1.ibm.com/support/docview.wss?uid=isg3T1000252

You'll need one of the the following APARs:

AIX 5.3 = IY75211

AIX 5.2 = IY75213

AIX 5.1 = IY75214

AIX 4.3 see workaround in the “Managing the Time Zone Variable”


Some of the more current AIX releases already have this patch. You can use the instfix command to determine whether your system already has this fix installed. For example, if you have AIX 5.3, the command would be: instfix -iak IY75211


If not, you can down load it from Fix Central:
IBM Fix Central



Comment: Plan ahead, this isn't a simple patch. Fix Central added 800 MB of prereq's when I went to download IY75211 for my AIX 5.3 ML3 system.

Guys, please leave comments about your experiance with DST fix installation.

Saturday, March 10, 2007

pSeries Hardware - Some Images

2GB RAM MEMORY used for 7028-6C1
Power Supply Unit used for pSeries servers

IBM 20/40G 4mm DDS4 Tape Drive used in pSeries servers.


IBM 3273 36.4GB 10k Ultra320 Disk 80-pin pSeries RS6000



IBM 2GB Fiber Channel HBA used in pSeries Machines




p690 a.k.a Regatta





p6H1. Power4 based servers
SCSI Cable

IBM 450MHz CPU for P610


p610. Power4 based servers.







IBM 5706 pSeries 2-port 10 or100 or 1000 Base-TX PCI-X



History of AIX

Versions :

AIX 5L 5.3, August 2004
NFS Version 4 support
Advanced Accounting
Virtual SCSI
Virtual Ethernet
Simultaneous multithreading (SMT) support
Micro-Partitioning support
POWER5 support
JFS2 Quota support
JFS2 Filesystem shrink support


AIX 5L 5.2, October 2002
Minimum level required for POWER5 hardware
Support for MPIO Fibre Channel disks
iSCSI Initiator software
Dynamic LPAR support


AIX 5L 5.1, May 2001
Minimum level required for POWER4 hardware and the last release that supported Micro Channel architecture
Introduction of 64-bit kernel, installed but not activated by default
Introduction of JFS2
Static LPAR support
The L stands for Linux affinity
Trusted Computing Base (TCB)


AIX 4.3.3, September 1999
Added online backup function
Workload Management (WLM)


AIX 4.3.2, October 1998

AIX 4.3.1, April 1998

AIX 4.3, October 1997
Support for 64-bit architecture
Support for IPv6

AIX 4.2.1, April 1997
NFS Version 3 support


AIX 4.2, May 1996

AIX 4.1.5, August 1996

AIX 4.1.4, October 1995

AIX 4.1.3, July 1995
CDE 1.0 became the default GUI environment, replacing Motif X Window
Manager.

AIX 4.1.1, October 1994

AIX 4.1, August 1994

AIX v4, 1994

AIX v3.2 1992

AIX v3.1
Introduction of Journaled File System (JFS)

AIX v3, February 1990
Developer release licensed only to OSF; the LVM was incorporated into OSF/1.
SMIT was introduced.

AIX v2.0
last version was 2.2.1.

AIX v1, 1986
last version was 1.3

Supported architectures:

AIX v1 supported IBM PS/2 Micro Channel architecture PCs and IBM RT.
AIX v2 supported 6150-series IBM RT systems.
AIX v3 introduced support for IBM POWER architecture.
AIX v4 introduced support for PowerPC architecture and PCI bus.
AIX v5 introduced support for IA64 architecture (although AIX for Itanium
never went beyond beta). [1]
AIX v5.1 introduced Logical Partitioning on POWER4, was last version to
support Micro Channel architecture.
AIX v5.2 introduced support for JS20 PowerPC 970 based blade for IBM
BladeCenter.
AIX v5.3 introduced MicroPartitioning on POWER5.