Steve's Power Systems BlogPower BlogContactLog inRegister
  • Power Blog
  • Contact

  • Register

IBM Power Systems Blog

Power Systems
  • Front Page
  • Categories
  • Archives
  • Latest comments
  • « Tuning vSCSI Adapter Settings
  • Changing vSCSI attributes without a reboot. »

Setting new device attributes with chdef

Posted by steve on 17 Oct 2016 in AIX Tuning, AIX Tips

While building a new LPAR recently I stumbled across the chdef command.  This command modifies the default value of a predefined attribute of the specified device type in the ODM (PdDv).  For devices that are already configured and of the same class, subclass, and type, this command does not change the active devices attributes, instead it modifies the ODM attributes so these will be changed the next time you reboot the LPAR or rmdev and cfgmgr the device.  The chdef command is a bit like using the chdev -P flag, except it changes the predefined values and the values currently configured for every device that matches the same class, subclass and type.

Let us take a look at the settings on a newly built LPAR and then make some changes with chdef.

 

Checking the default build settings for vscsi1.

lsattr -El vscsi1

rw_timeout      0              Virtual SCSI Read/Write Command Timeout True

vscsi_err_recov delayed_fail   N/A                                     True

vscsi_path_to   0              Virtual SCSI Path Timeout               True

 

Checking the default build settings for vscsi2.

lsattr -El vscsi2

rw_timeout      0              Virtual SCSI Read/Write Command Timeout True

vscsi_err_recov delayed_fail   N/A                                     True

vscsi_path_to   0              Virtual SCSI Path Timeout               True

 

Check the defaut build settings for hdisk0 (rootvg).

lsattr -El hdisk0

PCM             PCM/friend/vscsi             Path Control Module        False

algorithm       fail_over                    Algorithm                  True

hcheck_cmd      test_unit_rdy                Health Check Command       True+

hcheck_interval 0                            Health Check Interval      True+

hcheck_mode     nonactive                    Health Check Mode          True+

max_transfer    0x40000                      Maximum TRANSFER Size      True

pvid            0012345678900000000000000000 Physical volume identifier False

queue_depth     3                            Queue DEPTH                True

reserve_policy  no_reserve                   Reserve Policy             True+

 

 

Find the Class, Subclass and Type values for vscsi adapters.

lsdev -H -F "name class subclass type" | grep -e ^name -e vscsi

name     class     subclass   type

hdisk0   disk      vscsi      vdisk

vscsi1   adapter   vdevice    IBM,v-scsi

vscsi2   adapter   vdevice    IBM,v-scsi

 

Find the Class, Subclass and Type values for hdisks.

lsdev -H -F "name class subclass type" | grep -e ^name -e hdisk

name     class     subclass   type

hdisk0   disk      vscsi      vdisk

 

Change the ODM settings for the vSCSI adapters.

Set the rw_timeout, vscsi_err_recov and vscsi_path_to options.

chdef -a rw_timeout=120 -c adapter -s vdevice -t IBM,v-scsi

chdef -a vscsi_err_recov=fast_fail -c adapter -s vdevice -t IBM,v-scsi

chdef -a vscsi_path_to=30 -c adapter -s vdevice -t IBM,v-scsi

 

Verify the settings have changed in the ODM.

lsattr -El vscsi1

rw_timeout       120         Virtual SCSI Read/Write Command Timeout   True

vscsi_err_recov  fast_fail   N/A                                       True

vscsi_path_to    30          Virtual SCSI Path Timeout                 True

 

lsattr -El vscsi2

rw_timeout       120         Virtual SCSI Read/Write Command Timeout   True

vscsi_err_recov  fast_fail   N/A                                       True

vscsi_path_to    30          Virtual SCSI Path Timeout                 True

 

Verify the running adapter has not changed.

lsattr -Pl vscsi1

rw_timeout       0            Virtual SCSI Read/Write Command Timeout   True

vscsi_err_recov  delayed_fail N/A                                       True

vscsi_path_to    0 Virtual    SCSI Path Timeout                         True

 

lsattr -El vscsi2

rw_timeout       0            Virtual SCSI Read/Write Command Timeout   True

vscsi_err_recov  delayed_fail N/A                                       True

vscsi_path_to    0            Virtual SCSI Path Timeout                 True

 

Change the ODM settings for the vSCSI disks.

chdef -a hcheck_interval=120 -c disk -s vscsi -t vdisk

chdef -a hcheck_mode=nonactive -c disk -s vscsi -t vdisk

chdef -a queue_depth=16 -c disk -s vscsi -t vdisk

 

Verify the settings have changed in the ODM.

lsattr -El hdisk0

PCM              PCM/friend/vscsi               Path Control Module        False

algorithm        fail_over                      Algorithm                  True

hcheck_cmd       test_unit_rdy                  Health Check Command       True+

hcheck_interval  120                            Health Check Interval      True+

hcheck_mode      nonactive                      Health Check Mode          True+

max_transfer     0x40000                        Maximum TRANSFER Size      True

pvid             0012345678900000000000000000   Physical volume identifier False

queue_depth      16                             Queue DEPTH                True

reserve_policy   no_reserve                     Reserve Policy             True+

 

Verify the running hdisk has not changed.

lsattr -Pl hdisk0

