Out Here In The Field : Journeys


ORA-27054 on RHEL
September 13, 2009, 12:17 am
Filed under: *Nix, E51, IRL, Red Hat, life on the wired, oracle | Tags: , , , , , ,

I previously encountered this issue on my 10.2 RAC nodes running on top of HP-UX. I faced it the 2nd time when performing postclone operation on a Oracle EBS 12.0.0.5 on AIX. This time, the error popped up when I’m trying to perform postclone for Oracle EBS HCM module  on a RHEL  4U6 x86-64. A reference in using nfs for Oracle can be found here. My NFS partition is mounted using :

mount 172.16.2.82:/hcmdev /u01 -o rw,bg,intr,hard,
timeo=600,wsize=32768,rsize=32768,nfsver=3,tcp

I don’t have to put “noac” on the option since the RHEL node is not an RAC cluster



SSH Public key authentication failed, login still request for password
October 6, 2008, 2:57 pm
Filed under: *Nix, Red Hat, Ubuntu

Some time ago, I was asked to setup a public key authentication for SCP session betwen 2 *nix servers. The process should be straight forward, as mentioned on my previous post regarding this subject.

But somehow the login process keep on asking me to enter the correct password, and ignoring the public key that I have copied to the remote server. I start the process in verbose mode, so that I can get meaningful output that can help me solve the issue:

[surfer@kazekiri ~]$ ssh -v mach5@avenger

and this is snipped from the output that I get:


debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/surfer/.ssh/identity
debug1: Trying private key: /home/surfer/.ssh/id_rsa
debug1: Offering public key: /home/surfer/.ssh/id_dsa
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password

This means the private key is recognized, and was offered as a mean for authentication by the local server, but somehow the login process still require me to type-in the password for the remote user.

After some reading, I found out the culprit was the access restriction to the key stored on each server. The login process requires that the private key (id_dsa) and the public key stored on the remote server (authorized_keys) are stored on a folder that can only be accessed by the corresponding users. So I need to do the following:

[surfer@kazekiri ~]$ chmod -R 700  .ssh

and, also on the remote server:

[mach5@avenger ~]$ chmod -R 700  .ssh

Aaand, voila! The public key authetication should works.



Scheduling a move file using cron and scp
October 6, 2008, 1:21 pm
Filed under: *Nix, HP-UX, Red Hat, Ubuntu | Tags: , , , ,

So I need to automate a process where an oracle dump file is moved to a remote server, and the existing loacl file is then permanently removed. I have to make sure that:

  1. the status of copy process is reported, whether successful, or not
  2. The remove process will only start if the copy process is successful
  3. The copy process is unattended, so a public key authentication must be available between the local and remote server. I have guide regarding a public key authentication for ssh/scp somewhere around here

This is how the script looked like:


#!/sbin/sh
date >> /backup/movedump.log
tgl=$(date +”%y-%m-%d-%M”)
cd /backup
if [ -f /backup/dumpf* ];
then
scp dumpf* kirim@172.16.2.15:/opt/data/dump/backup/
STAT=$?
echo “$tgl-S1:dump file succesfuly moved” >> /backup/movedump.log
else
STAT=1
fi
if [ $STAT -eq 0 ];
then
rm dumpf*
echo “$tgl-S2:local dump file deleted” >> /backup/movedump.log
else
if [ $STAT -eq 1 ];
then
echo “$tgl-E1:no dump file on source directory, no action taken” >> /backup/movedump.log
else
echo “$tgl-E2:dump file move process exit with code $STAT, remove process not executed” >> /backup/movedump.log
fi
fi

The code above will check whether the dumpfile exists or not. If the file doesn’t exist, the variable STAT will be given a value of 1. If the file exist, it will begin scp process to the remote server. Scp process provide us with several report codes that is stored on “$?”. If the copy process is successful, the value of “$?” is 0, other if it’s not. That value is then stored on the variable STAT

The process then proceed based on the value inserted to the variable STAT

  1. If STAT=0, the copy process is successful, the script will proceed to remove the dump file on the local server
  2. if STAT=1, the script did not find a dump file to transfer to remote server
  3. if STAT value is other than 1 and 0, the transfer process has failed

All of the step taken by the script is logged on file movedump.log

The next step is to make sure the script is executed everyday, automatically. For me, it is scheduled to run 4 pm, everyday:.

$crontab -e

Then put this line:

00 16 * * * /backup/movedump.sh

With this, the script will be executed every day at 4 pm sharp.

Done!



Interface Bonding / Teaming on Red Hat Enterprise Linux
May 1, 2008, 8:52 pm
Filed under: *Nix, Red Hat

Interface or NIC bonding or also called teaming, is to use two or more NIC in conjunction using round robin scheduler. The machine will only recognize one interface, while packet are sent from two slave interface. (more…)



Moving /usr & /var to another partition
February 2, 2008, 12:49 pm
Filed under: *Nix, Red Hat

We recently bought a couple HP blade servers. Two of the server have RHEL AS 4 as OS, and will be hosting our HR application. After one and a half day session of up2date, the two RHEL installation are updated.

..And came the bad news. Apparently the HR application requires a much larger space for installation than previously thought. So I was told to do anything necessary to make the requires space auto-magically exist.. sort of..

My plan is to move some folder from their respective partitions, and merge the into one single large partition. The only available option for that is to move my /usr and /var to “root” (/), user the space for the installation. The merging part can easily be done using LVM2. That wasn’t the case for migrating /usr /var. To do that I have to make sure that all security settings and symlink are preserved.

Now, after searching for sometime on google for hints, this is what I do: (more…)