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.

Recovering From a Corrupt NetInfo Database on OSX.4

I managed to corrupt my NetInfo database on an OS 10.4 server a few weeks ago by not cleanly unmounting the drive after booting from DVD and resetting the admin password. Long story short, this left me with no users on the system at all. With no users, I could not log in to create one, so I had to blow away the NetInfo database and restore it to factory defaults. This should only be done when you only have a small number of users, and don’t mind having to re-create them. Only the user account information is deleted, and the user directory is retained, but you will have to manually add any users you may have back into the system through the GUI, making sure that the new “user” references the old “user’s” account directory.

If you have more than just one or two users, you should use the procedure to recover from one of your NetInfo database backups. A backup of your this database is made at 3:15 every day so long as the computer is running. It is stored in “/var/backups/”, and here are some instructions on how to recover it from it. If, however, you don’t care about re-adding users, and simply want to get into your system quickly, or if you don’t have a backup to restore from, here is how you can do it:

BEWARE: THIS WILL COMPLETELY ERASE ALL USER ACCOUNT INFORMATION FROM THE SYSTEM!!! You are warned.

1) Start by booting your Mac into single user mode. To do this, hold down both the “Apple” and the “s” keys as the system boots.

2) The system will have mounted the “/” filesystem read-only to protect against data loss. To get “/” mounted read-write, we have to run two commands:

# /sbin/fsck -fy

# /sbin/mount -uw /

3) Now “/” is mounted read-write, so we can start with the real work. First, rename your existing NetInfo database to something else so the OS will not see it on the way up:

# mv /var/db/netinfo/local.nidb /var/db/netinfo/local.nidb.bad

# mv /var/db/netinfo/network.nidb /var/db/netinfo/network.nidb.bad

4) Next, remove the “.AppleSetupDone” file so the OS will kick you back into the installer upon boot and you can recreate your users.

# rm /var/db/.AppleSetupDone

5) Finally, reboot your system and recreate your users, making sure they are pointed towards their existing account directories.

# reboot

RHEL useradd Syntax

Unlike other flavors of UNIX, RHEL does not have a command like adduser which walks you through the process step-by-step, so you have to remember the four flags useradd requires, and in what order it expects to receive them. Since I don’t manually add users unless I’m installing a new server, I don’t run the command enough to remember the syntax… It’s basically the same as it is on Solaris.

useradd -g group -c 'User Name' -d /path/to/home/directory -s /bin/bash username

Quick Start Guide for Asterisk

Asterisk is a complete open source software-based IP PBX solution that runs on a variety of platforms. It supports VOIP in several protocols, and can seamlessly integrate with almost any standards-based telephony equipment using relatively inexpensive hardware.

This guide is a quick-start set of notes that should help you get the Asterisk service up and running with the web-based graphical user interface. Much of this was taken from the various README files that come with the software download, but I thought it would be nice to have the directions all in one place so that I don’t have to search for them in the future. I did this on a new RHEL 5 install. I would imagine that the same procedure should work on most Linux distributions.

Configuration and implementation of Asterisk is fairly complex and is beyond the scope of this document. I should also say this this guide does not include directions for installing and configuring other Asterisk related software that is required to integrate with telephony equipment.

Enough disclaimers… Let’s get started.

  • Download the latest source package of Asterisk, untar it and CD into the newly created directory.
  • Run “make
  • Run “make install
  • Run”make samples” (Doing this will overwrite any existing config files you have, so don’t do it if you are upgrading or something like that)
  • Run “make config” (This creates the `/etc/rc.d/init.d/asterisk’ file so you can crontroll the
  • asterisk service with chkconfig and service.)

You are now done installing Asterisk. Now let’s install the GUI.

  • Download the latest source package of the Asterisk GUI client, untar it and CD into the newly created directory.
  • Run “make
  • Run “make install
  • Run “make samples” This installs the sample configuration files. Again, don’t do this if you are upgrading because it will overwrite your existing files.

Now let’s configure it.

You need to edit a few Asterisk configuration files to enable the GUI

1) In /etc/asterisk/http.conf:

        [general]
        enabled = yes
        enablestatic = yes
        bindaddr=xxx.xxx.xxx.xxx (The IP address of your Asterisk server)


2) In /etc/asterisk/manager.conf

        [general]
        enabled = yes
        webenabled = yes


3) Create an appropriate entry in manager.conf for the administrative user

        [admin]
        secret = YourFavoritePassword
        read = system,call,log,verbose,command,agent,config
        write = system,call,log,verbose,command,agent,config


4) Run “make checkconfig

Look for the following lines… They will tell you how to get to your GUI.

  * GUI should be available at
  * http://xxx.xxx.xxx.xxx:8088/asterisk/static/config/cfgbasic.html

  * Before using the GUI, Please visit the install page at
  * http://xxx.xxx.xxx.xxx:8088/asterisk/static/config/setup/install.html 


5) We should be all set Let’s start or restart asterisk:

Run “/sbin/service asterisk restart

6) Lastly, grab a web browser and go to your install page. It should look something like this:

http://xxx.xxx.xxx.xxx:8088/asterisk/static/config/setup/install.html

Configure it up and have fun with your new Asterisk server.

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.

Setting Up The Automounter Service on RHEL

Mounting filesystems in RHEL is pretty straightforward and easy. Occasionally, however, you will not want the filesystem to remain mounted all the time, but rather to automatically mount for a set period of time only when it is needed. Because of networking overhead, and the general unreliability of networks, NFS mounts are a good example of when this can be especially useful.

In order to manage the automatic mounting and unmounting of filesystems on RHEL, we use the Automounter service. Here is how.

First, The main configuration file is “/etc/auto.master”. It should look something like this:

#
# $Id: auto.master,v 1.3 2003/09/29 08:22:35 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc  /etc/auto.misc --timeout=60
#/misc  /etc/auto.misc
#/net   /etc/auto.net


Let’s assume that we want to set up an NFS mount on “/misc/backups”. We would first create an entry in this file that looks something like this:

/misc   /etc/auto.misc --timeout=120


This tells the autofs service that we want to use it to manage mounts from within “/misc”, that the configuration file is “/etc/auto.misc”, and that it should disconnect after 2 minuets of inactivity.

Now, let’s edit the “/etc/auto.misc” file. The file has three columns: the mount point from within the /misc directory, the options for mounting the filesystem, and the filesystem to be mounted. It also includes the remote server’s name since we are using NFS. It should look something like this when you are done:

#
# $Id: auto.misc,v 1.2 2003/09/29 08:22:35 raven Exp $
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

cd              -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
backups         -rw,soft,intr remoteservername:/path/to/nfs/export

# the following entries are samples to pique your imagination
#linux          -ro,soft,intr           ftp.example.org:/pub/linux
#boot           -fstype=ext2            :/dev/hda1
#floppy         -fstype=auto            :/dev/fd0
#floppy         -fstype=ext2            :/dev/fd0
#e2floppy       -fstype=ext2            :/dev/fd0
#jaz            -fstype=ext2            :/dev/sdc1
#removable      -fstype=ext2            :/dev/hdd


Next, we create the directory for the mount point in /misc:

# mkdir /misc/backups

And finally we restart the autofs service:

# service autofs restart

That should pretty much do it. If you don’t have autofs configured to start up, you can use chkconfig to enable it. “/misc/backups” will now be mounted whenever a user or process attempts to access data on it, and it will be automatically disconnected after 120 seconds of inactivity. Last, but not least, you can always confirm that it is running with the “service” command:

# service autofs status

As always, change the details to match your own requirements.