PCM              PCM/friend/vscsi               Path Control Module        False

algorithm        fail_over                      Algorithm                  True

hcheck_cmd       test_unit_rdy                  Health Check Command       True+

hcheck_interval  0                              Health Check Interval      True+

hcheck_mode      nonactive                      Health Check Mode          True+

max_transfer     0x40000                        Maximum TRANSFER Size      True

pvid             0012345678900000000000000000   Physical volume identifier False

queue_depth      3                              Queue DEPTH                True

reserve_policy   no_reserve                     Reserve Policy             True+

 

To list all the default settings that have been changed with chdef.

I added the header line in for clarity.

chdef

Attribute         New Default  AIX Default    Device Type

dyntrk            yes          yes            driver/vionpiv/efscsi

fc_err_recov      fast_fail    fast_fail      driver/vionpiv/efscsi

hcheck_cmd        inquiry      test_unit_rdy  PCM/friend/vscsi

hcheck_interval   120          0              PCM/friend/vscsi

hcheck_mode       nonactive    nonactive      PCM/friend/vscsi

rw_timeout        120          0              adapter/vdevice/IBM,v-scsi

vscsi_err_recov   fast_fail    delayed_fail   adapter/vdevice/IBM,v-scsi

vscsi_path_to     30           0              adapter/vdevice/IBM,v-scsi

 

Adding a New vSCSI Device

Before the adding of the new device.

lsdev -Cc adapter | grep vscsi

vscsi1 Available Virtual SCSI Client Adapter

vscsi2 Available Virtual SCSI Client Adapter

 

From the HMC, I used DLPAR to add another vSCSI device.

cfgmgr

lsdev -Cc adapter | grep vscsi

vscsi0 Available Virtual SCSI Client Adapter

vscsi1 Available Virtual SCSI Client Adapter

vscsi2 Available Virtual SCSI Client Adapter

 

Confirm the new device has the updated settings in the ODM.

lsattr -El vscsi0

rw_timeout       120         Virtual SCSI Read/Write Command Timeout   True

vscsi_err_recov  fast_fail   N/A                                       True

vscsi_path_to    30          Virtual SCSI Path Timeout                 True

 

Confirm the new device has the updated settings for the running device.

lsattr -Pl vscsi0

rw_timeout       120         Virtual SCSI Read/Write Command Timeout   True

vscsi_err_recov  fast_fail   N/A                                       True

vscsi_path_to    30          Virtual SCSI Path Timeout                 True

 

 

There are a couple of options to implement the changes on the running devices.

Option 1 - To schedule an LPAR reboot.

Option 2 - Follow my blog post here, How to make changes to vscsi adapters without a reboot.

 

 

 

 

Tags: AIXchdefchdevlsattr

No feedback yet


Form is loading...

May 2025
Mon Tue Wed Thu Fri Sat Sun
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
 << <   > >>

IBM Power Systems Blog

IBM Power Systems - Administration, Tuning and Optimisation. These posts are my own personal opinions and comments only.

Search

Categories

  • All
  • AIX Tips
  • AIX Tuning
  • Command Line Tips
  • HMC Tips
  • LPM Information
  • NIM Tips
  • Performance Testing
  • Power System Affinity
  • PowerHA Tips
  • SRIOV and vNIC
  • Scripts and One Liners
  • VIO Server Tips

Recent Posts

  • AIX NIM Hints and Tips
  • Finding Multiple Install Sources for AIX
  • PowerHA and EMC Busy Devices
  • AIX Random Password Generation
  • VIO Server 3.1.0 and ssh host keys
  • VIO Server 3.1.0 Items to Review
  • Just when you thought you understood idle CPU time!!
  • 40Gbit Adapter Performance Testing
  • LPM Copy Time Statistics
  • IBM HMC Upgrades

Recent Comments

  • steve on How to configure IBM SRIOV Adapters
  • Howard Coles on How to configure IBM SRIOV Adapters
  • steve on AIX mpstat and lssrad part 1
  • Charin Kumjudpai on AIX mpstat and lssrad part 1
  • Gagandeep on LPM and multiple vSwitches
  • Fant Steele on VIO Server 3.1.0 and ssh host keys
  • steve on AIX NIM Hints and Tips
  • alan wilcox on AIX NIM Hints and Tips
  • steve on AIX buf_mode attribute for Virtual Ethernet Adapters
  • Bernhar on AIX buf_mode attribute for Virtual Ethernet Adapters
  • Gery on Reading VLANs from the SEA Adapter
  • steve on Reading VLANs from the SEA Adapter
  • patrice on Reading VLANs from the SEA Adapter
  • steve on Reading VLANs from the SEA Adapter
  • steve on AIX buf_mode attribute for Virtual Ethernet Adapters
  • Chris K. on AIX buf_mode attribute for Virtual Ethernet Adapters
  • jovi on AIX or VIOS Errors: 29FA8C20 and 7BFEEA1F
  • steve on AIX or VIOS Errors: 29FA8C20 and 7BFEEA1F
  • jovi on AIX or VIOS Errors: 29FA8C20 and 7BFEEA1F
  • steve on Creating EtherChannel Devices from Command Line

This collection ©2025 by Stephen Diwell • Contact • Help • Multiple blogs done right! • webhosts

Multiblog engine
Cookies are required to enable core site functionality.