• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Verify a Lun is in Active/Optimized Mode when ALUA Is Configured on Storage

By admin

If the Linux server has device-mapper-multipath configured, you can run ‘multipath -ll’ to list how disks are grouped together. For ALUA mode, you can check if a disk is in the Active/Optimized or non-optimized group.

This post, however, is to discuss how to use sg_rtpg command to check the target port group asymmetric access state (aas). Along with sg_inq command, you can check if a specific disk (/dev/sdX) is in Active/optimized group or not.

You can use sg_rtpg to decode the status code and asymmetric access state from each target port group descriptor returned:

# sg_rtpg -vvd /dev/sda

If sg_repg returns “Report Target Port Groups command not supported“, the disk does not have ALUA enabled or supported. If ALUA is enabled on storage, the output should show the ‘aas‘ state and the list the target group/port id(s).

target port group asymmetric access state : 0x01 (active/non optimized)

Then You can check the same disk’s SCSI Inquiry page 0x83 :

# sg_inq -vv -p 0x83 /dev/sda

The sg_inq will report which target group/port it belongs to, and you can verify if the target port group is optimized or not.

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. RHEL 7 – RHCSA Notes (Cheat Sheets)
  2. How to configure iSCSI target using targetcli in CentOS / RHEL 7
  3. fdisk: Unable to write /dev/sdg: Bad file descriptor – error while formatting USB disk
  4. How to Configure Network Teaming in CentOS/RHEL 7
  5. How to use Magic SysRq tool in CentOS / RHEL
  6. CentOS / RHEL 7 firewalld : Command line reference (Cheat Sheet)
  7. How to Enable Password Aging in Linux with NIS
  8. How to extend ASM disk from OS level in CentOS/RHEL
  9. Extend the size of /boot partition on virtualized environment (CentOS/RHEL 6)
  10. Audit rules to log reboot command executions in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • How to disable ICMP redirects on CentOS/RHEL
  • What are Oracle Key Vault Roles
  • What Is Oracle Key Vault
  • Auditing with Oracle Database Vault Reports
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary