Archive for the ‘Unix’ Category

About errors setting up SASL/StartTLS in Postfix under Ubuntu

Sunday, August 29th, 2010

In the process of setting up SASL and StartTLS under Postfix, I got this in the log:

“warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory”

It took me some minutes to figure out what was wrong. Obviously it has to do with postfix not being able to connect to the saslauthd server. The question is just, why? I went with a hunch of permissions … and wasted some time, so if you get the error, here is what solved it for me. In

/etc/default/saslauthd

You have to remove the default line and let saslauthd create its file under the postfix dirstructure. That is

> OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd
< OPTIONS="-c -m /var/run/saslauthd"

And then

/etc/init.d/postfix restart

Not rocket science, but I chased a wild goose looking at permissions for 15 minutes before figuring out what was wrong.

Friday, August 13th, 2010

If you get this, trying to execute basic PBS commands

$ qstat -a
qstat: End of File

it is a permission problem. Basically you have to do some queue/server adminstration using qmgr as a user who have admin access already:

$ qmgr
set server acl_users += <username>
set queue <queuename> acl_users += <username>

Ubuntu Headless installation (serialport)

Sunday, August 1st, 2010

I had to install ubuntu 10.04 server edition over the serialport. This is doable, but requires a keyboard to be attached and keys pressed blindly in the right sequence. Here is a little cookbook on what to press:

  1. Run a terminal client on the serial console device. Configure the serial port to either the failsafe 9600 n-8-1, Hardware Flow Control=NONE, or to the much speedier 115200 n-8-1, Hardware Flow Control=NONE. The latter should be used only if the serial port in both ends support this kind of speed.
  2. Boot the server with the ubuntu 10.04 server install media in the CD/DVD drive, or from a USB ke
  3. When it has booted into the installation menu (takes a couple of seconds), then do this
    • Press ‘Enter’ (for language selection)
    • Press ‘F6′ (Other Options)
    • Press ‘ESC’ (to close the Other Options Menu)
    • Press ‘Backspace’ 3 Times (to delete “– “)
    • Type ‘console=ttyS0,115200n8 — ‘
    • Press ‘Enter’
  4. Installation willl continue, ouputting the dialogs on the serial device.

You should ofcourse replace ttyS0 with another serial device, if applicable. I am at a loss as to why I have to do this in order for me to install Ubuntu Server 10.04 over the serial port in 2010!

How to use a broken IBM Thinkpad T43 for something useful using puppy linux.

Wednesday, July 21st, 2010

I recently got my hands on a IBM Thinkpad T43. Unfortunately it was broken. More specifically the connector between the mainboard and the harddrive had problems.

IBM T43 connector (broken)

I googled a bit and discovered, that this was a known problem. The laptop worked fine, if I put pressure on the right spot on the case of the Thinkpad. Otherwise it would not detect and/or spin up the harddrive. I tried to fix it by re-soldering the connector and using some two-component glue to fixate the connector. I did not succeed :-/

So then what? Throw out the laptop? Or? … I decided to make a project out of it.

A laptop without storage is useless. Due to the broken connector, I could not use a harddrive. I did not want to use a cdrom as it is a slow medium. That left me with a USB flash drive as the only option. It would be a clumsy solution just to plug a USB flash drive into the laptop and be done with it, so I chose to solder a USB flash directly onto the mainboard.

First I stripped a standard 1GB USB Flash from its case and detached the PCB from the USB connector using a soldering iron

Stripped USB flash

After that I soldered 5 wires onto the PCB of the laptop and used one of the holes in the PCB used for assembly as a pass through hole. I initially used 4 wires as the USB connector only had 4 pins, but that was not enough. More on that later.

Wires soldered onto mainboard

Having soldered the wires onto to the mainboard, I now needed to solder the other ends onto to the PCB of the USB flash. That went fairly smoothly

Wires soldered onto flash

Before powering on anything, I used a multimeter to check for bad solderjoins and shorts. I found neither.

Checking for shorts using digital multimeter

Luckily I had a Linux based rescue distribution installed on the USB flash drive, so I just booted that to see if the operation on the T43 was a success. As can be seen below it worked just fine. Well, sort of fine, but more on that in a moment.

Testbooting the flashdrive

Almost done now. I just needed to assemble the laptop again, leaving the USB Flash inside.

Ready to wrap up

Closing the lid on the laptop, securing all the screws I had myself a working IBM Thinkpad T43. Or so I thought. When I tested the laptop thoroughly I discovered that the kernel ring buffer was filled with

hub 2-0:1.0: over-current change on port 1
hub 2-0:1.0: over-current change on port 2

