Filed under: *Nix, AIX, HP-UX, Red Hat, rhel | Tags: AIX, HP-UX, ibm, redhat, rhel, serial, tape, tivoli, tsm
One thing that you need to set up LanFree on TSM (or any kind of SAN Fiber channel backup) is the serial number of the tape drive registered on your server. I happen to be working on a somewhat heterogeneous environment that includes AIX, HP-UX, RHEL, and Windows. Below is my note on how to obtain the tape drive serial number those OSes. I’m using IBM TS3200 as our media library
RHEL
Pretty straight forward . All you have to do is type the following command:
[root@hqdwhbe1 ~]# cat /proc/scsi/IBMtape
lin_tape version: 1.10.0
lin_tape major number: 250
Attached Tape Devices:
Number model SN HBA FO Path
0 ULT3580-TD4 1310140159 qla2xxx NA
1 ULT3580-TD4 1310039844 qla2xxx NA
2 ULT3580-TD4 1310135990 qla2xxx NA
3 ULT3580-TD4 1310135028 qla2xxx NA
4 ULT3580-TD4 1310136043 qla2xxx NA
5 ULT3580-TD4 1310136063 qla2xxx NA
[root@hqdwhbe1 ~]#
The command above will show you the serial number of all tape drive installed on your RHEL box
AIX
Similar to RHEL, do this on the console:
# lscfg -vpl rmt0
rmt0 U789D.001.DQD74R5-P1-C2-T2-W2002000E11114398-L0
IBM 3580 Ultrium Tape Drive (FCP)
Manufacturer................IBM
Machine Type and Model......ULT3580-TD4
Serial Number...............1310140159
Device Specific.(FW)........89B2
PLATFORM SPECIFIC
Name: tape
Node: tape
Device Type: byte
HP-UX
IBM provide us with tapeutil, a nice tool operate the IBM tape from console. To start, just type:
# tapeutil
From the menu, press “1″ to open a device. Type down the path to your tape drive. Next press “1″ to choose to open the device for read/write access

..On the next screen, press “3″ to query for the tape drive serial number

There you go

That’s it
I miss bash when I’m working on those aix boxes. On default setting ksh won’t give you your command history on the press of arrow keys. Yes you can set -o vi and map Esc-k to arrow key and such, but why would I do such thing when I can install bash on those AIX boxes
IBM provides bash as a part of their Linux toolbox. Get the rpm, put it into the aix boxes using ftp or sftp, put it into a temporary folder such as /tmp/bash/
[lab1:root:/tmp/bash:] ls -la
total 2800
drwxr-xr-x 2 root system 256 Jul 14 21:53 .
drwxrwxrwt 15 bin bin 4096 Jul 14 22:35 ..
-rw-r–r– 1 root system 1429004 Jul 14 21:44 bash-3.2-1.aix5.2.ppc.rpm
[lab1:root:/tmp/bash:]
to install, go to /tmp/bash, and do the following:
[lab1:root:/tmp/bash:] inutoc .
[lab1:root:/tmp/bash:] smitty installp
Once in the smitty screen, pick “Install Software”
On “Input device /directory for software” insert “.”
On the next screen, get to “Software to install”, press F4 to get the list of installable package on the chosen directory. Highlight bash-3.2, press F7 to mark it for installation. Press enter to return to the previous screen, and enter again to install bash
Wait until the install process finished. To get to bash, just type “bash” on your prompt.
I hit a roadblock when trying to copy a 50G file from an NFS mount to a local disk on an AIX 5.3 server.
The error is as follows:
0653-447 Requested a write of 4096 bytes, but wrote only 3584.
What to do? On a console, type :
#ulimit -f unlimited
#ulimit -d unlimited
..and retry the copy process
Filed under: *Nix, AIX, HP-UX, oracle | Tags: AIX, crontab, HP-UX, linux, oracle, search
So I don’t know what that vendor engineer did to my EBS install, some of the concurrent manager function is spitting temporary files to my /tmp directory. The thing is, that &^%$^$** engineer insisted that he has setup that all temp files are stored in it’s EBS specific directory, and clean up process has been scheduled for them. But every couple of days my /tmp is clogged with files belonged to EBS service account
Since these files basically has no expiration date, and the scheduled clean up does not cover that particular directory, I have to set my own temp files cleaning cycle. Here is what I need :
- find files belong to the EBS service account, let’s assume it’s “oracle”
- find files within certain age range
- delete those files
- automate the task to run everyday
The last part is pretty easy with crontab. The 1-3 part must be done carefully since there is a bunch of other file on /tmp that I would rather not touch
So here is the find command that I use to accomplish task 1 to 3 :
find /tmp -mtime +3 -type f -user oracle -exec rm -rf {} \;
- the -mtime +3 flag is used to search for files which were last modified 3 or more days ago
- the -type f flag is used so that the search will only find plain files only
- the -user oracle is used so that the search will only find files belong to the user “oracle”
- the -exec rm -rf {} is used so that every single files found by the search is automatically deleted. The search will find a single file at the time, and put the file name between the bracket.
At first I’m not sure whether the file should be deleted right away or not, so at first I decided that, instead of deleting the files, I move it to a temporary directory so I can review the files, and then delete them. Here is the find command that I use :
find /tmp -mtime +3 -type f -user oracle -exec mv {} /dumptmp \;
With the above command, instead of deleting the files found by the search, it move the said files to different location. I can then review and examine whether the files are save to be deleted.
So I got several AIX boxes hosting Oracle EBS. Since the company that I work for is obliged to follow SOX 404 standard, and that means no root password sharing for each administrators. Hence, I need to create a user for each administrators, and grant them a root equivalent right.
One approach to do this on Linux (and HP-UX) box is by changing each administrator account UID number to 0, essentially making all login from those account to be forwarded to root. The problem with this approach is that those account will use all config and history or log files of the root account. For example, when you look at .history file, you won’t be able to tell which user perform what, since all activity from each account will be recorded as if it was performed by root.
What I can do is to use sudo, that will allow you to delegate root access to certain user or group of user. Here is a little how to on installing sudo. (more…)











