Asymmetric Logical Unit Assignment

The Linux SCSI Target Wiki

(Difference between revisions)
Jump to: navigation, search
m
(ALUA updates)
Line 11: Line 11:
now contains complete SPC-4 implict/explict level fabric support for ALUA!
now contains complete SPC-4 implict/explict level fabric support for ALUA!
-
Also in TCM 3.x, using ALUA for Target Ports in combination with SPC-4 [[Persistent Reservations]] with Activate Persist across Target Power Loss
+
In TCM 3.x, using ALUA for Target Ports in combination with SPC-4 [[Persistent Reservations]] with Activate Persist across Target Power Loss
(PR APTPL) bit is fully supported!
(PR APTPL) bit is fully supported!
 +
 +
With the following patch series [http://groups.google.com/group/linux-iscsi-target-dev/browse_thread/thread/54e3e1c2a45e9ce3 link] add struct file metadata support for
 +
primary/secondary ALUA access states and status.
 +
 +
Also the following patch [http://groups.google.com/group/linux-iscsi-target-dev/browse_thread/thread/e4bce741771829c6 link] adds support for an optional
 +
ALUA transition delay for debugging client side ALUA code.
== What has been implemented..? ==
== What has been implemented..? ==
Line 35: Line 41:
*) Dumping of ALUA Logical Unit Group and Target Port Group associations with tcm_dump.py
*) Dumping of ALUA Logical Unit Group and Target Port Group associations with tcm_dump.py
 +
 +
*) Saving of in-band/out-of-band ALUA Target Port Group Metadata to struct file
 +
 +
*) ConfigFS settable delay for state transitions for testing upstream scsi_dh_alua logic.
== What does the [[lio-utils]] ALUA CLI ops look like..? ==
== What does the [[lio-utils]] ALUA CLI ops look like..? ==
Line 138: Line 148:
== Whats left to implement..? ==
== Whats left to implement..? ==
-
 
-
*) Saving of in-band/out-of-band ALUA Target Port Group Metadata to struct file
 
-
 
-
*) ConfigFS settable delay for state transitions for testing upstream scsi_dh_alua logic.
 
*) Secondary Target Port Groups for managing the Offline secondary ALUA access state.
*) Secondary Target Port Groups for managing the Offline secondary ALUA access state.

Revision as of 08:27, 1 September 2009

Asymmetric Logical Unit Assignment (ALUA) is a method of outer-nexus OS dependent multipath on the SCSI Initiator port that allows ALUA Access States to be set on per SCSI target port basis. This allows the SCSI Initiator port to make some intelligent decisions for bandwith, for example using OPTIMIZED and NON-OPTIMIZED states, and with explict ALUA using SET_TARGET_PORT_GROUPS, can change ALUA access states according to admin or automated initiator side actions. Implict ALUA is done through target-side ConfigFS actions with target_core_mod and iscsi_target_mod or lio-utils CLI ops.

ALUA is defined in SPC-3 and SPC-4 documents, the Target_Core_Mod/ConfigFS ALUA code has been implemented using spc4r17. The ALUA group infrastructure first appeared in TCM/LIO 3.0 generic configfs enabled TCM engine, and with the following patch series for TCM/LIO 3.1 link, our lio-core-2.6.git/drivers/target/target_core_alua.c now contains complete SPC-4 implict/explict level fabric support for ALUA!

In TCM 3.x, using ALUA for Target Ports in combination with SPC-4 Persistent Reservations with Activate Persist across Target Power Loss (PR APTPL) bit is fully supported!

With the following patch series link add struct file metadata support for primary/secondary ALUA access states and status.

Also the following patch link adds support for an optional ALUA transition delay for debugging client side ALUA code.

Contents

What has been implemented..?

