2

In AIX, if i want to change device attribute, i can use 2 different ways:

  1. Change attribute and reconfigure device. Attribute will be changed immediately. But if devices is used ( for example, fs mounted ), this way cannot be used.

    # chdev -l hdisk6 -a hcheck_interval=20 Method error (/etc/methods/chgdisk): 0514-062 Cannot perform the requested function because the specified device is busy.

  2. Change attribute, but not reconfigure device. Attribute will be changed only after device reconfigure ( usually after reboot )

    # chdev -l hdisk6 -a hcheck_interval=20 -P hdisk6 changed

So, there is must be a method to check the compliance - "what is the current value of device attribute?"

In AIX 6.1 or newer i can check it by command lsattr with options "-P" ( unlike "-E", which show value stored in ODM, which may be different from current value )

# for dev in $(lsdev | awk '/^hdisk/ { print $1; }'); do echo $dev $(lsattr -Pl $dev -a
 hcheck_interval ) $(lsattr -El $dev -a hcheck_interval);done
hdisk0 hcheck_interval 20 Health Check Interval True hcheck_interval 20 Health Check Interval True
[...]
hdisk3 hcheck_interval 20 Health Check Interval True hcheck_interval 20 Health Check Interval True
hdisk4 hcheck_interval 0 Health Check Interval True hcheck_interval 0 Health Check Interval True
hdisk6 hcheck_interval 0 Health Check Interval True hcheck_interval 20 Health Check Interval True

In above example i can see that hdisk4 and hdisk6 run with hcheck_interval=0 ( not compliant ), but hdisk6 after reconfigure ( after reboot ) will run with hcheck_interval=20 ( compliant )

But in AIX 5.3 or elder there is no "-P" option in lsattr utility. Is it possible to check actual value of device attribute in AIX 5.3 ?

update

in aix 6.1 or newer i also can check current value with kdb. But i still have no way to check current value in aix 5.3

# kdb
[...]
(0)> adevq
NAME            ADDR               STATE      ACTIVE_IO  ST.MCHNE.
hdisk2          0xF1000100379CA800 0x1        0x0        0x0
hdisk1          0xF1000100379CA000 0x1        0x0        0x0
hdisk0          0xF100010037A0C800 0x1        0x0        0x0
hdisk7          0xF100010FECE89800 0x1        0x0        0x0
hdisk8          0xF100010FECF5A800 0x1        0x0        0x0
hdisk6          0xF100010FED079800 0x1        0x0        0x0

(0)> adevq 0xF100010FED079800
[...]
    hcheck_t &hcheck = 0xF100010FED079890
[...]
(0)> ahcheck 0xF100010FED079890
struct health_check {
    struct watchdog &watch = 0xED079890
    uint mode = 0x2
    uint interval = 0x0
    uint cmd = 0x0
    struct device_queue *dev_ptr = 0xF100010FED079800
}
Oleg Korchagin
  • 126
  • 1
  • 9

0 Answers0