That cryptic message just states that the USB device is drawing more power than it is allowed to by the USB specification. Or more precisely that the port on the USB hub inside the laptop is delivering more power than it was supposed to. It first that puzzled me. Then I read about the USB connector and realized my fail. The 4 wires of the USB connector consists of  VCC, GND, Data+ and Data -. Given both VCC and GND was part of the 4 pins I only soldered 4 pins. After seeing the problems above, I investigated the matter and found a reference to OverCurrent (OC) protection on the header itself. I thus soldered the 5th pin and the problem went away.

I now had a working IBM Thinkpad T43 with 1GB of flash storage. What should I use it for? I decided to use it for puppy linux. Primarily for two reasons.

  1. It appeared to be tailor made for small harddrives
  2. I had never tried it before

I downloaded the 106MB large iso file and burned it onto a CDrom. Now I faced the problem of installing puppy linux onto my flash without using a cdrom drive (as I found the laptop without one). Puppy linux made it quite easy. Using another computer I booted the cdrom. Installed puppy onto a spare flash drive. Booted that flash drive in my IBM Thinkpad T43 and pressed “install” once more, installing it onto the “internal” flash drive.

Booted into puppy linux

All done. Actually it takes quite some time to boot the machine, but that is primarily due to the bios insisting on searching for a harddrive. Unfortunately the IBM BIOS lacks the option to stop it from doing that. After the system is loaded however, it is lightning fast. Way faster than my IBM Thinkpad T400. This is due to the fact that puppy linux loads everything into a ramdisk, so starting program does not require any moving parts to be ready. Programs starts instantaneously. The whole experience just proves (once more), that the computers of today is severely I/O limited, but hopefully SSD will change that real soon now(tm)

Certfied CSA – HP-UX 11i v3

Thursday, June 17th, 2010

Then I got around to get certified in HP-UX. I passed with a score of 80% in 75 minutes at Atea using a standard Prometric test. I had hoped on a little bit more, but I was under a lot of pressure work wise up until the test, so I did not get around to rehearse as much as I wanted to.

I can recommend ‘HP Certified Systems Administrator – 11i V3, 3rd Edition‘ by Asghar Ghori as a help on  getting your CSA.

Next up is HP-UX CSE – High Availability.

Non-HP harddrives in an HP MSA20

Thursday, March 11th, 2010

A customer asked me if it was possible to use non-hp drives in an HP MSA20 as they costed a lot less than HPs own drives. I honestly said that it would require a POF. The customer accepted the initial expense of single 1TB SATA drive.  I fired up hpacucli to figure out what was up and down on this

=> ctrl ch="mirror" show config detail
....
....
physicaldrive 1:1
Box: 1
Bay: 1
Status: OK
Drive Type: Data Drive
Interface Type: SATA
Size: 1000.2 GB
Firmware Revision: HPG1
Serial Number: 9QJ2B4GD
Model: HP GB1000EAFJL
SATA NCQ Capable: False

As HP does not make harddrives, but uses OEM drives with custom firmware I had to figure out what types of drives was in there. The easiest solution would be to shut the box down and pull out a drive to inspect. Having dealt with HP quite a lot, I know that they also remark the drives, so I would probably not be able to see what types of drives was in there, leaving me with guessing if I choose to go that route.

Instead I opted for figuring out what type of drive it was likely to be based on the firmware.  I googled a bit and found that the MSA20 could support up to 1TB disks. A bit more googling yielded this advisory from HP about upgrading firmware on Seagate drives to HPG6. Based on the age of the MSA20 in question, the age of the 1TB HP disks we already had in them, I decided it was most likely to be Baracuda 7200.11 drives that HP utilized for this and thus we ordered one of those.
Drive arrived. We put it in. Rescanned and lo and behold:

physicaldrive 1:6
Box: 1
Bay: 6
Status: OK
Drive Type: Data Drive
Interface Type: SATA
Size: 1000.2 GB
Firmware Revision: CC38
Serial Number:             9VP4D0ZA
Model: Seagate ST31000528AS
SATA NCQ Capable: False

A non-HP drive working. We have now placed an order for 19 x 1TB Seagate drives.

Your millage may wary if you try this. It is also worth mentioning that it would be an option to test non-seagate disks and/or bigger disks. Beware of the heat and power requirements though! HP themselves only sells the MSA20 with upto 1TB disks.

Finally for the record, it should be state that this was on an MSA20 with this firmware level:

