X11 Forwarding Broken on Solaris

If you’re running Solaris 8 or 9 and an upgrade results in broken SSH X11 forwarding, the problem may be Sun’s socfs bug. The symptom will be SSH’s failure to set the $DISPLAY variable and an error in your system log looking something like this:

Jun 3 09:40:24 servername sshd[26432]: [ID 800057 auth.error] error: Failed to allocate internet-domain X11 display socket.

To fix this, you can either install Sun’s latest socfs patch for your version of the OS, or simply force sshd into IPv4 mode by doing the following:

Edit you sshd_config file, adding the following:

# IPv4 only
ListenAddress 0.0.0.0

Edit your sshd startup script to issue a “-4″ to sshd on start:

case “$1″ in
’start’)
echo ’starting ssh daemon’
/usr/local/sbin/sshd -4
;;

Restart sshd, and that should pretty much do it… Enjoy.

Sun Project Blackbox - Datacenter in a Can

Lots of small companies want to hire an IT department in a can… You know, the ones who hire only one person to run their Linux servers, code their websites, architect their networks, support their users and order more printer toner. It’s a hard job, but it’s pretty common to see them advertised. What I never dreamed I would see is an entire data center in a can… Literally, in a can… Or at least a shipping container, which is really not that far off.

Leave it to Sun though. Not only have they packed an entire datacenter into a shipping container, they have packed a really good datacenter into a shipping container. Complete with integrated power, cooling, fire suppression, cable managment and redundant everything, this little server room-in-a-box has it all. They even showed off how tough it is by putting it through an earthquake!

All told, I really like the idea of my brand new datacenter rolling in on the back of a tractor-trailer truck. It kinda reminds me of the setup the bad guys had in latest Die Hard movie. I just hope nobody buys one and hires only one person to run it.

Solaris 8 SAN Frustrations

Getting Solaris 8 to light up a Qlogic QLA2310 Fibre Channel card using the SUNWqlc and SUNWqlcx drivers can be frustrating enough, but the headaches are only beginning if you want to connect it to a SAN and you don’t have all the right packages installed.

Last week, I installed the QLA2310 in a Sun Fire V210 running Solaris 8. I installed the latest versions of SUNWqlc, SUNWqlcx and SUNWsan. After doing a reboot -- -r, the system came up and attached the driver to the card. I zoned it in the fabric and logged into Navisphere, where the WWN showed up, but neither Power Path or the Navisphere host agent could communicate with the CLARiiON. I also could not see any of the LUNS I had presented.

I thought it was strange that the CLARiiON could see the host, but the host could not see the CLARiiON.

I ran:
luxadm -e port
Which returned:

Found path to 1 HBA ports

/devices/pci@1d,700000/SUNW,qlc@1/fp@0,0:devctl                    CONNECTED

Clearly, it could see the HBA.

I ran:

ls -l /dev/cfg
total 8
lrwxrwxrwx 1 root  root   38 Nov 30 14:31 c0 ->
../../devices/pci@1e,600000/ide@d:scsi
lrwxrwxrwx 1 root  root   39 Nov 30 14:31 c1 ->
../../devices/pci@1c,600000/scsi@2:scsi
lrwxrwxrwx 1 root  root   41 Nov 30 14:31 c2 ->
../../devices/pci@1c,600000/scsi@2,1:scsi
lrwxrwxrwx 1 root  root   48 Dec  4 13:49 c3 ->
../../devices/pci@1d,700000/SUNW,qlc@1/fp@0,0:fc

The card was C3… This becomes useful later when we have to config it.

I ran:
cfgadm -al -o show_FCP_dev
Which retuned:
cfgadm: Configuration administration not supported

There it was… I didn’t have the complete SAN package installed. I hadn’t done this in a few years, so I had forgotten all the packages I had to add to get the Sun SAN package working correctly… There are many.

Happily, Sun has now packaged them in a nice “SAN_4.4.12_install_it.tar.Z”, which you can get from their website if you have a username. It installs everything for you in the right order.

The only thing left to do was another reboot -- -r and run cfgadm -c configure c3 to config the device. After this everything started working nicely.

Problems Registering Solaris Hosts With QLA 2310 HBAs in Navasphere

Sun Microsystems likes the QLA 2310 Fiber Channel HBA. It’s only a 2Gig card, but it works with the Sun native driver, which makes it wonderful for us Solaris Administrators. Unfortunately, it does not integrate perfectly with EMC CLARiiON SANs because it does not register properly with Navasphere. Even if you manually register the host, the LUNs will not be presented to the host because the agent can’t pass commands to the array.

To remedy this situation on my Solaris 8 host, I used the following procedure:

Edit the /etc/system file and add the following line:

set fcp:ssfcp_enable_auto_configuration=1

Next, I rebooted my Solaris host with the “-r” flag:

reboot -- -r

Next I checked Navisphere to make sure my paths have logged in. They were, so I logged into the Solaris host and ran the following commands:

cfgadm
devfsadm
format

I then saw the storage that was presented to my host. Finally, I restarted the Navisphere agent and started using my new LUNs.

Another Used Sun Fire T2000 For Sale

STATUS: Sold

We have another used Sun Fire T2000 server. Since the first one was sold in less than 24 hours, I thought it would be nice to offer this one up to this site’s readers as well. It has never been used in production and is in like-new condition.

  • Sun Fire T2000 Server
  • 8 core 1.0 Ghz UltraSPARC T1 processor
  • 16GB DDR memory (16 1GB DIMMs)
  • 2X 73GB 10,000PRM disk drives
  • 1X DVD-ROM/CDRW drive
  • Serial Number: 0639VB0053
  • Starting Bid: $13,000

If you are interested, or would like any further information, please leave a comment or visit this link. Our university campus policy states that big ticket items like this must be sold using an auction style bidding system. I should add, however, that most items in the surplus system are sold with only one bid, so please don’t let the process discourage you if you are at all interested.

Used Sun Fire T2000 For Sale

STATUS: Sold

The University where I work is currently selling a used Sun Fire T2000 server. Since many of this site’s readers are fellow Solaris administrators, I thought it would be nice to offer it up to them. It has never been used in production and is in like-new condition.

  • Sun Fire T2000 Server
  • 4 core 1.0 Ghz UltraSPARC T1 processor
  • 8GB DDR memory (16 512MB DIMMs)
  • 2X 73GB 10,000PRM disk drives
  • 1X DVD-ROM/CDRW drive
  • Serial Number: 0617NNN1FY
  • Starting Bid: $6,000

If you are interested, or would like any further information, please leave a comment of visit this link. Our campus policy states that big ticket items like this must be sold using an auction style bidding system. I should add, however, that most items in the surplus system are sold with only one bid, so please don’t let the process discourage you if you are at all interested.

Sun Happy Meal Card???


So we all know that Sun is a cool company with a great sense of humor, but they really outdid themselves when they named this combination SCSI / Ethernet card Happy Meal!

It’s a pretty old card, and honestly I had forgotten that I had installed it in my test system until I setup REL 3 on it last week. For some reason, the Red Hat installer wanted to remove the device before adding it back in. Luckily I had my camera with me when I saw the hardware detection message pop up.

Solaris Automounter

Whenever you’re using NFS mount points, it’s really nice to use some type of automounter. Linux and FreeBSD use AMD to accomplish this, but Solaris uses automountd, and it’s fun and easy to use… Here is an example of a configuration that will automatically mount an NFS share and unmount it after 5 minuets of inactivity.

We have a system called micky which has an NFS point shared to a system called minny as /shareme.
We can see that it is set up in the /etc/dfs/dfstab file on micky:

share -F nfs -o ro=minny.yourdomain.com -d “NFS ShareMe” /shareme

The above will share the directory read-only. If you would like to map the directory as root and be able to write to it, the command would look more like this:

share -F nfs -o rw,root=minny.yourdomain.com -d “NFS ShareMe” /shareme

You can run the share command on micky to check to make sure it is shared:

# share
- /shareme ro=minny.yourdomain.com “NFS ShareMe”

If it’s not shared, run shareall to share it:

# shareall

Now, jump on over to minny and add the following line to /etc/auto_master:

/- auto_direct

Automountd will now look in /etc/auto_direct for direct mount points.

Next edit /etc/auto_direct and add the following line:

/micky-shareme micky:/shareme

Now, create the directory for the NFS mount point on minny:

# mkdir /micky-shareme

Finally, run the auromount command on minny to inform the daemon of the changes:

# automount

That should do it… Have fun with your new automount NFS share.

More information on this can be found here

