Formatting code for StorageISCSI
{{parent page="Storage"}}
===ISCSI on ubuntu===
Install the necessary packages:
%%
i iscsitarget - iSCSI Enterprise Target userland tools
%%
Install the iscsi kernel module. Get source from sourceforge http://sourceforge.net/projects/iscsitarget/files/
%%
tar zxvf iscsitarget-1.4.18
make
make kernel
make usr
make install
%%
====Configuring ISCSI targets====
Edit /etc/ietd.conf
%%
Target iqn.2009-10.ca.comme:storage.iscsi.disk1
Lun 0 Path=/my/iscsi/disk1,Type=fileio
Alias LUN0
%%
Edit /etc/initiator.allow
%%
ALL 192.168.x.0/24
%%
Create the disk image
%%
dd if=/dev/zero of=disk1 count=0 obs=1 seek=10G
%%
Enable iscsitarget service in /etc/default/iscsitarget
%%
ISCSITARGET_ENABLE=true
%%
Start iscsitarget service
%%
/etc/init.d/iscsitarget start
%%
Now I hit this error when I use the ubuntu init script:
%%
ietd: unable to create server socket (Address family not supported by protocol) 10 1 6!
%%
So I had to start it on a command line, and it works just fine:
%%
ietd --address=192.168.13.x -f -d2
%%
====Mount the target====
I'm doing this from a windows client. Just enter the server IP adddress and hit quick connect. Then just do the usual format and stuff. Copying some large file and was able to get ~40bit/sec over fast ethernet. Not that great. Maybe able get more if I'm using a physical partition or even a RAID volume.
===ISCSI on ubuntu===
Install the necessary packages:
%%
i iscsitarget - iSCSI Enterprise Target userland tools
%%
Install the iscsi kernel module. Get source from sourceforge http://sourceforge.net/projects/iscsitarget/files/
%%
tar zxvf iscsitarget-1.4.18
make
make kernel
make usr
make install
%%
====Configuring ISCSI targets====
Edit /etc/ietd.conf
%%
Target iqn.2009-10.ca.comme:storage.iscsi.disk1
Lun 0 Path=/my/iscsi/disk1,Type=fileio
Alias LUN0
%%
Edit /etc/initiator.allow
%%
ALL 192.168.x.0/24
%%
Create the disk image
%%
dd if=/dev/zero of=disk1 count=0 obs=1 seek=10G
%%
Enable iscsitarget service in /etc/default/iscsitarget
%%
ISCSITARGET_ENABLE=true
%%
Start iscsitarget service
%%
/etc/init.d/iscsitarget start
%%
Now I hit this error when I use the ubuntu init script:
%%
ietd: unable to create server socket (Address family not supported by protocol) 10 1 6!
%%
So I had to start it on a command line, and it works just fine:
%%
ietd --address=192.168.13.x -f -d2
%%
====Mount the target====
I'm doing this from a windows client. Just enter the server IP adddress and hit quick connect. Then just do the usual format and stuff. Copying some large file and was able to get ~40bit/sec over fast ethernet. Not that great. Maybe able get more if I'm using a physical partition or even a RAID volume.