What does the lio-utils ALUA CLI ops look like..?

 --addlungp=LU_GP_NAME
                       Add ALUA Logical Unit Group
 --addtgptgp=HBA/DEV <TG_PT_GP_NAME>, --addaluatpg=HBA/DEV <TG_PT_GP_NAME>
                       Add ALUA Target Port Group to Storage Object
 --clearaluapref=HBA/DEV <TG_PT_GP_NAME>
                       Clear ALUA Target Port Group Preferred Bit
 --dellungp=LU_GP_NAME
                       Delete ALUA Logical Unit Group
 --deltgptgp=HBA/DEV TG_PT_GP_NAME, --delaluatpg=HBA/DEV TG_PT_GP_NAME
                       Delete ALUA Target Port Group from Storage Object
 --listlugps           List ALUA Logical Unit Groups
 --listtgptgp=HBA/DEV <TG_PT_GP_NAME>, --listaluatpg=HBA/DEV <TG_PT_GP_NAME>
                       List specific ALUA Target Port Group for Storage
                       Object
 --listtgptgps=HBA/DEV, --listaluatpgs=HBA/DEV
                       List all ALUA Target Port Groups for Storage Object
 --setaluapref=HBA/DEV <TG_PT_GP_NAME>
                       Set ALUA Target Port Group Preferred Bit
 --setaluastate=HBA/DEV <TG_PT_GP_NAME> <ALUA_ACCESS_STATE>
                       Set ALUA access state for TG_PT_GP_NAME on Storage
                       Object.  The value access states are "o" =
                       active/optimized, "a" = active/nonoptimized, "s" =
                       standby, "u" = unavailable
 --setaluatype=HBA/DEV <TG_PT_GP_NAME> <ALUA_ACCESS_TYPE>
                       Set ALUA access type for TG_PT_GP_NAME on Storage
                       Object.  The value type states are "both" =
                       implict/explict, "explict", "implict", or "none"
 --setlugp=HBA/DEV LU_GP_NAME
                       Set ALUA Logical Unit Group
 --cleartgptoff=TARGET_IQN TPGT LUN, --clearaluaoff=TARGET_IQN TPGT LUN
                       Clear ALUA Target Port Secondary State OFFLINE
 --settgptgp=TARGET_IQN TPGT LUN TG_PT_GP_NAME, --setaluatpg=TARGET_IQN TPGT LUN TG_PT_GP_NAME
                       Set ALUA Target Port Group for LIO-Target Port/LUN
 --settgptoff=TARGET_IQN TPGT LUN, --setaluaoff=TARGET_IQN TPGT LUN
                       Set ALUA Target Port Secondary State OFFLINE
 --showtgptgp=TARGET_IQN TPGT LUN
                       Show ALUA Target Port Group for LIO-Target Port/LUN

What does the ConfigFS ALUA layout look like..?

    # ALUA Logical Unit Group(s), which contain associations to storage objects
    # in /sys/kernel/config/target/core/$HBA/$DEV/
    target# tree /sys/kernel/config/target/core/alua/
    /sys/kernel/config/target/core/alua/
    `-- lu_gps
        `-- default_lu_gp
            |-- lu_gp_id
            `-- members
        `-- lio_lu_gp
            |-- lu_gp_id
            `-- members
    # For ALUA Target Port Groups, which contain associations to fabric module
    # SCSI Target Port/LUNs for each individual storage object
    target# tree /sys/kernel/config/target/core/iblock_0/lvm_test0/alua
    /sys/kernel/config/target/core/iblock_0/lvm_test0/alua
    |-- default_tg_pt_gp
    |   |-- alua_access_state
    |   |-- alua_access_status
    |   |-- alua_access_type
    |   |-- members
    |   |-- nonop_delay_msecs
    |   |-- preferred
    |   `-- tg_pt_gp_id
    |-- lio_alua_east
    |   |-- alua_access_state
    |   |-- alua_access_status
    |   |-- alua_access_type
    |   |-- members
    |   |-- nonop_delay_msecs
    |   |-- preferred
    |   `-- tg_pt_gp_id
    `-- lio_alua_west
        |-- alua_access_state
        |-- alua_access_status
        |-- alua_access_type
        |-- members
        |-- nonop_delay_msecs
        |-- preferred
        `-- tg_pt_gp_id

What does a running configuration look like..?

Please have a look at link for an example of implict and explict ALUA operation.

What clients have been tested..?

However, note that any Host OS that is SPC-3/SPC-4 MPIO/ALUA capable should work just fine.

Whats left to implement..?

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Google AdSense