Solaris Systems With Multiple Names Have Trouble Mounting CD’s

If you have a Solaris box with multiple names, you might have trouble mounting CD’s if the primary name is different from the one you gave the machine at install time. This is because of the CRAZY way Solaris goes about auto-mounting its optical media.

Here is a 10,000 foot view of how Solaris automounts a CD:

The disk is inserted
vold checks and sees that there is a disk inserted
vold connects to inetd, which in turn, starts smserverd
smserverd mounts the disk and all is right with the world

All this depends, however, that:

1) Vold is running
# /etc/init.d/volmgt start

2) This line is not commented in /etc/inetd.conf
100155/1 tli rpc/ticotsord wait root /usr/lib/smedia/rpc.smserverd rpc.smserverd

And 3) The current hostname of the machine is listed in /etc/net/ticotsord/hosts.

This file should looks something like this:

——-SNIP——
#ident “@(#)hosts 1.2 92/07/14 SMI” /* SVr4.0 1.2 */
# RPC Hosts
micky micky
minny minny
——/SNIP——

Micky and minny, of course are the hostnames you have given the machine. You can pretty much just make it mirror the /etc/hosts file.

Once these three criteria are met, a machine with multiple names should be able to automount a CD with no problems.

Rebuilding the Solaris Device Tree

If you ever shift around any bootable drives within a Sun Solaris box, you may find that either the device names (cxtxd0sx) do not follow the disk position within the server, or, the system just fails to boot because it can’t mount the other disk slices.

Let’s assume you are booting off of target 8 (c1t8d0s0), but wish to move that disk to the appropriate slot to make it target 0 (c1t0d0s0). You have changed all references in the /etc/vfstab file to reflect the new disk position, physically moved the drive from the target 8 slot to the target 0 slot, and changed the boot-device variable within the OBP to the appropriate disk. You should now be all set to boot from the disk in target 0, right?

Not quite yet.

Solaris creates a device tree with links to all the disks it knows about, and these don’t get rebuilt upon reboot. If you simply tried to boot the disk now in target 0, it would find the kernel, but fail to mount any of the other filesystems, because these device links are still pointing to the disk slices on target 8.

In order to boot off the drive in the new position, you will have to remove these device links and rebuild them. Here is how we do that:

1. Insert a Solaris 8, 9 or 10 cd into the hosts cdrom

2. From the ok prompt, enter boot cdrom -s

ok> boot cdrom -s

3. fsck the boot disk

# fsck -y /dev/rdsk/c1t0d0s0

Remember that your boot disk may differ than the example above. Since in our example above, we have put the disk into the slot for target 0 (c1t0d0), that is what we are using here.

4. Mount the root slice on /mnt

# mount /dev/dsk/c1t0d0s0 /mnt

Note that your root slice may differ than the above example.

5. Move path_to_inst

# mv /mnt/etc/path_to_inst /mnt/etc/PATH_TO_INST_ORIG

6. Remove all old device links

# rm /mnt/dev/rdsk/c* ; rm /mnt/dev/dsk/c* ; rm /mnt/dev/rmt/* ; rm
/mnt/dev/cfg/c*

7. Rebuild path_to_inst and devices

# devfsadm -r /a -p /mnt/etc/path_to_inst

8. Unmount the root slice and reboot

# umount /mnt ; init 6

You should now be able to boot off your old drive in its new slot.

SUNWqlc Drivers Don’t Work With thw QLogic QLA2340 HBA


The Qlogic QLA2340 HBA is a 64-bit, 133MHz PCI-X to 2 Gb Fibre Channel adapter. It’s a cool card, but it doesn’t work with the standard SUNWqlc and SUNWqlcx drivers. You have to remove these driver packages and install the one directly from QLogic in order to get it working.

# pkgrm SUNWqlc
# pkgrm SUNWqlcx

Now, download the QLogic drivers (qla2300.sparc_pkg.Z) HERE. Or HERE if you are not using SPARC Solaris.

Then, it’s just a matter of unzipping them, and installing them using the instructions that come with the drivers. The only bummer is that you won’t be able to use the luxadm commands anymore.

Hopefully this has been helpful. Have fun with your speedy new HBA.

Solaris Virtual Network Interfaces

Sometimes it’s useful to create a virtual network interface on your Solaris box, so that you can associate multiple IP addresses with the same host and not have to go through all the trouble of buying another NIC.

