Difference between revisions of "ISCSI"

From Amahi Wiki
Jump to: navigation, search
Line 10: Line 10:
  
  
now that we have the legal stuff covered , let's get started  
+
Now that we have the legal stuff covered , let's get started  
  
Installing the ISCSI server
+
= Installing the ISCSI server =
  
 
Log into your amahi box via ssh and become root
 
Log into your amahi box via ssh and become root
Line 23: Line 23:
 
}}
 
}}
  
let amahi update whatever is necessary to avoid a kernel module error trying to start the ISCSI server.
+
Let amahi update whatever is necessary to avoid a kernel module error trying to start the ISCSI server.
  
  
then install kernel headers and gcc
+
Then install kernel headers and gcc
  
 
{{Code|
 
{{Code|
 
Code= yum install kernel-headers kernel-devel gcc
 
Code= yum install kernel-headers kernel-devel gcc
 
}}
 
}}
now we going to download the install script i wrote  
+
Now we going to download the install script i wrote  
 
{{Code|
 
{{Code|
 
Code=  wget http://dl.dropbox.com/u/57179706/iscsi/install.sh
 
Code=  wget http://dl.dropbox.com/u/57179706/iscsi/install.sh
 
}}
 
}}
then run  
+
Then run  
 
{{Code|
 
{{Code|
 
Code= sh ./install.sh
 
Code= sh ./install.sh
 
}}
 
}}
this should have now compiled and installed the ISCSI server on your Amahi box  
+
This should have now compiled and installed the ISCSI server on your Amahi box.
  
Configuration and creation of an ISCSI disk image  
+
= Configuration and creation of an ISCSI disk image =
  
the easiest way to get an iscsi target is to create an image file  
+
The easiest way to get an ISCSI target is to create an image file.
  
we are doing this by typing :
+
We are doing this by typing :
 
{{Code|
 
{{Code|
 
  Code=  mkdir /var/hda/files/iscsi
 
  Code=  mkdir /var/hda/files/iscsi
 
dd if=/dev/zero of=/var/hda/files/iscsi/disk.img bs=1M count=0 seek=256000
 
dd if=/dev/zero of=/var/hda/files/iscsi/disk.img bs=1M count=0 seek=256000
 
}}
 
}}
you can name the disk.img whatever you want and the numbers behind seek is the size of the image disk which in our case is 250 gigs
+
You can name the disk.img whatever you want and the numbers behind seek is the size of the image disk which in our case is 250 gigs.
  
now if we look in /var/hda/files/iscsi/ we will find a file called disk.img
+
Now if we look in /var/hda/files/iscsi/ we will find a file called disk.img
  
 
Configuring the ISCSI server to serve your disk image  
 
Configuring the ISCSI server to serve your disk image  
  
we have to edit the config file in  /etc/iet/ietd.conf (use your favorite editor)
+
We have to edit the config file in  /etc/iet/ietd.conf (use your favorite editor)
  
 
Leave everything as it is exept at the bottom we add
 
Leave everything as it is exept at the bottom we add
Line 63: Line 63:
 
Lun 0 Path=/var/hda/files/iscsi/disk.img,Type=fileio
 
Lun 0 Path=/var/hda/files/iscsi/disk.img,Type=fileio
 
}}
 
}}
save and exit your editor  
+
Save and exit your editor  
  
start/restart your ISCSI server  
+
= start/restart your ISCSI server =
 
{{Code|
 
{{Code|
 
   Code= service iscsi-target restart
 
   Code= service iscsi-target restart
Line 71: Line 71:
 
done
 
done
  
I will update this page later on how to hook a ISCSI drive using the win7 iscsi-initiator when i finally figured out why i have no toolbar while editing the wiki page
+
I will update this page later on how to hook a ISCSI drive using the win7 iscsi-initiator when i finally figured out why i have no toolbar while editing the wiki page.

Revision as of 04:13, 16 February 2012

Installing the ISCSI server on Fedora 14/Amahi 6

First of all the usual warnings

Disclaimer: does not cover misuse, boogars and other bodily excrements, accident, lightning, flood, tornado, tsunami, volcanic eruption, earthquake, hurricanes, or other acts of God, neglect, damage from improper use, incorrect line voltage, unauthorized use, unauthorized repair, improper installation, typos, broken antenna or marred cabinet, missing or altered serial numbers, electromagnetic radiation from nuclear blasts, sonic boom vibrations, customer adjustments that are not covered in this list, and incidents owing to an airplane crash, ship sinking or taking on water, motor vehicle crashing, dropping the item, falling rocks, leaky roof, broken glass, disk failure, accidental file deletions, mud slides, forest fire, hitting of a deer, milk coming out of your nose due to laughing while drinking, or projectiles, which can include, but are not limited to, arrows, bullet shots, BBs, shrapnel, lasers, napalm, torpedoes, emissions of X-rays, Alpha, Beta and Gamma rays, knives, stones, and touching in inappropriate places, etc.

This disclaimer may not be copied or reproduced in any form

without the expressed written consent of whoever I stole it from.


Now that we have the legal stuff covered , let's get started

Installing the ISCSI server

Log into your amahi box via ssh and become root

NOTE: As i have experienced myself it is a good idea to check if your updates are all done correctly . do this by Typing

bash code
​yum update​


Let amahi update whatever is necessary to avoid a kernel module error trying to start the ISCSI server.


Then install kernel headers and gcc

bash code
​yum install kernel-headers kernel-devel gcc​

Now we going to download the install script i wrote

bash code
​wget http://dl.dropbox.com/u/57179706/iscsi/install.sh​

Then run

bash code
​sh ./install.sh​

This should have now compiled and installed the ISCSI server on your Amahi box.

Configuration and creation of an ISCSI disk image

The easiest way to get an ISCSI target is to create an image file.

We are doing this by typing :

bash code
​mkdir /var/hda/files/iscsi dd if=/dev/zero of=/var/hda/files/iscsi/disk.img bs=1M count=0 seek=256000

You can name the disk.img whatever you want and the numbers behind seek is the size of the image disk which in our case is 250 gigs.

Now if we look in /var/hda/files/iscsi/ we will find a file called disk.img

Configuring the ISCSI server to serve your disk image

We have to edit the config file in /etc/iet/ietd.conf (use your favorite editor)

Leave everything as it is exept at the bottom we add

bash code
​Target iqn.2012-02.com.domain:disk.img Lun 0 Path=/var/hda/files/iscsi/disk.img,Type=fileio​

Save and exit your editor

start/restart your ISCSI server

bash code
​service iscsi-target restart​

done

I will update this page later on how to hook a ISCSI drive using the win7 iscsi-initiator when i finally figured out why i have no toolbar while editing the wiki page.