Re: FireWire/SBP2 Target mode

From: Chris Boot
Date: Mon Feb 06 2012 - 08:13:31 EST


Hi folks,

I've been forging ahead in the last few days with my target code and have got to a point where it appears to work fairly well and now needs some real testing and ideally some initial review.

So far I've tested that I can export LUNs to Linux and Mac OS X machines and they can read/write data without issues as you might expect. I've even installed Mac OS X onto an exported LUN and booted from it on an old PowerBook without issue.

You can pull the code from:
git://github.com/bootc/Linux-SBP-2-Target.git

Or use GitHub to have a look etc...:
https://github.com/bootc/Linux-SBP-2-Target

I used the following script to set up a LUN on the target:

modprobe firewire-sbp-target
mkdir /sys/kernel/config/target/sbp
mkdir /sys/kernel/config/target/sbp/test
mkdir /sys/kernel/config/target/sbp/test/unit_0
mkdir /sys/kernel/config/target/sbp/test/unit_0/lun/lun_0
ln -s /sys/kernel/config/target/core/iblock_0/test /sys/kernel/config/target/sbp/test/unit_0/lun/lun_0/test
echo 1 > /sys/kernel/config/target/sbp/test/unit_0/enable

Please note that you can't then disable a unit until all the targets are logged-out. For Linux this usually means 'rmmod firewire_sbp2'. This is one of the first things I'd like to fix but I'm not entirely sure how to go about it yet.

Thanks,
Chris

--
Chris Boot
bootc@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/