Friday, April 17, 2009

System Administrator's Role

System Administrator's Role: (BASIC ROLES)
  • Preinstallation planning
  • Install - hardware, software, network
  • Manage - user accounts, system resources, licenses
  • Backup/recovery
  • Define subsystems
  • Performance monitoring, capacity planning
SAN Requirements:

IBM DS8300 frame
SVC (SAN Volume Controller)
EMC Symmetrix 8830
EMC Clariion CX700 & CX300
Cisco and Brocade Switches
IBMs TSM (Tivoli Storage Manager) and TPC (TotalProductivity Center)

Some fundametals and tweaks in AIX

Default Multi-user runlevel in AIX : runlevel 2

To bring down system in Maintenance mode/Single user mode
#shutdown -m

To bring back system in runlevel 2
#telinit 2

SRC ( System Resource Controller) for easy management of group of Deamon/Subsystem in AIX

#lssrc -a
#ps -ef

notice the output of above commands

#stopsrc -s
#startsrc -s
#refresh -s : this command enables deamon to reread any of it's configuration file; so whenever we made any changes in deamon config files, we can use refresh command to bring the changes into effect.

Not all process are controller by SRC/ srcmstr; those process which are not controlled by SRC can be killed by


Manage the System Environment (e.g time, license, characteristics of OS etc)

#smit system

Manage the system language environment

#smit mlang

SU command:
The su command allows you to assume the permissions of any user whose password you
Every time the su command is used an entry is placed in the file /var/adm/sulog (this is an
ASCII text file). This makes it easy to record access as the superuser. Normal logins are
recorded in the file /var/adm/wtmp. To read the contents of this file use the command:
who /var/adm/wtmp.
The su command can also be specified with the - option. The - specifies that the process
environment is to be set as if the user had logged into the system using the login
command. Nothing in the current environment is propagated to the new shell. For
example, using the su command without the - option, allows you to have all of the
accompanying permission of root while keeping your own working environment.

Boot Image of AIX

Using Bootlist from System ROS/BIOS/EFI (whatever you say) , System locates the boot device and attempts to load the Boot Image of OS to the Memory. So, the question comes: What is the Boot Image?

Boot image of AIX contains the files required to boot the AIX system, including the AIX kernel, the RAMFS (RAM file system), and the copy of Base ODM (Object Data Manager)

ROS : Read Only Storage
BIOS : Basic Input Output System
EFI : Extensible Firmware Interface

System Initialization in Brief:

In General
Hardware Initialization -- Low Level Configuration -- Load Boot Image -- AIX Initialization

For POWER servers:
System ROS ---- SMS/BOOTLIST ---- Software ROS------ BLV----INIT

For Intel Itanium -based Servers
BIOS/EFI --- Set up EFI boot manager --- EFI system partition contains bootloader boot.efi ---physical partition contains BLV -- AIX Initialization

Thursday, April 16, 2009

Startup modes in AIX

Basically there are 4 startup modes in AIX


1. NORMAL MODE : Multiuser mode; All process are running

2. SYSTEM MANAGEMENT SERVICES : it runs from FIRMWARE and sets bootlist; it's not AIX

3. MAINTENANCE : Singer User mode; password recovery and system recovery for the system which can't undergo normal boot.

4. DIAGNOSTICS : AIX diagnostics

Monday, April 13, 2009


Real Good explanation.. seems to be perfect.. but i don't know it will work or not.

Sunday, April 12, 2009

Snapshot : quick magic backup


This is a very useful feature. Many of us have the situation where important data needs to be backed up, but it cannot be used while the backup is running because then the backed up files would be out of sync with each other. For example, you have an accounting system that is recording orders. The accounts receivable file gets backed up now, and you take an order. Both a/r and the customer file get updated to reflect the new order, but a/r has already been backed up. When the customer file finally makes it to tape, it's not consistent with a/r, and of course it needs to be. Without snapshots, your only recourse is to stop taking orders while the backup runs. If you have lots of disk space, you could copy the whole accounting system and backup the copy, but that can take a lot of time too, and you may not have the space. Snapshots are the solution. Before you do the next step, make sure you've put a few files in /little, and make at least one of them unimportant. Then create the snapshot.

