[Announce] iSCSI (iET) support for NAS/SAN200 running jac2b

Discussion in 'Cisco/Linksys Network Storage Devices' started by jackito, Mar 8, 2009.

  1. jackito

    jackito LI Guru Member

    What would you say if you can turn your NAS200 into a cheap SAN200?

    Well, now you can! :biggrin:

    Add iSCSI target services based on iET (iSCSI Enterprise Target 0.4.17) implementation (http://iscsitarget.sourceforge.net/) to the NAS200.
    Mount harddisks and ISO images from the NAS200 through the network and access them has local attached storage (disks) from your computers.
    iET is based on three kernel modules (crc32c, libcrc32c and iscsi_trgt) and a daemon (ietd) and a userspace administration tool (ietadm). Find also in the package, a startup script to start ietd on startup.

    You can download the package here.:thumbup:
    As always Jac thank you for your great contribution (and support! :wink:) that serves as a start point for a lot of people.


    BTW don´t expect a better performance is still NAS200 hardware under the hood!
  2. alejandro_liu

    alejandro_liu Addicted to LI Member

    So did you measure the performance you get out of it? I would expect somewhere between 4 and 6MB/s.
  3. jackito

    jackito LI Guru Member

    Not yet. I tried to format with NTFS, upload and download a few files only for testing with sucessfull results. Now Im in the process of repartitioning the internal disks of the NAS200 so I can get a free mdX RAID-1 device to use with iSCSI. Actually I´m using two disks in RAID-1 configuration, using md0 and md1. I will shrink md0, and move md1 and swap space next to the end of md0 so I can create a new md2 for iSCSI with the new free space.
    After I get everything running I will make some tests and publish the results here. :)
  4. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    The busybox on the Jac2b distro supports loop filesystems so you don't have to repartition...

  5. jackito

    jackito LI Guru Member

    Thanks for the tip Jac. :)
    But I found out (ok, just looked again at the iET docs :tongue:) that iET can also provide regular files as LUNs for iSCSI initiators. :biggrin:
    I already tested it with a 256MB file and it´s working fine so as I write I´m creating a 60GB file on the NAS200 for iSCSI use.
    I will update later with performance results.:thumbup:
  6. alejandro_liu

    alejandro_liu Addicted to LI Member

    On the other hand, it probably is a good idea to test the I/O directly to the device (without FS).

    One nice thing about using iSCSI is that you are skipping the filesystem, so in theory is less overhead.
  7. jackito

    jackito LI Guru Member

    Alex you are right, but I tried to reconfigure the partitions yesterday and it was a complete mess. The NAS200 didn´t recognize the md devices. I wasn´t able to force it, and so on. So a reset the volume and start over.
    Thank God I made a backup before doing anything so now it is restoring from the external USB backup drive (veryyyy slowwwwly) around 120GB.
    All the configuration and add-ons were already sucessfully restored from the backup.
    From now on I will keep using regular files (for iSCSI) and loopback filesystems in case I need them. :)
  8. jackito

    jackito LI Guru Member

    OK, I´m uploading a few VMs to the iSCSI LUN on the NAS...VERY slooooooowly.
    The performance is almost the same as with SMB. Right now I´m pushing an average transfer rate of about 3500Kb/s. I´m using Windows Vista as initiator with a wired connection to the switch (100Mbps).
    I checked CPU usage with top and iSCSI is consuming around 70% - 90% of it. A lot more than the 40% - 60% that SMB is using.
    As I said before it doesn´t matter which protocol you use is the same lame CPU under the hood...
    I will update later with read performance and SMB transfer rate comparision.

    BTW I took a look to the CPU docs, I´m an electronic technician and from my point of view, changing the CPU clock is VERY difficult. Forget about a method like the one used with NSLU2. :frown: We will need to use some digital technic circuit to apply the right signal at the right time in the right pins...
  9. jackito

    jackito LI Guru Member

    More stats:

    Average transfer rate for download using iSCSI is around 3850KByte/s. But also the CPU usage is greater, between 80% - 95%.

    BTW the ACT LED is blinking a lot more than using SMB.

    I have to mention that currently I´m using a regular file on the SoftRAID-1/ext2 volume as a LUN for iSCSI. Maybe we can achieve a little better performance using a block device directly for the LUN so as Alex said we get rid off the ext2 filesystem load/penalty. I don´t think is going to be a lot more faster.

    Tomorrow I will do a few SMB tests to take note of the transfer rates and I will publish my results here.

    Anyway iSCSI is still a very cool add-on, at least for me. :thumbup:
  10. alejandro_liu

    alejandro_liu Addicted to LI Member

    Yes, being able to turn a NAS200 into a SAN200 is very neat.

    Also for those people who want to try doing Oracle/RAC this would be a cost effective (albeit very slow) option.
  11. jackito

    jackito LI Guru Member

    After doing some SMB file transfers I´m a little bit dissapointed with iSCSI performance.

    SMB is a little bit faster than iSCSI, with same CPU usage.

    Average SMB reading transfer rate: 4000Kbyte/s
    Average SMB CPU usage while reading: 90%

    Average SMB writing transfer rate: 3500Kbyte/s
    Average SMB CPU usage while writing: 55%

    So my conclusion is:

    1) iSCSI should be used only when you can´t use anything else. SMB is prefered for this hardware.

    2) All the tests with iSCSI were done using a regular file for storage. Maybe if we use directly a block device the performance will increase a little bit.

    3) Lame CPU! :frown:
  12. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Did you make a typo? Where are the iSCSI results?

    I'd be very interested in seeing some direct-to-hardware numbers. If you don't want to repartition, you can try unmounting the sdb3 swap partition on the second hard disk (I think you said you had two disks, right? otherwise never mind) and using that for a test. It's only 128MB but it should work and give some indication about speed. And afterwards you can always do a mkswap on it again and remount it...

  13. jackito

    jackito LI Guru Member

    Jac the iSCSI results are in previous replies. Anyway they were this:

    iSCSI Average write transfer rate: 3500Kbyte/s @ 70%-90% CPU usage.
    iSCSI Average read transfer rate: 3850Kbyte/s @ 80%-95% CPU usage.

    Regarding the direct-to-hardware numbers, as I´m using Windows Vista/Server 2008 for testing and this SOs are using caching for writing I need to transfer files bigger than 128MB so get real results. When you transfer small files, let say 100MB files the SO starts to write to iSCSI target but is caching the file and continue transfering it in the background without user notice. The first test I ran where like this, with transfer speeds of more than 10000-15000KByte/s. Of course this is not real. So for real testing you need to transfer for example an ISO image of more than 500MB so the cache gets full and you start to get real speeds. The only way of doing this for me is repartitioning the NAS but I think it doesn´t worth it, for maybe a few more KByte/s. I already tried it and as I said before it was a mess (I really screw things up with gParted). Finally I reset the volume and recover everything from a backup that took hours/days. I don´t want to go there again. If someone else wants to give it a try it will just need to download iET package (first post on this thread) and try it. It´s very easy to get it running.
    I was thinking again about resizing the RAID-1 on the NAS but with the slow CPU is going to take days: resize2fs, mdadm --grow, resize2fs again and I´m not even sure that mdadm --grow is really shrinking the linux raid partition or just changing the RAID superblock information to reflect the new RAID size so even doing all this finally maybe will not resolve anything since I will not have spare space to create a new partition.

    Oh! BTW did anybody note that the ethernet if on the NAS200 is marked with the PROMISC flag???? :eek: I noted this yesterday and I removed it expecting a little better performance, of course I didn´t get it. :frown:
  14. dksmar

    dksmar Network Guru Member

    is it possible to make a tutorial how you installed it? I'm tryying to copy the files from the tar.gz to the same files of nas200 with scp but i can't because they have write access protection.
  15. Stargazer

    Stargazer Guest

    Hi there, I've got a question here. How to install iSCSI (iET) support on jac4?
  16. tired_of_searching

    tired_of_searching Reformed Router Member

    after signing up and trying for hours... here are the instructions that worked for me (just a few years late) this instruction set assumes you have a basic understanding of networking and changing the obvious placeholders. i feel i can safely assume this because you are searching for iscsi info, which is usually beyond the realm of the average click-and-pointer.

    login to your jac4 via ssh and cd to your data directory. while you are here, create an image you want to use for storage. alternatively, you can use lvm to create a volume group, but since i couldn't figure that part out, i just made an image. 20000 is 20gb of storage. it takes a very very very long time for the image to be built (about 2-3 min per gb), so maybe do a slightly smaller one (say 2gb which = 2000) for me it was:
    $ cd /harddisk/volume_3/data/
    $ dd if=/dev/zero of=/harddisk/volume_3/data/lun1.img bs=1024k count=20000
    download the package above
    $ wget http://www.secdata.com.ar/temp/iscsi-iet_nas200_jac2b.tar.gz
    cd to the config directory and extract to the conf directory
    $ cd ../conf/
    $ tar -xzvf ../data/iscsi-iet_nas200_jac2b.tar.gz
    reboot your nas200 so that it locates the newly applied iscsi-iet package
    $ reboot
    once your device has restarted, cd into the etc folder in your hard disk config. this is critical, otherwise you will not be able to find the untarred files.
    $ cd /harddisk/volume_3/conf/etc/
    enter the iscsi config file
    $ vi ietd.conf
    and replace the whole thing with:
    Target iqn.2013-04.com.example:storage.lun1
        IncomingUser someuser password
        Lun 0 Path=/harddisk/volume_3/data/lun1.img,Type=fileio
        Alias LUN1
    or alternatively, just mv the ietd.conf file to ietd.conf.old if you want to store it, and make a new ietd.conf

    next, modify the initiators.allow file for your initiator box (in this case from
    $ vi initiators.allow
    start up the iscsi target!
    $ rc.d/ietd.startup start
    the balance of the steps are conducted on your initiator box, and for that i shall leave it to you to find the instructions. for me, i learned most of what i learned from http://www.howtoforge.com/using-iscsi-on-ubuntu-10.04-initiator-and-target

    once the target logs in successfully, fdisk the new partition and start iscsi-ing!

    as stated in numerous other locals, the nas200 isnt exactly a powerhouse of computing power, so set your standards low, and have fun.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice