• 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. locate Command Examples in Linux
  2. rsync Command Examples in Linux
  3. Honeypot Tutorials – Modes and Working of Honeypot
  4. The System Activity Reporter (sar) Command in Linux
  5. How to use tar command under Linux
  6. scsi_id Command Examples in Linux
  7. brightnessctl: command not found
  8. Understanding DM-multipath deamon (multipathd)
  9. How to disable SSH host key checking in Linux
  10. CentOS / RHEL 7 : How to configure Network Bonding or NIC teaming

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright