You don't necessarily need to specify "host group" or "target group" for a 
view. If no target group is specified by default it is assumed that any "host 
group" initiators logging in will see the LU. There is similar handling for 
host groups and even LUN numbers. So essentially the only thing you need for a 
view is the GUID (LU). Also the way you configure depends upon the way you want 
to use the system. There is no right or wrong here (from the system's point of 
view). But mostly I have seen people not create a target for every LU. They 
just use few targets (mostly one) and control the mappings using the host 
groups. Again your use case might be different. More answers below ....


> -----Original Message-----
> From: storage-discuss-boun...@opensolaris.org [mailto:storage-discuss-
> boun...@opensolaris.org] On Behalf Of Peter Taps
> Sent: Friday, November 12, 2010 12:47 PM
> To: storage-discuss@opensolaris.org
> Subject: Re: [storage-discuss] Relationship between volume, LU, target,
> target group, etc.
> 
> Thank you all for your help.
> 
> I am working on an application where I wish to hide all the internal
> details from the end-user. Here is how I envision user-interaction will
> be:
> 
> 1. From a list of volumes, select the volume to be shared (only one
> volume at a time).
> 2. Enter the IQN of one or more (if clustered) initiators.
> 3. Optionally, from a list of IP interfaces for the local box, select
> the IP address(es) to use for this mapping.
> 
> Given this, I am trying to understand the steps I need to take behind
> the scenes.
> 
> 1. For the selected volume, create a corresponding LU using "sbdadm
> create_lu."
> 2. Create a host group using "stmfadm create-hg"
> 3. Add the IQN of each initiator using "stmfadm add-hg-member"
> 4. Create a target group using "stmfadm create-tg"
> 5. Create a target using "itadm create-target." Add this target to the
> target group using "stmfadm add-tg-member."

You can probably eliminate steps 4 and 5 as I described above.

> 6. If the user specified IP address(es) to use, then create a target
> portal group using "itadm create-tpg" and bind the target to this tpg
> using "itadm modify-target -t."
> 7. Create a view using "stmfadm add-view" and add the target group, the
> host group and the LUN to it.
> 
> Questions:
> 1. Are these steps correct or did I miss anything?

You may have to track the associations between various groups for situations 
like if someone wants to delete the storage, you will delete everything 
related. Also use stmfadm for creating the LU as all the sbdadm commands are 
now supported under stmfadm.

> 2. As a view can deal with only target groups and host groups, you have
> to create a target group even if there is just one target. Likewise,
> you have to crate a host group even if there is just one host. Is this
> correct?

Yes.

> 3. Can a view have more than one LU? Or, for each LU, we are required
> to create a new view even though the target group and the host group
> may match?

No. Views are maintained on a per LU basis. A LU can have one or more views 
though.

> 4. Can the same target group be reused by multiple views? Can the same
> host group be reused by multiple views?

Yes.

> 5. Finally, when would I ever have two targets in a target group?

You can add as many targets in a target group you want. Those target don't even 
need to exist. A target group or host group is just a list of target/host 
identifiers which are only checked when a certain host logs in through a 
certain target. Why you need to do that depends upon your use case.

Sumit

> 
> Thank you once again for your help.
> 
> Regards,
> Peter
> --
> This message posted from opensolaris.org
> _______________________________________________
> storage-discuss mailing list
> storage-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/storage-discuss
_______________________________________________
storage-discuss mailing list
storage-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/storage-discuss

Reply via email to