Showing posts with label aix. Show all posts
Showing posts with label aix. Show all posts

Tuesday, April 19, 2011

Live Partition Mobility

Here's a demo I've done of a 5 min Live LPAR Mobility (think vmotion for POWER LPARs)

Its a running AIX 6.1 LPAR moved on the fly between 2 POWER7 frames: 5mins, not one lost ping!! (longest delay to any ping I got was ~78ms)

remote HMC LPM

(remote HMC - not both frames under the same HMC this time)

Tuesday, April 5, 2011

Scripts to web publish HMC managed systems configs

2 Quick scripts (shell & expect) to grab configs off HMCs for managed IBM POWER(aix/linux/vio)systems and format them into a html web page.

Will work where no ssh trust exists (ie Where you cant run mkauthkeys -u lpar2rrd -a 'ssh-dss ....' as hscroot)
If ssh trust exists then the script does not need the hmccli expect script

Script renders HTML to stdout so just redirect eg ./$0 > index.htm



Here is an expect script hmccli that it can call



...blogger needs a code tag :(

Wednesday, April 21, 2010

install SSH 5 on AIX 5.3

http://sourceforge.net/projects/openssh-aix/
https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=aixbp (get openssl need an IBM login)

#zcat openssl.0.9.8.802.tar.Z | tar -xvf -
#zcat openssh-5.0_tcpwrap.tar.Z | tar -xvf -
# /usr/lib/instl/sm_inst installp_cmd -aQd /tmp/openssl.0.9.8.802/ -f _all_latest -cNgXGY

geninstall -I "a -cgNQqwXY -J" -Z -d /tmp/openssl.0.9.8.802/ -f File 2>&1

File:
I:openssl.base 0.9.8.802
I:openssl.license 0.9.8.802
I:openssl.man.en_US 0.9.8.802


+-----------------------------------------------------------------------------+
Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
Filesets listed in this section passed pre-installation verification
and will be installed.

Selected Filesets
-----------------
openssl.base 0.9.8.802 # Open Secure Socket Layer
openssl.license 0.9.8.802 # Open Secure Socket License
openssl.man.en_US 0.9.8.802 # Open Secure Socket Layer

<<>>

+-----------------------------------------------------------------------------+
BUILDDATE Verification ...
+-----------------------------------------------------------------------------+
Verifying build dates...done
FILESET STATISTICS
------------------
3 Selected to be installed, of which:
3 Passed pre-installation verification
----
3 Total to be installed

+-----------------------------------------------------------------------------+
Installing Software...
+-----------------------------------------------------------------------------+

installp: APPLYING software for:
openssl.man.en_US 0.9.8.802
[...snip]
-------------------------------------------------------------------------------
openssl.man.en_US 0.9.8.802 USR APPLY SUCCESS
openssl.license 0.9.8.802 USR APPLY SUCCESS
openssl.base 0.9.8.802 USR APPLY SUCCESS
openssl.base 0.9.8.802 ROOT APPLY SUCCESS

# /usr/lib/instl/sm_inst installp_cmd -aQd /tmp/openssh-5.0_tcpwrap -f _all_latest -cNgXGY

geninstall -I "a -cgNQqwXY -J" -Z -d /tmp/openssh-5.0_tcpwrap -f File 2>&1

File:
I:openssh.base.client 5.0.0.5301
I:openssh.base.server 5.0.0.5301
I:openssh.man.en_US 5.0.0.5301
[...snip...]
openssh.base.client 5.0.0.5301 USR APPLY SUCCESS
openssh.base.server 5.0.0.5301 USR APPLY SUCCESS
openssh.base.client 5.0.0.5301 ROOT APPLY SUCCESS
openssh.base.server 5.0.0.5301 ROOT APPLY SUCCESS
openssh.msg.en_US 5.0.0.5301 USR APPLY SUCCESS
openssh.man.en_US 5.0.0.5301 USR APPLY SUCCESS

File /etc/group has been modified.
File /etc/passwd has been modified.

One or more of the files listed in /etc/check_config.files have changed.
See /var/adm/ras/config.diff for details
##########################################################VERIFY##################################
# openssl version
OpenSSL 0.9.8h 28 May 2008
# ssh -V
OpenSSH_5.0p1, OpenSSL 0.9.8h 28 May 2008
# ps -ef|grep ssh
root 159882 270364 0 15:57:06 pts/1 0:00 grep ssh
root 250034 131178 0 15:54:01 - 0:00 /usr/sbin/sshd

# lssrc -s sshd
Subsystem Group PID Status
sshd ssh 250034 active

HMCs for power7

IBM pSeries power7 hardware needs at least a CR3 HMC . CR5 (7042-CR5) is recommended - because it the most expensive?? - IBMs job (like almost all company's) is to make money - consulting, systems and software are just the tools to do that job

7.3.5.0 is as far as CR2's can go
7.710 is what you need to manage power7

Friday, April 16, 2010

mkdvd vs mksysb in AIX for bare metal restore

mksys is a good tool but is a hangover from tape days, these days we like dvds and images - most machine dont even come with a tape drive (eg DAT) anymore but they do have DVDRAMs or DVD RO of some type
mkdvd is a wrapper for mksysb that will make a DVD image of your mksysb eg

#mkdvd -SI /dvd_backup_images/

This will create the image file into /dvd_backup_images/ with a name like cd_image_*
then you can use something like

#cdrecord -dao -speed=2 -dev=/dev/dvd /dvd_backup_images/cd_image_*
or
#burn_cd -d /dev/cd0 /dvd_backup_images/cd_image_*

(really you should NIM this shi7 but this is a stand alone example say)

wakko aix/pssp terms

smitty skulker efence worm hats hags supper

don't forget amd(fan) , ipl (boot) ,dasd(disk), purr and spurr

this list will grow as I remember stuff

Tuesday, April 13, 2010

ASM and HDS HDP

A client is looking at moving from Oracle 10g on AIX5.3, all JFS2 file systems to ASM. The SAN is HDS: USP-V fronting USP and AMS arrays. HDS supports Thin provisioning with Oracle ASM based storage so it would be nice to have for migrations,they wont need to have all of the storage up front and according to Oracle its OK http://www.oracle.com/technology/products/database/asm/pdf/hds%20hdp_bestpractice_wp%203-14-2008.pdf Page 22 is a little worrying based on Oracle's testing, there is a potential of 8-25% adverse performance impact when thin provisioning is used. I guess thats when ASM is striping AND HDS is striping in the background too - ASM must be told external RAID is being used basically.

As long as they do as recommended, ie all RAID Groups and Parity Groups in a pool are taken from multiple/different back end adapters, same disk size/speed, same RAID levels they should hit the performance statistics mentioned under "ASM on HDP - Recommended configuration".

RAID Groups and Parity Groups are just terminology for the group of disks configured in a RAID set in HDS Modular(AMS) & Enterprise(USP) arrays respectively.

Saturday, April 10, 2010

mounting CDROMs,ISOs and windows share in un*xs

In general its the mount command then some option for what the cdrom (or other) filesystem then some read-only option, then the device, then the mount point

AIX
mount -v cdrfs -o ro /dev/cd0 /mnt/cdrom
##### mount an .iso image ####128M PPs on hdisk2
mklv -y cdlv -s n -L /dev/cdlv vg00 $(du -m dvd1.iso|awk '{print int($1+128)"M"}') hdisk2 ; dd if=dvd.iso of=/dev/cdlv ; mount -v cdrfs -o ro /dev/cdlv /mnt/iso

NB: pretty bad eh and you need enough space on disk2 to copy it to, and it takes ages. I wrote this 1 liner in a post to usenet and I see its all over the net now as the way to mount in AIX 5.3 eg http://dbaspot.com/forums/aix/368597-poor-mount-iso-aix.html

I guess you should really do it from the VIO server these days http://ibmsystemsmag.blogs.com/aixchange/2008/01/more-on-virtual.html

or like this
http://www.ibm.com/developerworks/wikis/display/WikiPtype/AIXV53MntISO

or in AIX6 like this
loopmount -i cdrom.iso -o "-V cdrfs -o ro" -m /mnt

Linux
mount -t iso9660 -r /dev/hdb /mnt/cdrom
##### mount an .iso image ####
mount -o loop dvd.iso /mnt/iso

Solaris
mount -F hsfs -r /dev/dsk/c0t6d0s2 /mnt/cdrom
##### mount an .iso image ####
lofiadm -a dvd.iso; mkdir /mnt/sol ; mount -t hfs /dev/lofi/1 /mnt/iso
HP-UX*
mount -t cdfs -o ro /dev/dsk/cqd1s0 /mnt/cdrom

Windows!!! you can mount SMB/(Windows shares) to Linux with just the mount command:
### Linux
mount -t smbfs -o username=billy,password=apple22,workgroup=CORP //fileserver/fileshare /mnt/windowsdrive

### AIX

root@[scatst]/>mount -v cifs -n scadc01/temp02/temp02 -o wrkgrp=sca01,uid=205,fmode=750 /Sapinterface /scadc01

This basically says put the CIFS(windows SMB) share /Sapinterface from node scadc01 with login user=temp02 and password=temp02 with domain=sca01 on the AIX box as /scadc01 with read, write and execute permission for the user with UID=205


The Microsoft Services for Unix (SFU) help has all of this information and step by step howtos but basically on your side you need to:-

Log on as a member of the Domain Admins group of the server's domain
Install Server for NFS Authentication (and SFU etc)
[Server for NFS Authentication must be installed on every domain
controller in any domain containing users who will access files
through Server for NFS]
Log on as a member of the (local) Administrators group.
Install Server for NFS
Configure user authentication. Install "User Name Mapping" on at least
one server in the network and then specify the User Name Mapping
server that Server for NFS should use for authentication.

Check Server for NFS service, is running
On windows Services For unix shell:-
nfsshare scadev=C:/sharefolder root=

Then on AIX we can:-
mount -v nfs3 -n /share /mnt/share

wont go into samba - its all over the net and