Archive for the ‘HP-UX’ Category

Timezone for Israel on HP-UX 11i and above

Thursday, August 21st, 2008

While Linux vendors tend to maintain and publish the whole zone and daylight saving (DST) information, most legacy Unix vendors do not. Especially when it comes to such a small country such as Israel.

The following solution was tested for HP-UX B.11.31, and would probably work for all 11i versions.

Israel timezone is called IST. Israel daylight saving timezone is called IDT.

The quick and dirty:

Edit /usr/lib/tztab and append the following lines at the bottom:

# Israel daylight savings
# Added by Ez-Aton. years 2008 to 2011 only. Simple and ugly.
IST-2IDT
0 3 28 3 2008 5 IDT-3
0 1 5 10 2008 0 IST-2
0 3 27 3 2009 5 IDT-3
0 1 27 9 2009 0 IST-2
0 3 26 3 2010 5 IDT-3
0 1 12 9 2010 0 IST-2
0 3 1 4 2011 5 IDT-3
0 1 2 9 2011 0 IST-2

Save (this is a write-protected file, so force saving) and then edit /etc/TIMEZONE to include the following TZ directive:

TZ=IST-2IDT
export TZ

Assuming you sync your time using NTP, all future logins will have correct Israeli date and daylight savings.

For further information, you can check man tztab and man environ

HP-UX patch structure

Saturday, April 12th, 2008

Hunting patches for HP-UX is not a simple task. Patch IDs are different for newer versions of the same patch, meaning that a newer version of a patch will have no meaningful connection to the previous version of that patch.

I have discovered that the best option is to track the patch is by finding out what is the subsystem which has been fixed by its predecessor, and searching for this subsystem in this HP-UX patch search engine or in this entire list here.

Good luck.

HP-UX – allowed shells, and connecting FC Multipath to NetApp

Thursday, August 10th, 2006

When adding a certain shell to an HP-UX system, for example, /usr/bin/tcsh, each user set to use this shell will not be able to FTP to the machine, until there is entry in /etc/shells. The trick is that even if the file doesn’t exist, you have to create it. By default, HP-UX allows only /sbin/sh and /bin/sh shells, but as soon as you setup this file, you can allow more shells. Mind you that you have to include /sbin/sh and /bin/sh in /etc/shells, else other things might not work correctly. Taken from here.

Connecting HP-UX to SAN storage is never too simple. The actual list of actions is:

1. Install HP-UX drivers for the FC adapter

2. Map the PWWN obtained from (reading the sticker at the back of the machine, or querying the storage/SAN switch) the machine to the relevant LUNs.

3. Run “/usr/sbin/ioscan -fnC disk” and see that the new disk devices are detected.

4. Run “/usr/sbin/ioinit -i” to create the relevant device files.

A note – HP-UX might require a reboot after the initial connection. On several cases I’ve noticed that if the server was running for a while with disconnected fiber, only being connected during before startup would result in link and in SAN registration. Of course, the driver must be installed then.

If you are to connect your HP-UX to NetApp device, as we did, take a day (or more) notice and open “now” account in http://now.netapp.com. You can find documentation about HP-UX (including step-by-step), you can find the “SAN Attach Kit for HP-UX” which will make your life easier, and set of best-practice guides. Just follow these guides, and you will find it easy and simple task to do.

HP-UX and Software Raid1

Tuesday, August 8th, 2006

I have installed today an HP-UX 11i V2 on PA-Risc server, and it went quite fine. I have used the “Technical Environment” DVDs for installation, and it went fine. I was unable to find, however, the Raid1 (Mirror) tools for the LVM.

Symptoms: There is no parameter “-m” to “lvextend“. According to documentaion (or even better, HP Forum1 and HP Forum2), it is plain simple, using the lvextend. Only here I got to figure that it was part of the LVM package for Enterprise Servers.

I finally found it in the CD called “Mission Critical Operating Environment DVD 1”. Inside,in a bundle called “HPUX11i-OE-Ent”. I have selected “LVM” from the list there, installed, let the system recompile the kernel, and reboot. Then lvextend will started accepting the “-m” flag.

Per the posts described above, I run:

for LVOL in `ls /dev/vg00/l*` ; do

lvextend -m 1 $LVOL

done

Took a while, but at least it worked.

HP-UX, Oracle 8i, DataProtector, libobk.sl

Tuesday, July 11th, 2006

Imagine Omniback 4.x to Omniback 5.5 upgrade on HP-UX. Imagine you assume all existing backup procedure (and you were told there is license only for disk agent) is based on filesystem backup. Assume you know there’s Oracle installed on this server, but no relevant agent (again, filesystem only, no DB agents…)

You are cautious. You move the current /opt/omni to /opt/omni.old directory. You hash the line containing the relevant entry in /etc/inetd.conf. You are prepared.

You install the newer version by running the installer script with the flag -install da, so you would install only Disk Agent (after all, this is nothing but a client to this whole backup procedure).

You check everything, and it all seems to work correctly as far as you care or know. Suddenly, someone notices that Oracle Listener (TNS) does not listen anymore. Trying to bring it back up results in a message which seems like this:

/usr/lib/pa20_64/dld.sl: Unable to find library ‘libobk.sl’.

It doesn’t look good. You are in a little crisis. Restart to the Oracle Engine itself results in a shutdown, but it never starts back again. It doesn’t look good.

It appears that there was an Oracle Agent for Omniback installed there previously, and that you removed it uncleanly by your Disk-Agent-Only upgrade.

The solution could have been to install the Oracle Agent. It can be also related to recreating the required links, say from /opt/omni.old/lib/libbo2oracle8_64.sl or from $ORACLE_HOME/lib64/libobk.sl.backup (if there were any…) to $ORACLE_HOME/lib64/libobk.sl, the first is based on the older Omniback, the later is based on the assumption a backup was made.

The quickest solution was to install the newer agent, with the Oracle8i agent (called “oracle8”) and link: “ln -s /opt/omni/lib/libob2oracle8_64.sl ~oracle/lib64/libobk.sl” (assuming we’re running Oracle 8i on 64bit HP-UX PA-RISC).