Here’s a quick HOWTO. Let’s assume our network card is eri0, and we want to create a virtual interface called eri0:1

Create the virtual interface:
# ifconfig eri0:1 plumb

Configure the virtual interface:
# ifconfig eri0:1 179.164.83.161 netmask 255.255.255.0 broadcast 179.164.83.255

Check to make sure it worked:

# ifconfig -a

lo0: flags=1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
eri0: flags=1000843
mtu 1500 index 2
inet 179.164.83.160 netmask ffffff00 broadcast 179.164.83.255
ether 0:3:ba:9:63:9b
eri0:1: flags=1000842 mtu 1500 index 2
inet 179.164.83.161 netmask ffffff00 broadcast 179.164.83.255

Finally bring up your new virtual interface:
# ifconfig eri0:1 up

To make it come up on start:

create /etc/hostname.eri0:1 with hostname in it
make sure the hostname is in /etc/hosts

NOTE: The IP addresses in this story have been changed to protect the innocent.

libnnz9.so: symbol nzdsi_initialize: referenced symbol not found

So you’re running the Oracle Application Server on Solaris 8, and you’ve decided to be a good systems administrator and install the latest 8_Recommended patch cluster from SunSolve. Well, I’m very sorry to inform you that you have just broken your application server. After bouncing the system, you will most likely get the following error as OAS tries to start:

ld.so.1: opmn: fatal: relocation error: file /u01/app/oracle/product/oas_midtier_9.0.4/lib/libnnz9.so: symbol nzdsi_initialize: referenced symbol not found
opmnctl: opmn start failed

If you’re anything like me, you found this during your scheduled downtime, it’s insanely early in the morning, and you really just want to go back to bed. Well, hopefully this will help.

The first thing you want to do is (optionally) make sure you are preloading your libraries:

LD_PRELOAD=$ORACLE_HOME/lib/libclntsh.so; export LD_PRELOAD

It won’t fix the problem, but it is a good idea, and it has the added advantage of making the error go away. The server still won’t start, but the error will go away and that has to be progress, right?

To really resolve the problem, however, you have to backout SunOS 5.8 linker patch 109147-39

patchrm 109147-39

Sun Document ID: 101995 identifies the problem.

On systems with certain patches installed (109147-39 on Solaris 8), applications that reference large numbers of “delayed” loadable shared objects (where the shared objects load slowly and do not explicitly define their required dependencies), may experience start-up failure or may terminate due to an error of the runtime linker.

Sun has recognized the problem, but according to them, a final resolution is pending completion.

PHP 5.0.5 Make Install Error

After getting PHP 5.0.5 to compile on my Solaris 9 server, I got the following error when doing the make install:

ld.so.1: php: fatal: relocation error: file /u01/packages/src/php-5.0.5/sapi/cli/php: symbol xmlRelaxNGCleanupTypes: referenced symbol not found
Killed

make[1]: *** [install-pear-installer] Error 137
make: *** [install-pear] Error 2

Turns out that the Sun XML packages are stomping all over the xml2 package from http://xmlsoft.org/. Simply removing the following two packages allowed the make install to complete.

# pkgrm SUNWlxml
# pkgrm SUNWlxmlx

Solaris X86 Compatible RAID Controller

Every time I have to spec a solution using Solaris, I always have to answer a bunch of questions in meetings about why Sun is so costly compared to Dell servers. Usually the reason for the higher price is not the servers (especially with X86 sun), but rather the storage. Since Sun does not offer a system with a RAID card, you always have to purchase a high-end disk enclosure that is capable of performing the RAID functions unless you want the performance degradation that comes with software RAID.

The good news is that there is finally a really nice PCI RAID card that works with Solaris! The bad news is that it only works with X86 Solaris, and Sun only goes so far as to say that it is”reported to work“.

Anyhow, no matter. Here is the deal:

According to Sun Big Admin, the Mylex Accelaraid 150 is reported to work with Solaris 9 04/04 to Solaris 10 03/05 (read Solaris 9 and 10 X86). The firmware and bios on the card needs to be: BIOS Version 4.10-50; Firmware 4.08-37.

Pity that there still does not seem to be a RAID controller that works with SPARC hardware. If someone would come up with that, it would make my life as a Solaris administrator a whole lot easier.

Next Page »