IBM Support

IBM AIX Troubleshooting: chdev command displays the error message "0514-047 Cannot access a device."

Troubleshooting


Problem

While using the 'chdev' command to switch from SCSI-3 to SCSI-2 reservation methodology or remove the SCSI-3 reservation methodology:

# chdev -l hdisk# -a reserve_policy=single_path

may result in the message when the device is in 'Defined' state:

Method error (/usr/lib/methods/chgdisk):
        0514-047 Cannot access a device.

This document explains the error and how to troubleshoot the issue.

Symptom

When running a 'chdev' command on a hdisk device that is in 'Defined' state, we'll generate the message below:
 
# rmdev -Rl hdisk#
hdisk# Defined

# chdev -l hdisk# -a reserve_policy=no_reserve
Method error (/usr/lib/methods/chgdisk): 0514-047 Cannot access a device.
or

# rmdev -Rl hdisk#
hdisk# Defined

# chdev -l hdisk# -a reserve_policy=single_path
Method error (/usr/lib/methods/chgdisk): 0514-047 Cannot access a device.


Cause

The "SCSI reservation" option helps manage the access to a shared SCSI device, such as a disk or tape drive.

When a SCSI-3 persistent reservation is established on a device, multiple initiators (nodes) gain permission to use it, simultaneously preventing other initiators from accessing it.

To transition from SCSI-3 to SCSI-2 reservation or remove the SCSI-3 reservation methodology, choose from one of the following scenarios:

Scenario 1: Lock the device to a single initiator - this can be achieved by configuring the 'reserve_policy' to 'single_path'.

Scenario 2: Enable the disk to be available for all initiators by configuring the 'reserve_policy' to 'no_reserve'

In both cases, if device is placed in 'Defined' state, it will face difficulties transitioning to 'no_reserve' or 'single_path'.

 

Environment

AIX 7.1, 7.2, 7.3

Resolving The Problem


Choose the option for your scenario.

Option 1. Active device change - Changes the characteristics of the device while allowing the device to remain in the 'Available' state

Use the flag '-U' with 'chdev' to apply the change while the device remains in 'Available' state.

# chdev -l hdisk# -a reserve_policy=no_reserve -U

Run the following command to determine whether the device supports dynamic change of an attribute value:

# lsattr -El hdisk# -a reserve_policy

reserve_policy  PR_exclusive                       Reserve Policy                   True+

The 'True+' label against an attribute indicate the flag '-U' can be used with 'chdev' and no reboot is needed to apply the change in the kernel.

Option 2. Delay device change - Changes the characteristics of the device configuration but does not change the active device

Use the flag '-P'  with 'chdev' then reboot.

# chdev -l hdisk# -a reserve_policy=no_reserve -P
# shutdown -r
Not all devices support changes of an attribute while device is in 'Available' state.

Run the following command to determine whether the device supports dynamic change of an attribute value:

# lsattr -El hdisk# -a reserve_policy

reserve_policy  PR_exclusive                       Reserve Policy                   True

The 'True' label against an attribute indicate the flag '-P' should be used with 'chdev', and reboot is needed to make the change effective in the kernel.





For further assistance we recommend you open an IBM Support case using the following instructions:

1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue.

2. Capture any logs or data relevant to the situation.

3. Contact IBM to open a case:

   -For electronic support, visit the IBM Support Community Page to View and Open Cases:
     https://www.ibm.com/mysupport
   -If you require telephone support, see the web page:
      https://www.ibm.com/planetwide/

4. Provide a clear, concise description of the issue.

 - For guidance, provide these answers in your description:

  1. What is your preferred communication method?
  2. List any error messages (provide full output)
  3. Describe the unexpected behavior
  4. List all applications possibly associated with the problem
  5. List all steps to reproduce the problem if possible
  6. When did the problem begin?
  7. Were any changes applied to the product, or system, which seemed to introduce this problem?

5. If the system is accessible, collect a system snap, and upload all of the details and data for your case.

 - For guidance, select the Mustgather page for your product:

  1. IBM i Mustgather Instructions
  2. AIX, PowerHA (AIX), and PowerVM Mustgather Instructions
  3. Virtual HMC (vHMC) Mustgather Instructions



Document Location

Worldwide


Operating System

AIX:All operating systems listed


[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSVEF8","label":"AIX 7.2 Enterprise Edition"},"ARM Category":[{"code":"a8m0z000000cw0FAAQ","label":"IO Device Drivers"}],"ARM Case Number":"TS013650219","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

More support for:
AIX 7.2 Enterprise Edition

Component:
IO Device Drivers

Software version:
All Versions

Document number:
7015875

Modified date:
29 August 2023

UID

ibm17015875

Manage My Notification Subscriptions