lvcreate --size 200M --snapshot -n mysnap /dev/Volume00/mylv
mkdir /mylvsnap
mount /dev/Volume00/mysnap /mylvsnap

Right off the bat you should have noticed something strange. We created mysnap very specifically with a size of 200MB, and trust me, that's all it took away from us, but df shows it being the same size (6GB) as mylv. We'll get back to why this is in a minute, but first take a look at the files in /snap. They are identical to the files in /mylv, right? OK, now go edit a file in /mylv. Does it change in /snap? No, it does not. Remove a file in /mylv - it's still there in /snap. Add a new file to /mylv, and that does NOT appear in /snap. How is this done, and most especially how is it done in 200MB?

It's not magic

OK, it is magic. What is going on is that /snap contains absolutely nothing UNLESS something changes back at /mylv. If you ask for a file from /snap that has not changed, the data is read right from /mylv. But if a file IS changed, before the change is written, the data blocks that don't yet have the changes are written to /snap. Note that entire files are NOT written, just data blocks that are about to change. So, as long as we don't change more than 200MB worth of data in /mylv, we can have our cake and eat it too. Our procedure will be:

  • Stop using the filesystem, shut down any databases that need to be shutdown etc.
  • Create the snapshot
  • Start up our databases, go back to work.
  • Start backing up /snap

Our time without access is minutes or seconds - just however long it takes to stop the processes and restart them, basically. The backup can take its sweet time. Well it can if it doesn't take so long that we need more than 200 MB to store our data that is changing. That does mean that the size of mysnap does have to be a bit of an educated guess. It also means that as soon as you are done with the backup, mysnap should be removed:

umount /snap
lvremove /dev/Volume00/msnap

If you don't remove it, it will go on copying data as it is changed and eventually it will run out of room. You can't just leave it there for next time!

Some other helpful links:

Thursday, April 9, 2009

Backup and Restore

Tar (Tape Archive)

It's a backup utility to create archive in Tape.

tar [options] [archive name/device name/destination] [files to be archived/source]

options can be : -c create
-v verbose
-x extract
-t show the contents
-z to zip the content

eg. #tar -cvf /dev/st0 /home

Using dump and restore:

dump: it's utility to make a backup of files in ext filesystem

#dump [options] [destination] [source]
restore: it's utility to restore a backup

Type of backup:
1. Full Backup --> 0
2. Incremental Backup --> 1-9
e.g #dump -0uf /dev/st0 /home

0--> for full backup
u--> Update the file /etc/dumpdates after a successful dump
f --> Write the backup to file; file may be a special device file like /dev/st0 (a tape drive), /dev/rsd1c (a floppy disk drive), an ordinary file, or - (the standard output)

#dump -1uf /dev/st0 /home

1--> for first incremental backup


#cd / ; mkdir extract
#cd /extract
#restore -rf /dev/st0

Shell Scripting plus AWK and SED

Shell Script is series of command written in plain text file. Shell script is just like batch file is MS-DOS but have more power than the MS-DOS batch file

awk utility is powerful data manipulation/scripting programming language (In fact based on the C programming Language). Use awk to handle complex task such as calculation, database handling, report creation etc.

General Syntax of awk:

Syntax:awk -f {awk program file} filename

awk Program contains are something as follows:

action 1
action 2
action N }

awk reads the input from given file (or from stdin also) one line at a time, then each line is compared with pattern. If pattern is match for each line then given action is taken. Pattern can be regular expressions.


SED is a stream editor. A stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline). SED works by making only one pass over the input(s), and is consequently more efficient.

General Syntax of sed
sed -option 'general expression' [data-file]
sed -option sed-script-file [data-file]