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.2 and 4.x on the RS/6000.
Before running this script, make sure the key is in Normal position. If applicable.
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 done rm -f /dev/hdisk* rm -f /dev/rhdisk* savebaseWhen the shell script completes successfully, run the following command to shut down and reboot.
shutdown -Fr
After the reboot, the disk entries will be recreated.