Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a number of iSCSI targets on an OpenIndiana server using COMSTAR. Basically:

  • zfs create -V 10g pool/comstar/vol
  • sbdadm create-lu /dev/zvol/rdsk/pool/comstar/vol
  • stmfadm add-view 600144F077000000000048C62BF00001
  • itadm create-target

It's that last part I'm having a hard time understanding because I'm not telling itadm what LU to use. I assume it'll use whatever LU is available, but then after I've created a few of these, how do I know what target maps to what LU? I can't find any correlating bit of info.

'stmfadm list-lu -v' lists LU GUID and data file (e.g. /dev/zvol/rdsk/pool/comstar/vol/)
'itadm list-target -v' and 'stmfadm list-target -v' give me the target IQN but no info about what physical volume/LU they map to.

This seems like something you'd commonly want to know, but I seem to be missing something.

share|improve this question
up vote 3 down vote accepted

by default add-view will create a view with the following properties:

View Entry: 0
LUN          :  0
Host group   :  All
Target group :  All

If you want to define which targets map to a view/LU you need to create a target-group:

stmfadm create-tg TG1

then add your target to it:

stmfadm add-tg-member -g TG1

Now when you create a view, you need to tell it to use the new target group:

stmfadm add-view -t TG1 600144F077000000000048C62BF00001

The view will now look like this:

View Entry: 0
LUN          :  0
Host group   :  All
Target group :  TG1
        Operational Status: Online
        Provider Name     : iscsit
        Alias             : -
        Protocol          : iSCSI
        Sessions          : 0
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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