Sunday, November 15, 2009

How To: Free iSCSI storage with Fedora 10

This how-to guide explains how did I set up an iSCSI target using Fedora 10 and iSCSI initiator on Windows Vista. I was always wondering to setup a free iSCSI storage at home to enable me further run testing with SCVMM (System Center Virtual Machine Manager) R2 with CSV (Cluster Share Volume) as it is hard to get a copy of Windows iSCSI Target Software, unless you have a very good relations with OEM partners.
As hardware remain my main obstacle, I actually setup the iSCSI Target server on Virtual PC

To find out how Fedora 10 can be setup on Virtual PC, see my blog on How-To: Fedora 10 Installtion on Virtual PC here.

Setting up the iSCSI Target (Fedora 10)

  1. Get a copy of iSCSI Enterprise Target (IET) at RPM Fusion
rpm -Uvh

  1. Install the iSCSI target packages:
yum install iscsitarget kmod-iscsitarget

  1. Restart the server.

  1. Get a copy of RPM package of Webmin at and install in on the server.
    rpm -U webmin-1.490-1.noarch.rpm

    1. Get a copy of iSCSI Target module from

    1. Access to Webmin using you favorite internet browser. Select Hardware and then iSCSI target management.

    1. Click on Create a new target

    1. Type in your prefer target name and alias

    1. Click on Add a Logical Unit

    1. In my case, I have select to use Local file. If you want to use block device, refer to the Use Block IO bottom of this post.

    1. When completed the LUN is ready

    1. You are now require to restart the iscsi-target service

    Setting up the iSCSI Initiator (Windows Vista)

    1. Go to Discovery tab. Add a Target portals.

    1. Go to Targets tab.

    1. Select the target and click Log on. Click OK.

    1. The status now will turn to connected.

    1. Right-click My Computer and select Manage.
    2. Go to Disk Management and then Storage. The new disk now is visible.

    Use Block IO
    It required you to allocate a new hard drive, or storage media for you to use BlockIO in IET. In my case, i am attaching a new hard drive and detect as /dev/sdb.

    1. Check the drive detail
      fdisk -l /dev/sdb

    2. Create new partition
      fdisk /dev/sdb
      Command (m for help): n
      accept default value to allocate all capacity

    3. Create filesystem. In my case, i am attaching the LUN to my Windows server, therefore i used NTFS
      mkntfs -f -L LUN1 -v /dev/sdb1

    4. Edit the ietd.conf
      Target iqn.2009-11:com.cotonso.storage2.lun1
              Alias com.cotonso.storage2.lun1
              Lun 0 Type=blockio,Path=/dev/sdb1,IOMode=wthru

    5. Restart IET service

    Post a Comment