Synchronizing Disk Names

From Wikistix

This document was originally available at http://service.software.ibm.com/rs6k/techdocs/90605223414648.btml but appears to have since moved and disappeared. This text is from a hardcopy taken 1999-03-05. I have recently successfully tested this procedure on a p570 LPAR running AIX 5.3.

Special Notices

Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to evaluate and integrate this information into the customer's operational environment.

Synchronizing Disk Names

About This Document

Use the following script when the names of your hard disks are out of order (for example hdisk0, hdisk2, hdisk3 instead of hdisk0, hdisk1, hdisk2). The order of the disk names generally does not cause errors, but it may cause confusion for the user. Run the following dsksync script to alleviate such confusion. The script renames the hard disks.

The order of the disks' names after you reboot the machine will be determined on the order they are detected by the device configuration process. For instance, a disk at the address 00-00-0S-00 will be numbered before a disk at the address 00-00-0S-20 or 00-05-00-00.

This document applies to AIX Versions 3.1 through 4.2 on the RS/6000.

This procedure has been known to work but not guaranteed or supported on AIX V5.3/6.1/7.1. On AIX 7.1 the rendev command may be more appropriate.

Procedure

Before running this script, make sure the key is in Normal position.

lsdev -Cc disk | awk '{ print $1 }' | while read HDname; do
 odmdelete -q "name = $HDname " -o CuAt
 odmdelete -q "value = $HDname " -o CuAt
 odmdelete -q "name = $HDname " -o CuDv
 odmdelete -q "value3 = $HDname " -o CuDvDr
 odmdelete -q "name = $HDname " -o CuVPD
 odmdelete -q "name = $HDname " -o CuPath
done
rm -f /dev/hdisk*
rm -f /dev/rhdisk*
savebase

When the shell script completes successfully, run the following command to shut down and reboot.

shutdown -Fr