As most of you have read, I received 2 X Raspberry Pi the other day. I’ve been actively hacking and working away on these lovely little devices.
One of the projects I wanted to do, was get Lio-Target (iSCSI Target) running on the Pi. I know that the Pi doesn’t have gigabit networking, but I thought this would still be an interesting proof of concept. Anyways, I got it running, and I have succesfully connected to a USB storage device which was configured as a iSCSI target on my Pi, from my Windows 7 workstation.
This is a brief overview, I will be providing instructions in detail at a later date. Here’s how I did it:
1) Download Fedora 17 for ARM (build for Raspberry Pi).
2) Put latest Firmware and Kernel from Raspberry Pi github repo on to the boot partition. Resize my 16GB card so I have boot, root,
and a 2 GB swap.
3) Download snapshot of Raspberry Pi kernel sources. I built the iSCSI Target as modules (I also threw in some other stuff for future projects but it’s not important right now).
3) Install compilers, libraries, etc for kernel build process.
4) Compile kernel
5) Build Raspberry Pi kernel image using Raspberry Pi image tools on github repo, copy to boot.
6) Boot off new kernel
7) Install Target CLI from yum (this was a nice change from compiling on my own), and then build Lio-Utils (this isn’t mandatory, but I like Lio-utils).
8) Configure target, connect, test.
Here’s a copy/paste of proof I have it running!
[root@fedora-arm lio-utils.git]# uname -a
Linux fedora-arm 3.1.9.001 #1 PREEMPT Thu Jun 28 16:40:46 MDT 2012 armv6l armv6l armv6l GNU/Linux
[root@fedora-arm lio-utils.git]# w
09:12:10 up 34 min, 5 users, load average: 0.99, 1.51, 1.10
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 host.digitall 31Dec69 22:38 2.27s 0.02s tail -f /var/log/messages
root pts/1 host.digitall 31Dec69 0.00s 1.19s 0.05s w
root pts/2 host.digitall 08:58 13:24 13.89s 13.04s top
root pts/3 host.digitall 31Dec69 0.00s 0.00s ? –
[root@fedora-arm lio-utils.git]# /etc/init.d/target status
[—————————] TCM/ConfigFS Status [—————————-]
HBA Index: 1 plugin: iblock version: v4.1.0-rc1-ml
Status: ACTIVATED Execute/Left/Max Queue Depth: 0/128/128 SectorSize: 512 MaxSectors: 240
iBlock device: sdb UDEV PATH: /dev/sdb
Major: 8 Minor: 16 CLAIMED: IBLOCK
[—————————] LIO-Target Status [—————————-]
\——-> tpgt_1 TargetAlias: LIO Target
TPG Status: ENABLED
TPG Network Portals:
TPG Logical Units:
\——-> lun_0/30b42bf9f5 -> target/core/iblock_0/array0
Target Engine Core ConfigFS Infrastructure v4.1.0-rc1-ml on Linux/armv6l on 3.1.9.001
RisingTide Systems Linux-iSCSI Target v4.1.0-rc1
[root@fedora-arm lio-utils.git]# cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : swp half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : BCM2708
Revision : 0002
Serial : 00000000c1ad6318