Sbp-target

From IEEE 1394 FireWire Wiki
(Difference between revisions)
Jump to: navigation, search
(sbp2-target testing example)
 
Line 1: Line 1:
Here's the series of commands I used to create a sbp2-target instance
+
<nowiki>Here's the series of commands I used to create a sbp2-target instance
  
 
# Create a backing store for the exported filesystem  This creates an 8G store
 
# Create a backing store for the exported filesystem  This creates an 8G store
Line 22: Line 22:
 
# And mount it
 
# And mount it
 
mount /dev/sdb /mnt/tmp
 
mount /dev/sdb /mnt/tmp
 +
</nowiki>

Revision as of 19:09, 15 June 2012

Here's the series of commands I used to create a sbp2-target instance # Create a backing store for the exported filesystem This creates an 8G store # Use a path appropriate for your system dd < /dev/zero bs=1M count=8192 > /local/tmp/backing-store # Load the target core and the sbp2 interface modprobe sbp-target # 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 # Create and enable the sbp2 target # 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 # 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 # And mount it mount /dev/sdb /mnt/tmp

Personal tools