iSCSI modules for 3.1.9+?
Are there kernel modules for 3.1.9+ on the Pi available?
Specifically:
kernel/drivers/scsi/iscsi_tcp.ko
kernel/drivers/scsi/libiscsi.ko
kernel/drivers/scsi/libiscsi_tcp.ko
kernel/drivers/scsi/scsi_transport_iscsi.ko
I see the files available in various 2.6.32-5 kernels in apt, but I don't think downgrading is an option...?
Specifically:
kernel/drivers/scsi/iscsi_tcp.ko
kernel/drivers/scsi/libiscsi.ko
kernel/drivers/scsi/libiscsi_tcp.ko
kernel/drivers/scsi/scsi_transport_iscsi.ko
I see the files available in various 2.6.32-5 kernels in apt, but I don't think downgrading is an option...?
They say computers only do what you tell them to. They're wrong. Mine still hasn't gone to hell.
Re: iSCSI modules for 3.1.9+?
Doesn't look like it: https://github.com/raspberrypi/firmware ... ivers/scsi
So you'll need to configure and compile your own kernel http://elinux.org/Rpi_kernel_compilation
So you'll need to configure and compile your own kernel http://elinux.org/Rpi_kernel_compilation
Re: iSCSI modules for 3.1.9+?
The iscsi modules are not included by default - I've managed to get iscsi going (both initiator and target) on the pi and have subsequently managed to get the pi booting from an iscsi root using a custom initramfs, none of this currently appears to be documented anywhere as yet for the pi, I can put together a guide on it from start to finish if it'd be useful for you.
Re: iSCSI modules for 3.1.9+?
Yes please do a guide. I've lost days of my life trying to get this to work. I don't have enough Linux experience to get this working. It's driving me nuts !
Re: iSCSI modules for 3.1.9+?
As requested i've started a writeup on this, i'll put this online to a wiki once it's complete and fully checked but the first half of it (dealing with at least getting iscsi going) is below.
This guide is split into two parts, part 1 deals with rebuilding the standard Debian image to include iscsi support so that the pi can access an iscsi target (and function as a target itself if needed, but this guide deals with setting up as an initiator), part 2 then extends on this to enable booting from an iscsi root.
This guide assumes at least a basic knowledge of iscsi and that you already have a suitable target setup on your SAN/NAS/wherever. For the sake of simplicity we will be performing on-device kernel recompiles, these take 4-6 hours, you can simply perform a cross-compile elsewhere to speed this up if you prefer.
Also assumed in this guide is that you're working as the root user - If you're using a non-root user, most commands will need to be prefixed with a sudo.
Part 1
First up, we need to get the iscsi initiator service installed, along with git, gcc, make, ncurses, ncurses-devel and python, which are needed for an on-device kernel recompile:
Lets create a folder in which to keep the various content we'll need for the kernel rebuild:
We now need to fetch the kernel sources to build from, this will take a while:
Now take a copy of your current running kernel configuration, which we can then alter:
Now let's load the system's UI-based kernel configuration editor (these changes can be adjusted manually, but the UI is simple):
Once the UI has loaded, navigate to the "Device Drivers" section (enter to navigate between pages, space to change an option), then "SCSI device support", then "SCSI Transports". Change the "iSCSI Transport Attributes" option twice (so that it shows a *) to build it into the kernel. Go back a page, hit space for "SCSI low-level drivers" to enable this option, then enter to descend into it, then space twice for a * on "iSCSI Initiator over TCP/IP".
Once these options are enabled, exit the UI and save changes. To ensure these are set, run:
This should return the following:
CONFIG_SCSI_ISCSI_ATTRS=y
CONFIG_ISCSI_TCP=y
# CONFIG_ISCSI_BOOT_SYSFS is not set
With this in place, compile your new kernel:
This process will take in the region of 4-6 hours to complete.
Once done, we need to generate an image of this kernel for the Pi to boot from, then replace your existing kernel:
First up, we need the mkimage python tool:
Now build the image:
Now create a backup of your existing kernel, then replace the running kernel with the newly-generated one:
With this done, reboot your pi into your new iscsi-enabled kernel:
If you have any problems with booting at this point, you can always revert to your old kernel by mounting your SD card into a card reader on another system, then revert kernel.img-backup to kernel.img.
Assuming all has gone well, you can now use iscsiadm to discover then login to your iscsi target (though hopefully youll already be familiar with configuring an initiator to access a target), for example:
iscsiadm --mode discovery --type sendtargets --portal XXX.XXX.XXX.XXX
where the IP address in the above should be the address of your iscsi target, then once it has been discovered, login to the target with:
iscsiadm --mode node --loginall=all
Part 2 dealing with generating a custom initramfs to boot directly from an iscsi root coming soon, after i've helped the other half with some gardening :<
This guide is split into two parts, part 1 deals with rebuilding the standard Debian image to include iscsi support so that the pi can access an iscsi target (and function as a target itself if needed, but this guide deals with setting up as an initiator), part 2 then extends on this to enable booting from an iscsi root.
This guide assumes at least a basic knowledge of iscsi and that you already have a suitable target setup on your SAN/NAS/wherever. For the sake of simplicity we will be performing on-device kernel recompiles, these take 4-6 hours, you can simply perform a cross-compile elsewhere to speed this up if you prefer.
Also assumed in this guide is that you're working as the root user - If you're using a non-root user, most commands will need to be prefixed with a sudo.
Part 1
First up, we need to get the iscsi initiator service installed, along with git, gcc, make, ncurses, ncurses-devel and python, which are needed for an on-device kernel recompile:
Code: Select all
apt-get install open-iscsi git gcc make python ncurses ncurses-devel
Code: Select all
mkdir /root/raspberrypi
cd /root/raspberrypi
Code: Select all
git clone https://github.com/raspberrypi/linux.git --depth 1
Code: Select all
cd /root/raspberrypi/linux
zcat /proc/config.gz > .config
Code: Select all
make menuconfig
Once these options are enabled, exit the UI and save changes. To ensure these are set, run:
Code: Select all
grep ISCSI .config
CONFIG_SCSI_ISCSI_ATTRS=y
CONFIG_ISCSI_TCP=y
# CONFIG_ISCSI_BOOT_SYSFS is not set
With this in place, compile your new kernel:
Code: Select all
make
Once done, we need to generate an image of this kernel for the Pi to boot from, then replace your existing kernel:
First up, we need the mkimage python tool:
Code: Select all
cd /root/raspberrypi
git clone https://github.com/raspberrypi/tools
Code: Select all
cd /root/raspberrypi/tools/mkimage
python imagetool-uncompressed.py /root/raspberrypi/linux/arch/arm/boot/Image
Code: Select all
cp /boot/kernel.img /boot/kernel.img-backup
cp kernel.img /boot/kernel.img
Code: Select all
reboot
Assuming all has gone well, you can now use iscsiadm to discover then login to your iscsi target (though hopefully youll already be familiar with configuring an initiator to access a target), for example:
iscsiadm --mode discovery --type sendtargets --portal XXX.XXX.XXX.XXX
where the IP address in the above should be the address of your iscsi target, then once it has been discovered, login to the target with:
iscsiadm --mode node --loginall=all
Part 2 dealing with generating a custom initramfs to boot directly from an iscsi root coming soon, after i've helped the other half with some gardening :<
Re: iSCSI modules for 3.1.9+?
Thank you for this post but I can't get past step 1
Package ncurses is not available, but is referred to by another pakage. This may mean ....... I'm sure you know the rest
E: Package 'ncurses' has no installation candidate
E: Unable to locate package ncurses-devel
Thoughts?
Package ncurses is not available, but is referred to by another pakage. This may mean ....... I'm sure you know the rest
E: Package 'ncurses' has no installation candidate
E: Unable to locate package ncurses-devel
Thoughts?
Re: iSCSI modules for 3.1.9+?
OK, under debain I did "sudo apt-get install ncurses5-dev"
That did the trick, compiling now, I'll let you know of my success or failures.
That did the trick, compiling now, I'll let you know of my success or failures.
Re: iSCSI modules for 3.1.9+?
IIRC Fedora-and-derivatives use "-devel" packages, and Debian-and-derivatives use "-dev" packages. The reasons for which are probably lost in the sands of time 
(haven't used Arch myself yet, so dunno what conventions that uses!)
I think http://elinux.org/RPi_Guides#Advanced would be a great place for nidO to add this information to

(haven't used Arch myself yet, so dunno what conventions that uses!)
I think http://elinux.org/RPi_Guides#Advanced would be a great place for nidO to add this information to

Re: iSCSI modules for 3.1.9+?
This is going to make for a great wiki. I use my iSCSI nas all the time and whether or not it be CIFS or iSCSI many people are going to be using some form of it mixed in with cloud computing. It's already happening.
Re: iSCSI modules for 3.1.9+?
Heya,
Well spotted sorry (I didnt properly verify the package names), so to recap the install in step 1 should in full be:
Just to also point out, another assumption made with this guide is that you have already expanded the default partition size on your SD card (GordonDragon has a good guide on doing so directly on the pi at https://projects.drogon.net/raspberry-p ... al-setup1/) as the relevant packagages and kernel source will not fit on the default 1.6GB partition (about 2GB is required on / in total for the debian install + kernel sources).
Well spotted sorry (I didnt properly verify the package names), so to recap the install in step 1 should in full be:
Code: Select all
apt-get install open-iscsi git gcc make python libncurses5-dev
Re: iSCSI modules for 3.1.9+?
I've now added a draft of this to the list of elinux RPi guides, at:
http://elinux.org/RPi_iSCSI_Initiator
I'll hopefully be getting part 2 on setting up a custom initramfs to boot directly from iscsi written this evening.
http://elinux.org/RPi_iSCSI_Initiator
I'll hopefully be getting part 2 on setting up a custom initramfs to boot directly from iscsi written this evening.
Re: iSCSI modules for 3.1.9+?
How about a part 3 iSCSI target?
Re: iSCSI modules for 3.1.9+?
Sure, I can do that as well - once part 1 has been followed to get an iscsi-capable kernel though, setting up an iscsi target is just a case of installing tgt and configuring the target as needed.
Re: iSCSI modules for 3.1.9+?
I'm still compiling , it's been almost 6 hrs. UGH!
Re: iSCSI modules for 3.1.9+?
Part 2 is now up at:
http://elinux.org/RPi_iSCSI_Initiator#P ... iSCSI_root
Parts 1 and 2 combined now provide a start to finish walkthrough from taking a raw debian image to booting your pi over the network via iSCSI. The whole process as written has been tested by me over this evening, though I havent thoroughly proof-read part 2 for grammar or speeling mastooks so sorry if there are any!
http://elinux.org/RPi_iSCSI_Initiator#P ... iSCSI_root
Parts 1 and 2 combined now provide a start to finish walkthrough from taking a raw debian image to booting your pi over the network via iSCSI. The whole process as written has been tested by me over this evening, though I havent thoroughly proof-read part 2 for grammar or speeling mastooks so sorry if there are any!
Re: iSCSI modules for 3.1.9+?
Ok, I can be the first to say this wiki works great. My iscis is working.
Re: iSCSI modules for 3.1.9+?
I found this thread from a google search and am hoping it isn't too old to still get some help with...
I am trying to get iscsi target working on my raspberry pi, but I am running into a small problem. I have built the kernel as described above and booted from it (and verified that I am running my new custom build kernel) however I still get this error when trying to start iscsitarget:
Is there anything additional I should be selecting from within the kernel's menuconfig beyond what is listed above?
I am trying to get iscsi target working on my raspberry pi, but I am running into a small problem. I have built the kernel as described above and booted from it (and verified that I am running my new custom build kernel) however I still get this error when trying to start iscsitarget:
Code: Select all
/etc/init.d/iscsitarget start
[....] Starting iSCSI enterprise target service:FATAL: Module iscsi_trgt not found.
failed!
Re: iSCSI modules for 3.1.9+?
Same problem here. I'm using the tuto with kernel 3.2.27+zero10 wrote:I found this thread from a google search and am hoping it isn't too old to still get some help with...
I am trying to get iscsi target working on my raspberry pi, but I am running into a small problem. I have built the kernel as described above and booted from it (and verified that I am running my new custom build kernel) however I still get this error when trying to start iscsitarget:
Is there anything additional I should be selecting from within the kernel's menuconfig beyond what is listed above?Code: Select all
/etc/init.d/iscsitarget start [....] Starting iSCSI enterprise target service:FATAL: Module iscsi_trgt not found. failed!
Ideas?
Re: iSCSI modules for 3.1.9+?
zero10 & dmknob, the issue you're both running into is essentially that iSCSI Enterprise Target (iscsitarget) requires a separate kernel module be installed (which isn't explicitly covered in the guide as this primarily deals with setting up the pi as an initiator rather than target).
This module can be downloaded from the repos as iscsitarget-module, however an easier option might be to simply use tgt instead of iscsitarget (an alternative iSCSI target daemon) which does not need any separate kernel module installed, and so will work out of the box after iSCSI support has been enabled (ie part 1 of the guide), its available as tgt in the repos.
This module can be downloaded from the repos as iscsitarget-module, however an easier option might be to simply use tgt instead of iscsitarget (an alternative iSCSI target daemon) which does not need any separate kernel module installed, and so will work out of the box after iSCSI support has been enabled (ie part 1 of the guide), its available as tgt in the repos.
Re: iSCSI modules for 3.1.9+?
Very thanks for reply man, the iscsitarget has putting a lot of complications with install/configure (i can't install the iscsitarget-source and the iscsitarget-module, appears not be in the repos).
And trying to compile the module with module-assistant and debhelper (http://sys-admin.wikidot.com/install-iscsi-target) cause issues too.
I'm away from my Pi and can access then now, but when i'm at home a try it again with tgt.
Question: i messed up my system today, after recompile the kernel. Can i copy the functional recompilled kernel and put up inside a fresh install of Raspbian? Like follow the tuto but skip the 'make' part and then put the recompiled and backuped kernel on /boot.
My final goal is use the Pi with a dual HDD USB case sharing files over my network. Actually i using Samba and EXT4, but i can't plug the USB case on Windows if needed.. I hope that NTFS over iSCSI will have a good speed instead of NTFS with Samba.
Many thanks again!
And trying to compile the module with module-assistant and debhelper (http://sys-admin.wikidot.com/install-iscsi-target) cause issues too.
I'm away from my Pi and can access then now, but when i'm at home a try it again with tgt.
Question: i messed up my system today, after recompile the kernel. Can i copy the functional recompilled kernel and put up inside a fresh install of Raspbian? Like follow the tuto but skip the 'make' part and then put the recompiled and backuped kernel on /boot.
My final goal is use the Pi with a dual HDD USB case sharing files over my network. Actually i using Samba and EXT4, but i can't plug the USB case on Windows if needed.. I hope that NTFS over iSCSI will have a good speed instead of NTFS with Samba.
Many thanks again!
Re: iSCSI modules for 3.1.9+?
Actually, you can read EXT4 on Windows ( for example http://www.ext2fsd.com/ ). The problem you are having most likely has to do with NTFS (and Samba isn't that lightweight alternative). iSCSI is not really made same thing as Samba. What you most likely would have was NFS (yes, you can use it with windows). Although this becomes majorily off topic I suggest that you look in to ext4+nfsdmknob wrote: My final goal is use the Pi with a dual HDD USB case sharing files over my network. Actually i using Samba and EXT4, but i can't plug the USB case on Windows if needed.. I hope that NTFS over iSCSI will have a good speed instead of NTFS with Samba.
Many thanks again!
