Gem 1.3.2+ on Ubuntu 9.10 from scratch

April 19th, 2010 Arthur Gressick No comments

So I was working on a new install of Redmine.org and it needed Gem 1.3.2 which doesn’t come with the Ubuntu 9.10 in the apt-get packages.

I made sure that Ruby 1.8.7 was install on the system by entering this

ruby -v

If nothing showed up refer to my ruby post for installation instructions.

Ok, so I am going to download the installer to the linux machine and then install

wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.6.zip
unzip rubygems-1.3.6.zip
cd rubygems-1.3.6
ruby setup.rb

Everything should have installed properly. Now look in the folder /usr/bin/ for gem1.8. Now most people might have already caught this but I didn’t at first. you can’t run “gem” from command line because it is actually gem1.8. I created a sym link to the gem1.8 with the below command.

cd /usr/bin
ln -s gem1.8 gem

That should do it. Log into the system as a regular user and then enter the below to check the gems version

gem -v

Ubuntu/Linux VMFS3 (vmfs-tools)

January 6th, 2010 Arthur Gressick No comments

I have been working on an iSCSI device. I wanted to mount the volumes for making backups of the machines using rsync to another machine. I needed to load the VMFS3 tools (vmfs-tools) to mount the drive to make this work. Here is what I installed.

NOTE: This command will run on Ubuntu 9.10 and higher

apt-get install vmfs-tools

Once you install the vmfs-tool then you can create a folder in “/mnt/nas” and the assuming that there is a drive located at “/dev/sdb1″

Now you can mount the drive with this command

vmfs-fuse /dev/sdb1 /mnt/nas

You will need to change the fstab so it will mount on boot as well. Check my other blog posting for that and the iSCSI information. [I will update this soon with the fstab commands]

UPDATED

Found some more information online for VMFS tools. Not sure how to use these command once installed. I recommend upgrading to Ubuntu 9.10 or higher.

apt-get install open-vm-source

OR

apt-get install open-vm-tools

Linux iSCSI Target Setup

December 9th, 2009 Arthur Gressick 1 comment

I am working on setting our NAS device with iSCSI so that I can run VMware hosts externally. Here are my notes for setting up the iSCSI target and initiator. I am using Ubuntu 9.10 (latest version at the time.) I will be using a 160GB drive and dedicating it solely to run the mount points.

The iSCSI protocol is a storage area network (SAN) protocol which allows iSCSI initiators to use storage devices on the (remote) iSCSI target using normal ethernet cabling. To the iSCSI initiator, the remote storage looks like a normal, locally-attached hard drive.

server1.example.com (Initiator): IP address 192.168.1.100
server2.example.com (Target): IP address 192.168.1.101

Setting up the target [server2]

Installing the software

apt-get install iscsitarget

Modify the config file for iscsitarget

nano /etc/default/iscsitarget

Now enable the ISCSITARGET

ISCSITARGET_ENABLE=true

NOTE: You can use logical volumes, image files, hard drives [/dev/sdb], partitions [/dev/sdb1] or RAID devices [/dev/md0] for storage.

I am going to use the entire 160GB HDD for iSCSI located at sdb1

Edit ietd.conf

nano /etc/ietd.conf

Make sure everything is commented out except what is below

Target iqn.2001-04.com.example:storage.lun1
        # Users, who can access this target. The same rules as for discovery
        # users apply here.
        # Leave them alone if you don't want to use authentication.
        IncomingUser
        OutgoingUser
        # Logical Unit definition
        # You must define one logical unit at least.
        # Block devices, regular files, LVM, and RAID can be offered
        # to the initiators as a block device.
        Lun 0 Path=/dev/sdb,Type=fileio
        # Alias name for this target
        Alias LUN1

NOTE: The target name must be a globally unique name, the iSCSI standard defines the “iSCSI Qualified Name” as follows: iqn.yyyy-mm.[:identifier]; yyyy-mm is the date at which the domain is valid; the identifier is freely selectable. The IncomingUser line contains a username and a password so that only the initiators (clients) that provide this username and password can log in and use the storage device; if you don’t need authentication, don’t specify a username and password in the IncomingUser line. In the Lun line, we must specify the full path to the storage device (e.g. /dev/vg0/storage_lun1, /storage/lun1.img, /dev/sdb, etc.).

Now you can limit the access by IP address

nano /etc/initiators.allow

Add this into the editor

iqn.2001-04.com.example:storage.lun1 192.168.1.19

Now start the service

/etc/init.d/iscsitarget start

I will post an article about connecting to the target from another Linux, Mac or Windows Host in the near future. From VMware ESXi and vSphere 4 just add the vKernel and then in the administration section for storage just type in the IP address of the target. I installed 4 VM Guests on vSphere to test and it worked great.