Easy Plugin for AdSense by Unreal

Site Update

Thursday, 16. December 2010

I have finally decided to update WordPress for this site on my server and get everything going again.  Of course the template I was using doesn’t work on the new version of WordPress so I have spent the past couple of days looking at different templates but I have been having a hard time finding a good one.  I landed on this one because it is simple and it has what I need.  Let me know what you think of the new layout.


OpenFiler as Fiber Channel Target

Monday, 24. May 2010

I wanted to post my findings on how to use OpenFiler as a Fiber Channel SAN.  This process isn’t documented as well as I hoped it would have been but the forums on OpenFiler helped a lot but still were lacking.  This post will go from blank box to Fiber Channel LUN being presented by OpenFiler.  My goal was for a faster SAN as I was using iSCSI but it just didn’t meet my expectations.  For the SAN I am using a Qlogic QLA-2342 fiber card and a Brocade Silkworm 3200 fiber switch.

  1. Download the latest version of OpenFiler.  In this example I used 2.3.
  2. Install OpenFiler with out the fiber channel card installed.
  3. Once installed update OpenFiler using conary updateall.
  4. Reboot once the updates have completed and make sure everything is working ok.
  5. Shutdown the machine and install the fiber card.
  6. Get the WWN of the fiber card port(s) by showing the content of /sys/class/fc_host/hostX/port_name
    cat /sys/class/fc_host/hostX/port_name
    NOTE: X in hostX is the number of the adapter.  If there is more than one port check all WWNs.
  7. Edit /etc/init.d/scst and change the chkconfig to # chkconfig: –  99 36
  8. Have the scst server run on startup with chkconfig scst on
  9. Start the scst service.  service scst start
  10. Write the blank config to file with scstadmin –writeconfig /etc/scst.conf
  11. Create a logical volume for the LUN.
    1. This example we added a drive just for data /dev/sdb this will make prepare the drive to hold logical volumes for LUNs.  First get the geometry for the disk
      parted /dev/sdb print
    2. Label the partition
      parted /dev/sdb mklabel msdos
    3. Create the partition, 0.000 is the beginning and 1907328.000 is the end of the geometry from step 1
      parted /dev/sdb mkpart primary 0.000 1907328.000
    4. Enable lvm
      parted /dev/sdb set 1 lvm on
    5. Create the physical disk
      pvcreate /dev/sdb1
    6. Create the group, luns is the example name of the group
      vgcreate luns /dev/sdb1
    7. Create the logical volume, 50G is the size in GB, lun1 is the name of the logical volume and luns is the group
      lvcreate –L 50G –n lun1 luns
  12. Edit /etc/scst.conf.  vim /etc/scst.conf
    1. Under [TARGETS disable] move the HOST entries under [TARGETS enable].  NOTE: The HOST entry WWN should match the WWN(s) from step 6.
    2. Under  [HANDLER vdisk] add the logical volume created in step 11.
      DEVICE lun1,/dev/luns/lun1,WRITE_THROUGH,512
    3. Under [GROUP Default] add the USER WWN.  This is the server you want to be able to access the LUN.
      USER 21:00:00:1b:32:17:87:7e
    4. Under [ASSIGNMENT Default] add DEVICE then the device created in step 12.2 then the LUN number for the device.
      DEVICE lun1,0
  13. Edit modprobe.conf vim /etc/modprobe.conf and change qla2xxx to qla2x00tgt
  14. Reboot the OpenFiler machine and when it starts the LUN should be presented to the server.

HyperTerminal in Windows 7

Friday, 23. October 2009

I have talked to a lot of professionals and one of the big complaints about Windows 7 is the lack of HyperTerminal.  So here is how to get HyperTerminal on to Windows 7 (32 or 64-bit).

On the Windows 7 box make a new folder under C:\Program Files\HyperTerminal for 32-bit and for 64-bit make a new folder C:\Program Files (x86)\HyperTerminal

From a Windows XP box and copy the following 3 files to the folder that was just created on the Windows 7 box:

C:\Program Files\Windows NT\hypertrm.exe

Now just run hypertrm.exe and HyperTerminal is on Windows 7.

