Posts Tagged AIX

OpenSSL-1.0.0a on AIX v5.3


Well once again I find myself scrambling to get something done that was known but not well communicated during the project life-cycle.  So I need to update all managed AIX machines running v5.3 to include OpenSSL (openssl-1.0.0a to be exact) and once again my disdain for AIX rears it ugly head, which is represented by the Zombie to the left 🙂  Aside from my personal dislike of the Korn shell… Maybe I am not being fair to AIX as I don’t really work in an AIX optimal environment, taking full advantage of all of the great tools they do have (NIM, clustering, SAN, etc…).  But managing them as 1-off’s just plain stinks.  Suffice it to say that I would NOT recommend deploying a stand-alone AIX server in any circumstance as you cannot realize anything near it’s full potential.  Anyway, here is what I did to rectify the issue at hand.

# Install SSL on AIX 5.3.0.0
# get the rpm.rte package on the system
mkdir /opt/ssl4AIX
cd /opt/ssl4AIX
installp -qacXgd rpm.rte rpm.rte
# Grab the other packages and put them on the AIX system
# http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html
rpm -ivh gcc-4.2.0-3.aix5.3.ppc.rpm
rpm -ivh libgcc-4.2.0-3.aix5.3.ppc.rpm
# Create a sym link – Check this first following RPM installs for correct PATHS
# find / -name libgcc_s.a
# /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/ppc64/libgcc_s.a
# /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/pthread/ppc64/libgcc_s.a
# /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/pthread/libgcc_s.a
# /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/libgcc_s.a
# Now make the link
ln -s /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/libgcc_s.a /usr/lib/libgcc_s.a
#
gunzip openssl-1.0.0a.tar.gz
tar -xf openssl-1.0.0a.tar
cd openssl-1.0.0a
./Configure shared –prefix=/usr aix-gcc
make
make test
# If all goes well !!!
make install

Incidentally, you need an IBM account if you want to download these packages from http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html… LOL

That stinks as well 😦

, , , , , , , , ,

1 Comment

AIX 5.1 mksysb…reliable-backup?


I hate to use the word ‘hate’ but I really ‘hate’ AIX.  Now it may be that I am just not a true expert and I don’t know enough about the OS to be fair, but that is my stance.  I have never had as much difficulty with any other OS as with AIX, any flavor.  In any event, I have to manage these system on a regular basis and one of the tasks I usually setup on the system in an automated backup to the often-times included internal tape drive (usually 4mm).  I had a system crash last week and I had to restore it from a rescue boot CD, which worked quite well, aside from the 14 times it took me to get the RS6000 to actually boot from the CD.   So of course it lost a majority of it’s settings, all of my automation scripts being the topic for today.  I must admit that it is quite likely that I caused the issue in the first place by trying to mirror 3 drives in the rootvg, as a test of course, and it just never seemed to be the same after.  Even following a complete removal of the 3rd hdisk and all of its pointers… something just wasn’t right, until one morning it was just completely hosed.  So anyway, one of my complaints with AIX is that even within the same parent release levels; i.e. v5.1, v5.2, v5.3, the commands to not translate well if at all across them?  I have been wondering why I have not seen an email reporting on this systems backups… well of course I had a case incompatibility issue in my script that I took from a v5.2 system to use on this v5.1 system.  I have the tested and functional script below for use on an AIX v5.1 RS6000 server 🙂

#!/usr/bin/ksh
#
typeset -r datetime=`date`
typeset -r date=`date +%Y%m%d`
typeset logfile=”/opt/proserve/logs/backup.$date.log”
typeset maillog=”/opt/proserve/logs/maillog.$date.log”
typeset errlog=”/opt/proserve/logs/errlog.$date.log”
. /opt/proserve/clientconfig
{
echo “\n” > $logfile
echo “===============================================================”
echo ”                       MKSYSB and System Report                     ”
echo ”                         for activities run                     ”
echo ”                     $datetime ”
echo “===============================================================”
echo “\nClient Information Section”
echo “——————————————-”
echo “\nCustomer – $clientname ”
echo “\nSystem status – `uptime`\n”
echo “Users currently logged into this system:”
echo “***NOTE*** – Any data changed on this system by users”
echo ”             currently logged in will not be backed up!”
who
echo “\n===============================================================”
echo “\nCurrent System Error Report:”
errpt
echo “\n===============================================================”
echo “\nCurrent Filesystem Space:”
df -k
echo “\n===============================================================”
echo “\nSystem Information:”
prtconf
echo “\n===============================================================”
echo “\nCurrent tape information:\n”
tctl status
echo “\nRewinding tape……….”
tctl rewind
echo “\nBeginning system backup @ $datetime\n”
/usr/bin/mksysb  ‘-e’  ‘-v’ ‘-i’ ‘-X’  /dev/rmt0
echo “Backup ended at `date`”
} 1>$logfile 2>$errlog
cat $logfile > $maillog
echo “\n===============================================================” >> $maillog
echo “\nAdditional messages reported during backup:” >> $maillog
cat $errlog >> $maillog
mail -s “System Backup and Status Report” -r root@proserve-solutions.com $email_list < $maillog
exit