MSA20 in mirror
 Bus Interface: SCSI
 Serial Number: PAAAC0PMQTR7V0
 Chassis Serial Number: E01RMLJ17M
 Chassis Name: mirror
 RAID 6 (ADG) Status: Enabled
 Controller Status: OK
 Chassis Slot: 2
 Hardware Revision: Rev A
 Firmware Version: 2.08
 Rebuild Priority: Medium
 Expand Priority: Medium
 Surface Scan Delay: 3 secs
 Cache Board Present: True
 Cache Status: OK
 Accelerator Ratio: 50% Read / 50% Write
 Drive Write Cache: Disabled
 Read Cache Size: 56 MB
 Write Cache Size: 56 MB
 Total Cache Size: 112 MB
 Chassis Slot 2 Battery Info
 Battery Pack Count: 2
 Battery Status: OK
 Host Bus Adapter Slot: Slot Unknown
 Host Bus Adapter Port: 1
 SATA NCQ Supported: False

Unstartable volume in vxvm

Wednesday, February 3rd, 2010

I recently had an case, where I got

ERROR V-5-1-1198 Volume misc2prd_redo2vol has no CLEAN or non-volatile ACTIVE plexes

The plex associated with the volume was in RECOVER state. This can happend “if the plex content is out of-date with respect to the volume. This can happen if a disk containing one or more of the plex’s subdisks has been replaced or reattached”.  In my case it was caused by a failing disk, that was brought online again later.  To recover I did:

# Force the plex into offline state
sudo vxmend -g misc2prd_dg2 -o force off misc2prd_redo2vol-01
# Put the plex into stale state
sudo vxmend -g misc2prd_dg2 on misc2prd_redo2vol-01
# Put the plex into clean state
sudo vxmend -g misc2prd_dg2 fix clean misc2prd_redo2vol-01

# Start the volume
sudo vxvol -g misc2prd_dg2 startall

Virtual interfaces under HPUX 10.20

Friday, January 22nd, 2010

To define do as you (almost) would do on HPUX 11.00+

sudo vi /etc/rc.config.d/netconf
RARPD=0
INTERFACE_NAME[0]=lan2
IP_ADDRESS[0]=10.17.137.227
LANCONFIG_ARGS[0]=ether
SUBNET_MASK[0]=255.255.255.0
DHCP_ENABLE[0]=0

INTERFACE_NAME[1]=lan2
IP_ADDRESS[1]=10.17.137.226
LANCONFIG_ARGS[1]=ether
SUBNET_MASK[1]=255.255.255.0
DHCP_ENABLE[1]=0
sudo /sbin/init.d/net start

To remove it again

sudo ifalias lan2 del 10.17.137.226

Virtual interfaces under linux.

Friday, January 15th, 2010

As with other operating systems it is possible to bring multiple service ip-addresses online under one physical NIC under linux. This is just at brief howto on doing it.

ubuntu:

sudo vi /etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet static
 address 192.168.1.2
 netmask 255.255.255.0
 network 192.168.1.0
 broadcast 192.168.1.255
 gateway 192.168.1.1
# The first virtual interface
auto eth0:1
iface eth0:1 inet static
 address 192.168.1.100
 netmask 255.255.255.0
 broadcast 192.168.1.255
 gateway 192.168.1.1

After you have edited that file, issue

sudo /etc/init.d/networking restart

RHEL (Redhat)/Centos:

cd /etc/sysconfig/network-scripts
 sudo cp ifcfg-eth0 ifcfg-eth0:0
 sudo vi ifcfg-eth0:0

 cat ifcfg-eth0:0

 > DEVICE=eth0:0
 > BOOTPROTO=none
 > IPADDR=192.168.1.100
 >  NETMASK=255.255.255.0
 > GATEWAY=192.168.100
 > ONBOOT=yes

After that, issue

sudo service network restart

Problems continuing calculations on using Schrödinger checkpoint files.

Sunday, November 22nd, 2009

I recently helped identifying a problem with continuing calculations from a checkpoint file performed by desmond of the Schrödinger software portfolio. The error we got was

fail to extract simulation parameters from checkpoint file <filename>

It worked for a lot of people, but not for others. I searched high and low for differences:

  • Different unix environment settings.
  • Differnet MPI settings (intel mpi vs. gcc mpi vs. software mpi)
  • Different permission settings on home dirs
  • Differences in groupmembership between those who could continue calculations and those who couldn’t.
  • Performing the calculations on different nodes in the calculation clusters.

As it turned out it was neither of these points that was responsible for problems. Instead it was the use of non-english chars in the comment field in the /etc/password file for the users who could not continue the calculations from a checkpoint file. The fix for this is simple:

usermod -c "new name, only english chars" <userid>

Everything was fine after that.