How to reset or cleanup the device tree on an AIX server?

book

Article ID: 100026744

calendar_today

Updated On:

Description

Error Message

No errors may be indicated, but there may be:

Incorrect or duplicate entries in vxdisk list.

An inability to manipulate disks as desired either in Veritas, LVM, or at the Operating System level.

Cause

There may be any number of causes for the unexpected behavior.

Resolution

Perform the following process to clean the device tree on AIX:
1. Move the old VxVM configuration "info" files, so that they will be recreated on vxconfigd restart.

# mv /etc/vx/array.info /etc/vx/old_array.info
# mv /etc/vx/disk.info /etc/vx/old_disk.info
# mv /etc/vx/jbod.info /etc/vx/old_jbod.info
# mv /etc/vx/dmppolicy.info /etc/vx/old_dmppolicy.info  ( If present on the system )

Please note that "disk.info" file may not exist on the system.
Where the "persistence" setting has a value of "no", the "disk.info" file is not used by VxVM and therefore not created.


2.  Remove non-root device tree entries from the /dev/vx/dmp and /dev/vx/rdmp.
3.  Perform an OS level scan of connected devices and determine the device states / status with the following command.

# cfgmgr -v
 

4.  Restart the VxVM configuration daemon
(freeze the HA cluster before running this command, if the system is not a stand-alone system)


# vxconfigd -k -x syslog

 

Where the above process does not work the following steps below may be followed. 
This procedure requires a reboot to complete the process.
 
1.  Unmount all file systems that are part of VxVM disk groups.
2.  Deport all disk groups.  ( If the issue is relevant to certain disks then it may be necessary to only deport the disk group that is affected by the disk issue. )
3. Remove all disks from Veritas view:

# vxdisk rm                                  
 

4. Cleanup the VxVM device tree.

# mv /etc/vx/array.info /etc/vx/old_array.info
# mv /etc/vx/disk.info /etc/vx/old_disk.info
# mv /etc/vx/jbod.info /etc/vx/old_jbod.info
# mv /etc/vx/dmppolicy.info /etc/vx/old_dmppolicy.info  ( If present on the system )

5. Remove non-root device tree entries from the /dev/vx/dmp and /dev/vx/rdmp.
6. Remove all disks except rootvg / boot disks and VG related disks from AIX.

Note that some systems may only have a "rootvg".

The disks may be in an "Available" or "Defined" state. Use the following command to list the disks:

# lsdev -Cc disk

Now remove the disks.

Syntax:

# rmdev -l (DISK) -d
 

For example, to remove "hdisk5":

# rmdev -l hdisk5 -d

(If there are large number of disks to be removed from system configuration then it may be desirable to write a script automating the process).

7. When the disk removal process is complete, reboot the system.


Issue/Introduction

Due to inconsistency between the AIX operating system and Veritas Volume Manager (VxVM), it is desirable to reset or "cleanup" the device tree on the AIX system.