Archive

Archive for the ‘Ubuntu 9.x Desktop’ Category

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.

Apple HFS Support for Linux

November 3rd, 2009 Arthur Gressick No comments

I needed to transfer some stuff off of a Mac OS X HFS+ drive from a SATA drive. So in order to do this I install the HFSplus package for Linux

apt-get install hfsplus

I did not try out the Write capabilities but the reading worked like a charm.

Categories: Ubuntu 9.x Desktop Tags: , ,

Using Apple Keyboard with Linux, Command Key Swap

October 30th, 2009 Arthur Gressick No comments

I like using linux and also using Apple Mac OS X. I hate those horrible keyboard that come with the low budget computer and figure I would use my Apple Aluminium Keyboard with Linux. Now mind you this worked just fine plugging it into my Dell. I want it to act just like my Apple Computer. Here is what I did, this is way to cool.

I am using Ubuntu 9.04 in 64-bit mode (32-bit should work as well).

First I changed the keyboard type in:

System > Preferences > Keyboard

Then in the window choose:

Layouts > Keyboard model > Apple > Macintosh

Magically the volume controls worked and the number pad worked as well. I am so close to having that Mac experience. Let’s now map the CNTRL key to the Command Key

Staying in the Keyboard Window and Layouts, click on the “Layout Options…” button:

Alt/Win key behavior / Control is mapped to Win Keys (and the usual Ctrl keys) (click the radio button)

Now close everything out and open your text editor and try it out all of you mac heads. This will save those dreaded hand cramps and make things much easier. Go Mac and Linux.