Difference between revisions of "FreeBSD fiber channel target"

From Aram's Wiki
Jump to: navigation, search
(Introduction)
(Create a ZFS zvol)
Line 11: Line 11:
  
 
  sudo zfs create -p -s -V 850g tank1/export/fc
 
  sudo zfs create -p -s -V 850g tank1/export/fc
 +
 +
== Enable ctld ==
 +
 +
sudo sysrc ctld_enable=YES
 +
 +
== Bring the device online ==
 +
 +
sudo ctladm port -o on isp0
 +
sudo ctladm port -o on isp1
 +
 +
== Check the WWN address ==
 +
 +
sudo ctladm port -o on isp0
 +
 +
You'll get output like:
 +
 +
z800:aram$ sudo ctladm port -l
 +
Port Online Frontend Name    pp vp
 +
0    YES    camsim  camsim  0  0  naa.50000009e370df01
 +
1    YES    ioctl    ioctl    0  0 
 +
2    YES    tpc      tpc      0  0 
 +
3    YES    camtgt  isp0    0  0  naa.2100001b321cd5b6
 +
4    YES    camtgt  isp1    0  0  naa.2101001b323cd5b6
  
 
== References ==
 
== References ==

Revision as of 13:46, 7 November 2018

Introduction

You need:

  • FreeBSD with a kernel that supports your card, e.g. for QLogic QLE2462
  • a fiber channel card that supports target mode
  • a ZFS zvol

Create a ZFS zvol

This will create a sparse 850GB ZFS zvol.

sudo zfs create -p -s -V 850g tank1/export/fc

Enable ctld

sudo sysrc ctld_enable=YES

Bring the device online

sudo ctladm port -o on isp0
sudo ctladm port -o on isp1

Check the WWN address

sudo ctladm port -o on isp0

You'll get output like:

z800:aram$ sudo ctladm port -l
Port Online Frontend Name     pp vp
0    YES    camsim   camsim   0  0  naa.50000009e370df01
1    YES    ioctl    ioctl    0  0  
2    YES    tpc      tpc      0  0  
3    YES    camtgt   isp0     0  0  naa.2100001b321cd5b6
4    YES    camtgt   isp1     0  0  naa.2101001b323cd5b6

References