Difference between revisions of "ISCSI"

From Amahi Wiki
Jump to: navigation, search
Line 20: Line 20:
 
       backing-store /dev/vg00/lvtime
 
       backing-store /dev/vg00/lvtime
 
</target>}}
 
</target>}}
 +
 +
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<br>
 +
date the LUN was created: year-month -> 2012-02<br>
 +
your domainname inverted: domain.your -> com.home<br>
 +
the LUN name: this is what the vendor usually provides -> lun1<br>
 +
 +
so that would make the following target:
 +
iqn.2012-02.com.home:lun1
  
 
Start the iSCSI target daemon and make sure it starts at boot time:
 
Start the iSCSI target daemon and make sure it starts at boot time:
Line 30: Line 42:
  
 
= Client side =
 
= Client side =
 +
 +
''Linux''
  
 
quick how-to for connecting to iSCSI storage (implies that iscsi-initiator-utils are installed!):
 
quick how-to for connecting to iSCSI storage (implies that iscsi-initiator-utils are installed!):
Line 44: Line 58:
 
Create LVM stuff if you want to, otherwise create the filesystem as you would normally do
 
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.
+
''Mac OSX''
 +
 +
I installed [http://www.studionetworksolutions.com/products/product_detail.php?pi=11 globalSAN iSCSI Initiator] for OS X by Studio Network Solutions (free community supported) iSCSI client for OS X) on the Mac.
  
Below how the name comes together, the parts are connected by dots, the lun name is separated by a colon.
+
I configured it to "see" the iSCSI lun (just type in the iqn IIRC); since it's presented to the OS as a normal disk you need to partition the drive first (it's a blank disk as far as the Mac is concerned). Then configure Time Machine to use that disk and you're done!
 
 
fixed data: iqn -> iqn<br>
 
date the LUN was created: year-month -> 2012-02<br>
 
your domainname inverted: domain.your -> com.home<br>
 
the LUN name: this is what the vendor usually provides -> lun1<br>
 
 
 
so that would make the following target:
 
iqn.2012-02.com.home:lun1
 
  
For the Apple iMac I installed [http://www.studionetworksolutions.com/products/product_detail.php?pi=11 globalSAN iSCSI Initiator] for OS X by Studio Network Solutions (free community supported) iSCSI client for OS X) on the Mac.
+
''Windows''
  
I configured it to "see" the iSCSI lun (just type in the iqn IIRC); since it's presented to the OS as a normal disk you need to partition the drive first (it's a blank disk as far as the Mac is concerned). Then configure Time Machine to use that disk and you're done!
+
I'll leave that to someone else.

Revision as of 13:31, 9 February 2012

Preliminary (manual) suport for iSCSI in Amahi 6.

From this forums post.

WARNING: this page may have some items missing in the setup

Server side

Set up an iSCSI server on the Amahi box:

bash code
​root@host# yum install scsi-target-utils​


Set up 1 Logical Volume (LV) that will be exported as an iSCSI LUN. The below output shows my LV created for time machine (hence the name lvtime).

bash code
​root@host# lvs | grep time lvtime vg00 -wi-ao 500.00g​


Export the LV: add it to /etc/tgt/targets.conf (note that there's a convention on how to export these!)

bash code
​<target iqn.2010-08.local.bonabo:galileo.lun1> backing-store /dev/vg00/lvtime </target>​


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

Start the iSCSI target daemon and make sure it starts at boot time:

bash code
​root@host# service tgtd start; chkconfig tgtd on​


Check the exported LUN(s):

bash code
​root@host# tgt-admin -s​


Client side

Linux

quick how-to for connecting to iSCSI storage (implies that iscsi-initiator-utils are installed!): scan for new LUNs:

bash code
​root@host# iscsiadm -m discovery -t sendtargets -p <NAS IP>​


login and make the connection persistent

bash code
​root@host# 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

bash code
​root@host# fdisk /dev/<new device> root@host# partprobe /dev/<new device>​


Create LVM stuff if you want to, otherwise create the filesystem as you would normally do

Mac OSX

I installed globalSAN iSCSI Initiator for OS X by Studio Network Solutions (free community supported) iSCSI client for OS X) on the Mac.

I configured it to "see" the iSCSI lun (just type in the iqn IIRC); since it's presented to the OS as a normal disk you need to partition the drive first (it's a blank disk as far as the Mac is concerned). Then configure Time Machine to use that disk and you're done!

Windows

I'll leave that to someone else.