Showing posts with label Open Source - Linux - Fedora10. Show all posts
Showing posts with label Open Source - Linux - Fedora10. Show all posts

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 http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm


  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 www.webmin.com and install in on the server.
    wget http://prdownloads.sourceforge.net/webadmin/webmin-1.490-1.noarch.rpm
    rpm -U webmin-1.490-1.noarch.rpm


    1. Get a copy of iSCSI Target module from http://www.webmin.com/cgi-bin/search_third.cgi?recent=1.
      wget http://update.intellique.com/pub/iscsitarget-0.9.3.wbm

    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

    References

    Thursday, November 12, 2009

    How To: Fedora 10 Installation on Virtual PC

    1. Get Fedora 10 Distribution from http://fedoraproject.org/get-fedora.html .
    2. Create a virtual machine as ussual. Capture the Fedora 10 ISO image or use your CD\DVD drive if you have burn a copy to a disc.
    3. Boot up the virtual machine an you will find yourself at the boot screen.
    4. Hit e to edit the boot parameters.


    5. Add noreplace-paravirt singles as shown.




    6. Hit b to continue the boot process.



    7. Choose the packages according to your prefer preferences


    8. Installation in progress


    9. Click Finish to reboot the machine and complete the installation.

    10. For the first boot up, quickly hit F10 just after the BIOS screen to display the GRUB boot opyions.
    11. Type in the boot parameters as shown in step 5 and continue the boot process.
    12. Login to the system and ammend the /boot/grub/grub.conf file as shown below.




    13. Save and exit the editor. Run terminal# grub.
           Grub#> grub-install --no-floppy /dev/sda

    14. You will be able to load up to the login screen the next time you boot up.