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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • 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. How to Convert PuTTY’s private key (.ppk) to SSH key
  2. Linux OS Service ‘microcode_ctl’
  3. How to Limit/throttle rsync transfer speed in Linux
  4. How to Mirror Swap, Boot and Root Partions in CentOS/RHEL 7 Using mdadm Utility
  5. How to Change the filesystem Labels in CentOS/RHEL
  6. How to Disable os-prober in CentOS/RHEL 7
  7. How To Check a Disk for Bad Blocks or Disk Errors on CentOS / RHEL
  8. CentOS / RHEL : How To Check FC Brocade HBA Firmware
  9. dig Command Examples in Linux
  10. Understanding iscsiadm Utility in CentOS / RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright