How to reset or cleanup the device tree on an AIX server?
Today in this post, we will see how to reset or clean up the device tree on an AIX server.
Please note you may need to run the procedure at the end of this article, if ‘bosboot’ won’t run after doing this.
If you are facing duplicate hdisks with the same PVIDs preventing basic AIX commands such as bosboot from running, then also do this process it is useful.
Due to inconsistency between the AIX operating system and Veritas Volume Manager (VxVM), it is always desirable to reset or cleanup device tree on AIX OS.
Lets see the steps we need to perform to clean the device tree on AIX.
I. Take backup of info files and remove them.
# 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 )
II. Remove non-root device tree entries, if any, from the /dev/vx/dmp and /dev/vx/rdmp.
III. Re-run the configuration.
# cfgmgr -v ### (This command will perform OS level scan of connected devices and update the device states / status).
IV. 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
If there are large number of disks to be removed from system configuration then it may be desirable to write a script to automate the process.
If the above 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 you are specific about certain disks then you can only deport the disk group that being used by certain disk groups. )
3. Remove all disks from Veritas view.
# vxdisk rm
4. Remove all disks except rootvg and VG’s disks from AIX. Some systems may only have has only rootvg.
# rmdev -l hdiskY -d # lsdev -Cc disk | grep Defined ### We should also remove Defined disks. lspv only lists Available disks. ## May be when these devices were Available left some information on volume manager config info. hdisk5 Defined 00-08-01 Other FC SCSI Disk Drive hdisk6 Defined 00-08-01 Other FC SCSI Disk Drive # rmdev -l hdiskY -d
5. Test run ‘bosboot -a’, if broken then perform following steps.
# vxdmpadm native release # rm /usr/lib/boot/protoext/disk.proto.ext.chrp.vxvm.disk.rte # vxdmpadm native acquire # bosboot -a