I'm trying to present a ZFS file system as an iSCSI target. This is ultimately for using it with OS X Time Machine, but that should be irrelevant in this question.

# zfs get all | grep scsi

From several blog posts, it appears it should have a "shareiscsi" property. But just to be thorough, I installed the iscsi target package, hoping it would show up:

# pkg install pkg:/network/iscsi/target
# svcadm enable -rs network/iscsi/target
# svcs | grep scsi
online         Mar_30   svc:/network/iscsi/initiator:default
online          6:02:56 svc:/network/iscsi/target:default

Still no shareiscsi in the properties. I did see a blog post about having to install "SUNWiscsitgt" but according to pkg, it is obsolete:

# pkg info -r SUNWiscsitgt
Name: SUNWiscsitgt
State: Not installed (Obsolete)

What am I missing?

1 Answer 1


It appears OpenIndiana does not use the shareiscsi property. Also (perhaps relatedly) COMSTAR is not included as part of the base installation. So I fired up a fresh OpenIndiana VM and ran the following commands and was able to create, share and mount a sparse LUN without any drama:

sudo -s
pkg install network/iscsi/target
svcadm enable -s stmf
svcadm enable -s iscsi/target
zfs create -o mountpoint=none rpool/iscsi
zfs create -V 8G -s rpool/iscsi/yourmom
sbdadm create-lu /dev/zvol/rdsk/rpool/iscsi/yourmom
sbdadm list-lu

Use that GUID from the sbdadm output (my GUID below):

stmfadm add-view 600144f096c28d0000004dbeb9df0001
itadm create-target
itadm list-target

Take your target name (example: iqn.1986-03.com.sun:02:9f57392e-9859-61fe-ec5c-da681f9214dd) and put it in to your iSCSI initiator (I use the free globalSAN iSCSI on my mac) along with the IP address (or hostname) of your OpenIndiana box. Tada.

Source: Setting up COMSTAR and iSCSI target on the Nexenta Wiki.

  • 1
    I wish I could double plus one for "yourmom". Mar 4, 2012 at 22:56
  • 1
    Oracle Solaris 11 doesn't seem to support shareiscsi either. These directions did work for me though. Too bad it's not as straightforward as the previous zfs goodness. May 14, 2012 at 3:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.