Oracle MVA

Tales from a Jack of all trades

iscsi-targets

with 3 comments

I am build a new environment on my testing-kit. Instead of downloading OpenFiler, I decided to build my own ISCSI device on OEL 5. The main reason for this exercise is that I want this box to be DNS server and some more.

Anyway, configuring ISCSI is not an average DBA’s job. I don’t like to type in commands on a prompt when I don’t know what they mean. Every how-to I find keeps on calling difficult commands to create a ISCSI LUN, which made me spent lots of time in man-pages last night. In the end this was a waste of time, since all you need to do is:

  • add a disk to your VM (let’s say /dev/sdb)
  • install perl-Config-General and scsi-target-utils rpm’s from the ClusterStorage directory on the DVD with your installation media
  • edit /etc/tgt/targets.conf and make it look like this:
    ASM1>
    backing-store /dev/sdb
    </target>
    where area51.local is my domain, ASM1 is my LUN and /dev/sdb is the disk just added to the VM
  • make the tgtd daemon start
    chkconfig 345 tgtd on; service tgtd start

Now whenever you restart your server, you will still have the same ISCSI LUN presented to the world. No big man-page needed, just a simple configuration file. How about that….

Obviously, when you want to check the LUN, you do need the tgtadm command. This should do the trick:

tgtadm --lld iscsi --op show --mode target

Advertisements

Written by Jacco H. Landlust

August 24, 2010 at 8:10 am

Posted in Installing, Linux

3 Responses

Subscribe to comments with RSS.

  1. Jacco,

    It’s also possible to use Openfiler as a DNS and DHCP server. More about that on http://rachelp.nl/index_kb.php?menu=articles&actie=show&id=72

    Rob

    Rob den Braber

    August 24, 2010 at 8:39 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: