ALUA questions

Elliott, Robert (Server Storage) Elliott at hp.com
Tue Dec 20 13:09:30 PST 2005


* From the T10 Reflector (t10 at t10.org), posted by:
* "Elliott, Robert (Server Storage)" <Elliott at hp.com>
*
[Excerpting questions #4 and #5]

> From: "Knight, Frederick" <Frederick.Knight @netapp.com>

> To: <t10 at t10.org>          
> Subject: TMF, ordering across I_Ts, and ALUA questions              
> Date: 12/16/2005 01:51 PM

>              
> 4) Regarding the ALUA state of UNAVAILABLE:
> 
>    A) How should the task manager handle task management commands if
>       it receives them when it is in the UNAVAILABLE state?
> 
>    Section 5.8.2.4.5 of the SPC-3 rev. 23 specifcation states the
>    following about a logical unit in the UNAVAILABLE state:
> 
>     "The SCSI target device is not required to participate in all
>      task management functions (see SAM-3 and the applicable SCSI
>      transport protocol standards)."
> 
>    If the task manager receives a TMF request while the target port
>    is in the UNAVAILABLE state, which of the following should the task
>    manager perform?
> 
>      i) Return a response of TMF REJECTED to the task management
> function?
>     ii) Not respond to the task management function at all?
>    iii) Return success to the task management function even though it
>        could not process it?  For example, the task manager returns
>        success to a LUN Reset request even though it could not clear
>        out SCSI-2 reservations on the logical unit.

iii) would be bad; i) seems like the best approach.  

A proposal would be needed to make this the rule.  The wording was
vague in 00-232r0 and never really changed.

>    B) How should the task manager handle TMF requests it 
>       receives right before the target port transitions to the 
>       ALUA state of UNAVAILABLE?
> 
>    Section 5.8.2.5 of the specification discusses Transitions of ALUA
>    state. It states that:
>      "If during the transition the logical unit is inaccessible, then
>       the transition is performed as a single indivisible 
>       event and the
>       device server shall respond by either returning BUSY status, or
>       returning CHECK CONDITION status, with the sense key set to
>       NOT READY, and the sense code set to LOGICAL UNIT NOT 
>       ACCESSIBLE, ASYMMETRIC ACCESS STATE TRANSITION; or
> 
>       If during the transition the target ports in a target port
>       group are able to access the requested logical unit, then the 
>       device server shall support those of the following commands 
>       that it supports while in the active/optimized asymmetric 
>       access state:
> 
>       ...
> 
>       The SCSI target device is not required to participate 
>       in all task management functions."
> 
>    How does "not required to participate" translate into a command
>    response?
> 
>    Suppose the following scenario occurs:
> 
>     1) Target port is in the Active/Optimized State.
>     2) Task Manager receives a TMF (ex. LUN Reset).
>     3) Target port implicitly transitions to the UNAVAILABLE state
>        before the TMF could be processed/completed.
> 
>    How should the task manager handle the TMF now that the LU is
>    inaccessible? Should the task manager:
> 
>      i) Return a response of TMF REJECTED to the task management
>         function?
>     ii) Not respond to the task management function at all?
>    iii) Return success to the task management function even though it
>         could not finish process it?

i) implies that the task manager has not acted on the function
yet.  ii) leads to timeouts.  iii) implies that it did all that
it requested, which is not the case.  The only response defined
by SAM that fits is SERVICE DELIVERY OR TARGET FAILURE.  It would
be prudent for the target device to complete its outstanding task
management functions before undertaking a transition.

>    C) How should the device server handle tasks that it had received
>       before
>       the target port transitioned to the ALUA state of UNAVAILABLE?
> 
>    Section 5.8.2.5 of the specification also states:
> 
>      "Once a transition is completed, the new target port asymmetric
>       access state may apply to some or all tasks entered 
>       into the task
>       set before the completion of the transition. The new target port
>       asymmetric access state shall apply to all tasks received by the
>       device server after completion of a transition."
> 
>    Suppose the following scenario occurs:
> 
>     1) Target port is in the Active/Optimized State.
>     2) Device Server receives multiple SCSI Read and Write requests.
>     3) Target port implicitly and successfully transitions to the
>        UNAVAILABLE state before any of the requests complete.
> 
>    Is the device server allowed to implicitly abort all of 
>    those tasks?
>    Section 5.8.2.5 of the specification states:
> 
>      "An implicit CLEAR TASK SET task management function may be
>       performed following a transition failure."
> 
>    But this only pertains to transition FAILUREs and in this scenario,
>    the transition succeeded.  Which of the following should the device
>    server do?
> 
>      i) Implicitly generate a CLEAR TASK SET and abort all 
>         tasks without
>         sending any response to any of the tasks?
>     ii) Return a response of CHECK CONDITION with sense key NOT READY
>         and
>         additional sense code of LOGICAL UNIT NOT ACCESSIBLE, TARGET
>         PORT IN UNAVAILABLE STATE?

There's no failure, so ii).

> 
> 5) A) If the target port is in the ALUA state of STANDBY, does the
>    device server need to be able to satisfy all the requirements of 
>    a Persistent Reservation request, including those that have the
>    APTPL bit set?
> 
>    Section 5.8.2.4.4 of the SPC-3 rev. 23 specification states the
>    following about the STANDBY state:
> 
>       "When being accessed through a target port in the standby target
>        port asymmetric access state, the device server shall support
>        those of the following commands that it supports while in the
>        active/optimized target port asymmetric access state:
>        ...
>        l) PERSISTENT RESERVE IN;
>        m) PERSISTENT RESERVE OUT;"
> 
>    Suppose the device server is able to support the APTPL bit when the
>    target port is in the ACTIVE/OPTIMIZED state.  Section 6.12.3 on
the
>    Persistent Reserve Out command in the SPC-3 rev. 23 specification 
>    states the following about the APTPL bit:
> 
>       "If the last valid APTPL bit value received by the device server
>        is
>        zero, the loss of power in the SCSI target device shall release
>        the persistent reservation for the logical unit and remove all
>        registered reservation keys (see 5.6.6). If the last valid
>        APTPL bit value received by the device server is one, 
>        the logical
>        unit shall retain any persistent reservation(s) that may be
>        present
>        and all reservation keys (i.e., registrations) for all I_T
>        nexuses
>        even if power is lost and later returned (see 5.6.4)."
> 
>    If contact with the logical unit (which also happens to be the
>    storage location of the registration keys of a persistent 
>    reservation command) and
>    the target port transitions to the ALUA state of STANDBY, does it
>    still
>    need to support the APTPL bit setting for persistent reservations?

There's no exception listed, so yes.

> 5) B) What should an initiator port do when it receives back an ALUA
>    state of STANDBY from the target port?  

Use a target port in the ACTIVE state.  If none are found, send
SET TARGET PORT GROUPS to upgrade this target port to the ACTIVE
state.

>    What should an initiator port do when it receives back an ALUA
state 
>    of UNAVAILABLE from the target port?

Wait for the firmware upgrade to finish, or call service to fix
the problem.

>    What should an initiator port do when it receives back an ALUA 
>    state of TRANSITIONING?

Try again later or use another path.
> 
>    What does an initiator port do when all target ports are 
>    in STANDBY?

Try to upgrade one or more into ACTIVE state.

>    Or if all target ports are in TRANSITIONING?

Try again later.

>    Which ALUA state should the target port return if it wishes the
>    initiator port to keep retrying I/O until it succeeds?

None.  BUSY status has that meaning.

> 
>              Thanks,
>              Fred Knight
>              Network Appliance

--
Rob Elliott, elliott at hp.com
Hewlett-Packard Industry Standard Server Storage Advanced Technology
https://ecardfile.com/id/RobElliott


*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org





More information about the T10 mailing list