Where the Playstation2/iSCSI project has existed for some time, moving Internet Small Computer Systems Interface aka iSCSI packets on the Playstation 3 supercomputer & Cell Broadband Architecture is just starting to unfold..
The export of storage objects on Linux/ppc64 through the v3.0 code is up and running! You will need to configure and built v2.6.29 from lio-core-2.6.git and under 'Device Drivers' built Generic Target Core Engine and ConfigFS Infrastructure and Linux-iSCSI.org iSCSI Target Mode Stack as loadable modules.
First, install git and git-core packages on the Playstation3, then follow the git clone instructions from LIO-Target#Building_Generic_Target_Engine_and_LIO-Target_v3.0.0_from_kernel.org_git:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git lio-core-2.6.git
once lio-core-2.6.git/drivers/target/target_core_mod.ko and drivres/lio-core/iscsi_target_mod.ko have been built and installed with 'make modules_install', make sure that ConfigFS is mounted
The v3.0 codebase uses ConfigFS for configuration of target_core_mod and iscsi_target_mod. Because any storage objects can be accessed and exported, the configfs module must be loaded, and configfs must be mounted.
mount -t configfs configfs /sys/kernel/config
This can also be added to /etc/fstab:
configfs /sys/kernel/config configfs defaults 1 1
Once ConfigFS is mounted and target_core_mod and iscsi_target_mod can be loaded, the following set of ConfigFS calls will allow for R/W demo access to ps3rom. Here is what it looks like:
modprobe target_core_mod
export CONFIGFS=/sys/kernel/config/
export TARGET=/sys/kernel/config/target/core/
export FABRIC=/sys/kernel/config/target/iscsi/
# Create PSCSI ConfigFS storage object from HTCL 0:0:0:0
mkdir -p $TARGET/pscsi_0/sr0
echo scsi_channel_id=0,scsi_target_id=0,scsi_lun_id=0 > $TARGET/pscsi_0/sr0/control
echo 1 > $TARGET/pscsi_0/sr0/enable
export DEF_IQN="iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157"
export PORTAL="192.168.0.160:3260"
# The first mkdir(2) to $FABRIC will load iscsi_target_mod
mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/np/$PORTAL"
echo 8 > "$FABRIC/$DEF_IQN/tpgt_1/param/MaxConnections"
# Create the SCSI Target Port from PSCSI storage object
mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_0"
ln -s $TARGET/pscsi_0/sr0 "$FABRIC/$DEF_IQN/tpgt_1/lun/lun_0/lio_bdrom_port"
# Allow demo mode R/W access for the iSCSI target portal group
echo 0 > $FABRIC/$DEF_IQN/tpgt_1/attrib/authentication
echo 1 > $FABRIC/$DEF_IQN/tpgt_1/attrib/generate_node_acls
echo 0 > $FABRIC/$DEF_IQN/tpgt_1/attrib/demo_mode_write_protect
# Enable the TPG Endpoint so initiators can login
echo 1 > $FABRIC/$DEF_IQN/tpgt_1/enable
target# tree/sys/kernel/config/target /sys/kernel/config/target/ |-- core | |-- alua | | |-- lu_gps | | | `-- default_lu_gp | | | |-- alua_access_state | | | |-- lu_gp_id | | | `-- members | | `-- tg_pt_gps | | `-- default_tg_pt_gp | | |-- alua_access_state | | |-- members | | `-- tg_pt_gp_id | `-- pscsi_0 | |-- hba_info | `-- sr0 | |-- alua_lu_gp | |-- attrib | | |-- block_size | | |-- emulate_tas | | |-- emulate_ua_intlck_ctrl | | |-- hw_block_size | | |-- hw_max_sectors | | |-- hw_queue_depth | | |-- max_sectors | | |-- queue_depth | | `-- task_timeout | |-- control | |-- enable | |-- fd | |-- info | |-- pr | | |-- res_holder | | |-- res_pr_all_tgt_pts | | |-- res_pr_generation | | |-- res_pr_holder_tg_port | | |-- res_pr_registered_i_pts | | |-- res_pr_type | | `-- res_type | `-- wwn | |-- vpd_assoc_logical_unit | |-- vpd_assoc_scsi_target_device | |-- vpd_assoc_target_port | |-- vpd_protocol_identifier | `-- vpd_unit_serial |-- iscsi | |-- iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157 | | `-- tpgt_1 | | |-- acls | | |-- attrib | | | |-- authentication | | | |-- cache_dynamic_acls | | | |-- default_cmdsn_depth | | | |-- demo_mode_write_protect | | | |-- generate_node_acls | | | |-- login_timeout | | | |-- netif_timeout | | | `-- prod_mode_write_protect | | |-- control | | |-- enable | | |-- lun | | | `-- lun_0 | | | |-- alua_tg_pt_gp | | | `-- lio_bdrom_port -> ../../../../../../target/core/pscsi_0/sr0 | | |-- np | | | `-- 192.168.0.160:3260 | | | |-- info | | | `-- sctp | | `-- param | | |-- AuthMethod | | |-- DataDigest | | |-- DataPDUInOrder | | |-- DataSequenceInOrder | | |-- DefaultTime2Retain | | |-- DefaultTime2Wait | | |-- ErrorRecoveryLevel | | |-- FirstBurstLength | | |-- HeaderDigest | | |-- IFMarkInt | | |-- IFMarker | | |-- ImmediateData | | |-- InitialR2T | | |-- MaxBurstLength | | |-- MaxConnections | | |-- MaxOutstandingR2T | | |-- MaxRecvDataSegmentLength | | |-- OFMarkInt | | |-- OFMarker | | `-- TargetAlias | `-- lio_version `-- version 22 directories, 68 files
TARGET_CORE[0]: Loading Generic Kernel Storage Engine: v3.0.0 on Linux/ppc64 on 2.6.29
TARGET_CORE[0]: Initialized ConfigFS Fabric Infrastructure: v1.0.0 on Linux/ppc64 on 2.6.29
SE_PC[0] - Registered Plugin Class: TRANSPORT
PLUGIN_TRANSPORT[1] - pscsi registered
PLUGIN_TRANSPORT[4] - iblock registered
PLUGIN_TRANSPORT[5] - rd_dr registered
PLUGIN_TRANSPORT[6] - rd_mcp registered
PLUGIN_TRANSPORT[7] - fileio registered
SE_PC[1] - Registered Plugin Class: OBJ
PLUGIN_OBJ[1] - dev registered
Target_Core_ConfigFS: Located se_plugin: c000000006a44030 plugin_name: pscsi hba_type: 1 plugin_dep_id: 0
CORE_HBA[0] - Linux-iSCSI.org SCSI HBA Driver v3.0 on Generic Target Core Stack v3.0
CORE_HBA[0] - ps3rom
CORE_HBA[0] - Attached SCSI HBA to Generic Target Core with TCQ Depth: 1 MaxSectors: 128
CORE_HBA[0] - Attached HBA to Generic Target Core
PSCSI: Allocated pdv: c00000000c384500 for sr0
Target_Core_ConfigFS: Allocated se_subsystem_dev_t: c000000006927800 se_dev_su_ptr: c00000000c384500
PSCSI[0]: Referencing SCSI Channel ID: 0
PSCSI[0]: Referencing SCSI Target ID: 0
PSCSI[0]: Referencing SCSI LUN ID: 0
pscsi: Using SPC_PASSTHROUGH, no reservation emulation
pscsi: Using SPC_ALUA_PASSTHROUGH, no ALUA emulation
CORE_PSCSI[0] - Activating Legacy Device with TCQ: 1 at SCSI Location (Channel/Target/LUN) 0/0/0
Vendor: SONY Model: PS-SYSTEM 302R Revision: 4094
Type: CD-ROM ANSI SCSI revision: 00
PSCSI Status Byte exception at task: c00000000696ee00 CDB: 0x12 Result: 0x08000002
CORE_PSCSI[0] - Added Type: CD-ROM for 0:0:0
Target_Core_ConfigFS: Registered se_dev->se_dev_ptr: c000000003050000
Target_Core_ConfigFS: REGISTER -> group: d000000002087f20 name: iscsi
Linux-iSCSI.org iSCSI Target Core Stack v3.0.0 on Linux/ppc64 on 2.6.29
<<<<<<<<<<<<<<<<<<<<<< BEGIN FABRIC API >>>>>>>>>>>>>>>>>>>>>>
Initialized struct target_fabric_configfs: c00000000d418600 for iscsi
<<<<<<<<<<<<<<<<<<<<<< END FABRIC API >>>>>>>>>>>>>>>>>>>>>>
LIO_TARGET[0] - Set fabric -> lio_target_fabric_configfs
iscsi_allocate_thread_sets:195: ***OPS*** Spawned 4 thread set(s) (8 total threads).
TARGET_CORE[iSCSI]: Allocated Discovery se_portal_group_t for endpoint: None, Portal Tag: 0
CORE[0] - Allocated Discovery TPG
Loading Complete.
Target_Core_ConfigFS: REGISTER -> Located fabric: iscsi
Target_Core_ConfigFS: REGISTER -> d0000000025f5fa0
Target_Core_ConfigFS: REGISTER -> Allocated Fabric: iscsi
Target_Core_ConfigFS: REGISTER -> Set tf->tf_fabric for iscsi
lio_target_call_coreaddtiqn(): name: iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157
CORE[0] - Added iSCSI Target IQN: iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157
LIO_Target_ConfigFS: REGISTER -> iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157
LIO_Target_ConfigFS: REGISTER -> Allocated Node: iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157
lio_target_tiqn_addtpg() called: name tpgt_1
lio_target_tiqn_addtpg() parent name: iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157
lio_target_tiqn_addtpg() Using TPGT: 1
TARGET_CORE[iSCSI]: Allocated Normal se_portal_group_t for endpoint: iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157, Portal Tag: 1
CORE[iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157]_TPG[1] - Added iSCSI Target Portal Group
LIO_Target_ConfigFS: REGISTER -> iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157
LIO_Target_ConfigFS: REGISTER -> Allocated TPG: tpgt_1
LIO_Target_ConfigFS: REGISTER -> iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157 TPGT: 1 PORTAL: 192.168.0.160:3260
CORE[0] - Added Network Portal: 192.168.0.160:3260 on TCP on network device: None
CORE[iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157] - Added Network Portal: 192.168.0.160:3260,1 on TCP on network device: None
CORE[iqn.2003-01.org.linux-iscsi.playstation3.cell:sn.73b073c4e157]_TPG[1] - Incremented np_exports to 1
LIO_Target_ConfigFS: addnptotpg done!
iSCSI_TPG[1]_LUN[0] - Activated iSCSI Logical Unit from CORE HBA: 0
LIO_Target_ConfigFS: Created Port Symlink sr0 -> lun_0
Disabling iSCSI Authentication Methods for TPG: 1.
iSCSI_TPG[1] - Generate Initiator Portal Group ACLs: Enabled
iSCSI_TPG[1] - Demo Mode Write Protect bit: OFF
iSCSI_TPG[1] - Enabled iSCSI Target Portal Group
Running the legacy v2.9 LIO-Target code is still supported, following the BUILD instructions in for v2.9 can be found at LIO-Target#Building_LIO-Target_v2.9-STABLE_from_SVN_source. The following builds are a bit outdated, but might still be helpful for some folks..
iscsi-target-module-2.6.25-2.9.0.295-1.powerpc.rpm
This modules are built for ppc64 and built with the toolkit for Fedora Core 8 ppc. This is gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)
This module has been tested with 2.6.25 from ps3-linux.git and built against arch/powerpc/configs/ps3_defconfig with drivers/md/* enabled as modules for MD/LVM access with LIO-Target.
To use the BD-ROM on a kernel older than 2.6.24, you will need a small patch, ps3rom-use-128-max-sector.diff for full performance. Please see: patch
iscsi-target-tools-2.9.0.295-1.ppc.rpm
Note that these are 32-bit and built on Fedora Core 8.
Have a look at LIO-cluster/ps3-linux/ for perl RPMs for Fedora PPC for iscsi-target-tools.
Follow BUILD-README.
Please see the following link for more information about the ADDON CD.
The PS3 has been serving FILEIO and IBLOCK storage objects for Oracle Cluster Filesystem v2 (OCFS2) and EXT3 Filesystem access on the OS 2008 platform running on Nokia N800 and i386 Ubuntu clients.
Have a look at OCFS2/iSCSI_for_OS-2008 for more information.
A demonstration and discussion takes place at LinuxWorld PS3 Bof running both HD media types between a Sony Playstation 3 game console, Apple Macbook Pro Laptop, and USB connected Toshiba/MSFT HD-DVD drive.
Also, initial 802.11n v1.0 wireless through GB/sec ethernet with IPv[6,4] on an external router connected to PS3 running 2.6.23-rc5 from ps3-linux.git kernel sources have been completed
Export of resources from ps3pf_storage achieved! ps3-11262006-2.jpg
A iSCSI dual mode Target/Initiator handling storage packets from node to node ps3-11262006-3.jpg
Longterm Project