If you want to have HyperTerminal on your Start Menu just create a shortcut to hypertrm.exe and put it inC:\ProgramData\Microsoft\Windows\Start Menu\Programs and when you go to All Programs under the Start Menu HyperTerminal will be there.

The only issue that I have noticed is that when creating a connection the icons do not show, but in my opinion that is a non issue.

A quick side note if you have problems getting your USB to Serial connection working under Windows 7 try getting drivers from http://www.prolific.com.tw/eng/downloads.asp?ID=31.  The PL2303_Prolific_DriverInstaller_v10518.zip worked great for me.

XenServer – Change Bonding Mode

Thursday, 13. August 2009

By default XenServer 5.5 uses source-based ARP load balancing (balance-slb or mode 7) for bonding.  If this is needed to be changed to a different mode all that is needed to do is edit the file /opt/xensource/libexec/interface-reconfigure on line 863.  Do this using the following command:

vi /opt/xensource/libexec/interface-reconfigure +863

once there the value for mode can be changed from “balance-slb” to any supported mode.  Here is a list of the modes:


See Linux Channel Bonding for more information on the types of bond modes.  Unfortunately I could not find much information on balance-slb.

To check if the bond mode change worked correctly run

cat /proc/net/bonding/bond<bondnumber>

Run ifconfig to find the bondnumber.

This will list the bond mode and the slave interfaces to the bond.

Setup NFS Server

Tuesday, 28. July 2009

This is based on CentOS but should be very similar for other distros as well.

If NFS is not installed install it

yum install nfs-utils

Have NFS start at startup

chkconfig nfs on

Create a directory to share

mkdir /nfs

Change the rights on the directory to allow users to create and delete data

chmod 777 /nfs

Edit /etc/exports to share the NFS directory

vim /etc/exports

add the following to allow the subnet read/write access to /nfs


Restart nfs service

service nfs restart

SSH Without A Password

Wednesday, 8. July 2009

SSH Without a Password

On the client generate a new rsa ssh key.

NOTE: When prompted for a passphrase leave blank (just hit enter).

ssh-keygen -t rsa

From the client append the new key to the servers .ssh/authorized_keys file.

cat ~/.ssh/id_rsa.pub | ssh root@hostname_or_ip ‘cat >> ~/.ssh/authorized_keys’

NOTE: Enter the root password on the server for the last time.

Now ssh into the server

ssh -l root hostname

It should log in without any prompt for a password.

DD For Backups

Wednesday, 24. June 2009

I wanted a way to create a backup of my whole hard drive or just a partition of the drive.  In windows I use Ghost or Acronis but for Linux I wanted something free and easy to use.  DD is build into Linux and works great.  I like that it is possible to compress the image with gzip.  Here is how to do backups with DD.

Compressed Backup

dd if=/dev/hdx | gzip > /path/to/image.gz

Change hdx for the hard drive to backup.

Restore Backup of hard disk copy

dd if=/path/to/image of=/dev/hdx

gzip -dc /path/to/image.gz | dd of=/dev/hdx

MBR backup

Backup MBR and partition table.

dd if=/dev/hdx of=/path/to/image count=1 bs=512

MBR restore

dd if=/path/to/image of=/dev/hdx

Add “count=1 bs=446″ to exclude the partition table from being written to the disk

First Post

Wednesday, 24. June 2009

I am Brian McCammon.  I have been doing a lot of work with computers as it is my job and hobby.  I have in the pas year or so started in on Linux.  I have learned a lot in that time and thought that it would be nice to have a single place that I could go and find a lot of how tos for things.

Currently at work I am a system admin which means I get to play with a lot of big servers.  Currently I get to play with VMware and Windows Server 2003 servers but I am testing going to VMware vShpere and Windows Server 2008 x64.

As for home I have built a Linux firewall from scratch, not a pre built distro, and have moved on to doing virtual machines using the FOSS project KVM.  I am in the process of getting funds to build an iSCSI SAN and another VM server so I can do live migration of VMs.

If you guys have things that you would like to know I would be glad to try and help or if I have done it I will try to get all my How To documents posted.  The main thing I have to do now is get to organizing them so they are useable for everyone.

Thanks for checking and check back soon and often for the latest How Tos

Brian McCammon