Blog O' Matty


How to expand you technical book library on the cheap

This article was posted by Matty on 2011-09-28 19:07:00 -0400 -0400

I recently got the opportunity to start supporting a number of AIX systems, and being an AIX newbie the first thing I did was ask myself how can I learn everything there is to know about AIX (more to come on this topic tomorrow)? Being a readaholic, I decided to wander over to Amazon to see which AIX books were available.

After 10 minutes of searching and reading reviews, I ended up snagging a copy of AIX 5L Administration for $5. That $5 also included shipping! This led me to start looking at the “used” link associated with various other books I wanted and the used prices were typically at least 50% off the price Amazon lists for a new book (the book I got was unused, which is new to me!). This may be old news to everyone else, but I like the fact that I can now expand my technical library on the cheap! Thought I would pass this on to my fellow geeks.

Getting VMWare tools to configure on Solaris 10 guests

This article was posted by Matty on 2011-09-28 08:25:00 -0400 -0400

I built out a Solaris 10 update 10 guest on a vSphere 4.1 machine this past week. When I went to configure VMWare tools I received the following error:

$ /usr/bin/vmware-config-tools.pl

Initializing...

Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
Guest memory manager: done


Unable to create symlink "/mnt/hgfs" pointing to file "/hgfs".

Execution aborted.

After doing some debugging I noticed that /mnt is used temporarily and if you happen to be using it (or if volfs is) the installer will fail. I temporarily stopped volfs and unmounted a device that was mounted on /mnt and the installer completed without issue. Figure I would share this with others so you don’t have to waste your time debugging this problem.

Remounting Linux read-only file systems read-write

This article was posted by Matty on 2011-08-29 09:53:00 -0400 -0400

I’ve been paged countless times to investigate systems that have gone off the air for one reason or another. Typically when look into these issues the server has crashed unexpectedly (bug, hardware, etc.) and rebooted in an attempt to get a fresh start on life. On occassion the box won’t boot due to a misconfiguration or inconsistent file system, and the server will be left with a read-only root file system and no network connectivity.

Fixing this is pretty easy. If possible I will add a 1 to the end of the boot line to boot the kernel into single user mode. If that works I can fix the issue and then allow the box to boot up normally. If the root file system is mounted read-only, I will use the mount command’s remount option to mount it read-write:

$ mount -o remount,rw /

Once you can write to the file system you should be able to write out changes to the file system to correct the issue that prevented the server from booting. Viva la remount!

Scanning for new LUNs on Linux servers

This article was posted by Matty on 2011-08-26 13:56:00 -0400 -0400

Storage management, the joys! Storage administration is one of those tasks that every admin does, and depending on your growth it may be something that consumes a lot of your time. If your servers are connected to a Fibre channel or iSCSI SAN, you probably need to periodically poke your systems to see new storage that is made available to them. There are several tools that can be used to do this. QLogic provides the scli utility and a rescan shell script, the sg3utils package comes with the rescan-scsi-bus.sh script and you can always roll your own script to do this.

I use a mix of all of the tools above. On older systems I use the QLogic scli utility, on servers that have Emulex adapters or recent Operating Systems I use rescan-scsi-bun.sh, and in other cases I use the following script to prod the sysfs scan and issue_lip entries directly:

#!/bin/bash

SLEEP_INTERVAL=300

echo "Scanning all fibre channel host adapters"

for i in `ls /sys/class/fc_host`; do
    echo "Rescanning /sys/class/fc_host/${i}:"

    echo " Issuing a loop initialization on ${i}:"
    echo "1" > /sys/class/fc_host/${i}/issue_lip

    echo " Scanning ${i} for new devices:"
    echo "- - -" > "/sys/class/scsi_host/${i}/scan"

    echo "Sleeping for ${SLEEP_INTERVAL} seconds"
    sleep ${SLEEP_INTERVAL}
done

This is the nice thing about Linux. There is a tool to do just about everything, and if there isn’t one available you can usually cobble something together in short order to do what you need. Isn’t life as a Linux admin grand! :)

KVM makes its way to Illumos

This article was posted by Matty on 2011-08-15 18:28:00 -0400 -0400

I’ve been a fan of KVM for quite some time, and gave a talk on it a while back. The KVM design always made sense to me, and I tossed Xen out the window the minute I started using it. Today I was pleasantly surprised to see that several folks from Joyent ported KVM to Illumos! This is way cool, and I can’t wait to give this a spin! Hopefully libvirt integration and various goodies are there. :)