Asymmetric Logical Unit Assignment

The Linux SCSI Target Wiki

Revision as of 08:27, 1 September 2009 by Admin (Talk | contribs)
Jump to: navigation, search

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