The issue was that v5.1 didn’t like the ‘V’ that v5.2 uses… I just changed the ‘V’ to a ‘v’ and that worked fine… Guess I should take a look at the log files before assuming that something is compatible.  Ya know I just had a thought, I wonder if my hatred for AIX is actually displaced and should be focused on ksh…  I am a bash lover without a doubt… korn may not be for me 🙂

, , , , , , , ,

2 Comments

AIX-ercise in filesystem Gymnastics


So for the last few hours I have been preparing for a change window I have this weekend to get a customer ready for a migration/upgrade.  I really don’t like AIX but this one just about brought me to my knees… I know a perfect image, open wide banana boy!!!

Not sure why I am even posting this aside from the simple fact that I spent so much time on it and want to see it in all it’s splendor somewhere other than in my editor…

I’m not even going to explain this one… Looks like I thought about making this one interactive/automated but it really is a one-off… and since every AIX system I manage, someone else built (ya no consistency) there isn’t much point by way of re-usability…If you are doing some AIX disk extending, maybe this will help you, or maybe not… Maybe I will comment on my own success/failure Monday after I actually do this… although I did do a dry-run of all this on a test box I have… LOL 🙂

/a is currently 33GB (32384MB) total = 33161216
/a has 17GB FREE
/a must have 15GB = 15595240
#
Thought process…
15595240/33161216*100 = 47%
15595240/20480000*100 = 76%
#
Total current sizes:    Projected new sizes:
/a        =  33GB = 48%
/        =  64MB = 68% –>   128MB 34%
/usr    = 896MB = 91% –> 1.800GB 45%
/var    = 448MB = 94% –>   896MB 47%
/tmp    = 128MB = 60% –>   256MB 30%
————-
3.080GB Total
#
copy everything from /a to /a3
# For reference later:
lsvg rootvg |grep PPs:|cut -c 42-79
TOTAL PPs:      1084 (69376 megabytes)
FREE PPs:       0 (0 megabytes) <– Point of interest following the rmfs of /a
USED PPs:       1084 (69376 megabytes)
STALE PPs:      66
#
ps -ef |grep /a/
vgsched stop # prob the only thing running attached to /a process-wise
for i in `ps -ef |grep /a/|awk ‘{print $2}’`; do kill -9 $i; done
umount /a
#
# Destroy /a
rmfs /a
rmlv: Logical volume lv00 is removed.
#Confirm that we got all of /a back as FREE PPs
lsvg rootvg |grep PPs:|cut -c 42-79
# Don’t think I need this after all as I am creating not by PP:
lsvg rootvg|grep “PP SIZE:”
# VG STATE:       active                   PP SIZE:        64 megabyte(s) (64*<number of FREE PE>=size)
# to realize the above “Thought process”:
crfs -v jfs2 -m /a -g rootvg -a size=+41943040 # 20GB (20*1024*1024*1024/512 = 41943040)
mount /a
# Make sure /a is in /etc/filesystems
# Now extend the other filesystems:
chfs -a size=131072 /
chfs -a size=1835008 /usr
chfs -a size=917504 /var
chfs -a size=262144 /tmp
Unchanged:
65536 /home
65536 /opt
df -k
df -g
# Re-sync the rootvg Volume Group:
syncvg rootvg
#
# rootvg:
Total Disk:        35520512 (34688MB = 36GB)
Appropriated:    22544384 (22016MB = 23GB)
Un-allocated:    12976128 (12672MB = 13GB)
#
glohost # df -g  (Ya AIX 5.3 builds sometimes allow the -g…)
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           0.06      0.02   68%     2215     7% /
/dev/hd2           0.88      0.08   91%    26538    12% /usr
/dev/hd9var        0.44      0.03   94%      764     1% /var
/dev/hd3           0.12      0.05   60%     1325     5% /tmp
/dev/hd1           0.06      0.06    4%      433     3% /home
/proc                 –         –    –         –     –  /proc
/dev/hd10opt       0.06      0.04   30%     1635    10% /opt
/dev/lv00         31.62     16.75   48%    22260     1% /a
#
rootvg ========== 33.24GB
#

It just goes on and on from here… 😦

, , , , , , , , , , , , , ,

Leave a comment