Page 1 of 2

iSCSI

Posted: Fri Feb 03, 2012 1:44 pm
by csc
Hello,

Does AMAHI also has an iSCSI initiator or target build in?
I know that Freenas does have it but I want a little bit more than just a nas.
Thats why I chose AMAHI instead.

Re: iSCSI

Posted: Fri Feb 03, 2012 5:41 pm
by bigfoot65
No it does not. There is a user who is working on iSCSI at the moment, but nothing has been formally added to the wiki nor is there a web-app yet to support it.

Once we get something formalized, we will announce it on Facebook.

Re: iSCSI

Posted: Mon Feb 06, 2012 2:27 am
by moredruid

Re: iSCSI

Posted: Thu Feb 09, 2012 12:16 am
by hemminger
Great work for iSCSI target. I was wondering if you know how to setup an initiator and connect an existing LUN to Amahi. I've just ordered and am looking to build a storage appliance and using NexentaStor for the OS. Then I'm going to build a VM server and use Xen.org's XCP which is esentially the same as Citrix XenServer. I'm going to attach a LUN from the Storage appliance via iSCSI to XCP and create a VM for amahi and want to create a second LUN and attach it directly to amahi and mount it to /var so all the files will be on seperate system and with virtualized storage can easily be expanded and snapshotted for backup purposes. I've found guides on how to connect to a LUN and mount it in Fedora, but I haven't found how to make it connect on boot. The whole system is also attached to 2 Large UPS systems for Stability and reliability. Dangerous to run a storage appliance without UPS.

Re: iSCSI

Posted: Thu Feb 09, 2012 12:37 am
by moredruid
quick how-to for connecting to iSCSI storage:
scan for new LUNs:

Code: Select all

iscsiadm -m discovery -t sendtargets -p <NAS IP>
login and make the connection persistent

Code: Select all

iscsiadm -m node -T iqn.2012-02.<domain>.<your>:<LUNname> -p <NAS IP> -l
you should see a new device, you can partition it now

Code: Select all

fdisk /dev/<new device> partprobe /dev/<new device>
create LVM stuff if you want to, otherwise create the filesystem as you would normally do

the name convention for iSCSI LUNs is usually as follows but a vendor can change it at will, it's a convention not a requirement.
Below how the name comes together, the parts are connected by dots, the lun name is separated by a colon.
fixed data: iqn -> iqn
date the LUN was created: year-month -> 2012-02
your domainname inverted: domain.your -> com.home
the LUN name: this is what the vendor usually provides -> lun1

so that would make the following target:
iqn.2012-02.com.home:lun1

edit: removed error

Re: iSCSI

Posted: Thu Feb 09, 2012 6:07 am
by bigfoot65
Would you be able to add this to the wiki page?

http://wiki.amahi.org/index.php/ISCSI

We would greatly appreciate it!

Re: iSCSI

Posted: Thu Feb 09, 2012 6:31 am
by moredruid
done

Re: iSCSI

Posted: Thu Feb 09, 2012 8:30 am
by bigfoot65
Awesome. Thanks so much for sharing.

Re: iSCSI

Posted: Fri Feb 10, 2012 12:08 am
by moredruid
I had a simple how-to already written for work so it was more or less copy & paste ;)

Re: iSCSI

Posted: Fri Feb 10, 2012 10:43 pm
by hemminger
Sweet thanks. Now I just have to wait till my new hardware gets here on monday. WooHoo.