Sbp-target

From IEEE 1394 FireWire Wiki
Revision as of 19:07, 15 June 2012 by Dajt (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Here's the series of commands I used to create a sbp2-target instance

  1. Create a backing store for the exported filesystem This creates an 8G store
  2. Use a path appropriate for your system

dd < /dev/zero bs=1M count=8192 > /local/tmp/backing-store

  1. Load the target core and the sbp2 interface

modprobe sbp-target

  1. Tell the target subsystem about the backing store

mkdir -p /sys/kernel/config/target/core/fileio_0/sbptest echo "fd_dev_name=/local/tmp/backing-store,fd_dev_size=8589934592" > /sys/kernel/config/target/core/fileio_0/sbptest/control echo 1 > /sys/kernel/config/target/core/fileio_0/sbptest/enable

  1. Create and enable the sbp2 target
  2. I used the uuid of my host adapter here. You can use something different.

mkdir -p /sys/kernel/config/target/sbp/00110666000000c1/tpgt_1 mkdir -p /sys/kernel/config/target/sbp/00110666000000c1/tpgt_1/lun/lun_0 ln -s /sys/kernel/config/target/core/fileio_0/sbptest /sys/kernel/config/target/sbp/00110666000000c1/tpgt_1/lun/lun_0/ echo 1 > /sys/kernel/config/target/sbp/00110666000000c1/tpgt_1/enable

  1. On the initiator host, use dmesg to find out the device name of the target, then

mkfs.ext4 /dev/sdb # Or whatever the actual device is

  1. And mount it

mount /dev/sdb /mnt/tmp

Personal tools