Removing devices from ODM

I have replace a couple of hdisks in and old AIX 4 system. I have them assigned to the hdisk numbers previously in the system. When I don an lsvg -p vgname, i see them old devices by device number still come up as missing. I think they are still in the ODM,, how can I remove them?

Thanks
Mike

To remove a disk:
rmdev -dl hdiskX
Is this what you want?
Could you post lspv/lsvg/lsdev -Cc disk output?

#set -vx
echo "What do you wish to delete?"
read ITEM
>/tmp/odmdel.ksh
CLASS="CuAt CuDep CuDv CuDvDr CuVPD"
for i in $CLASS
do
odmget $i | grep $ITEM >/dev/null
if [ $? -eq 0 ];then
ATTR=`odmget $i | grep $ITEM | sort -n | uniq`
echo odmdelete -o $i -q `echo \"$ATTR\"| awk '{print $0}'` >> /tmp/odmdel.ksh
fi
done
chmod 700 /tmp/odmdel.ksh

Here is the lspv. hdisk 2 and 3 were replaced and discovered.
---------------------------------------------------------------
hdisk0 00004044f15c9063 rootvg
hdisk1 0002430911ced77c rootvg
hdisk2 00024309cf54760e rootvg
hdisk3 00024309cf560ba8 ascentvg
hdisk4 000243090181befa ascentvg
hdisk5 000243099ff4b502 ascentvg
hdisk6 000243099ff4c2a4 plcvg
hdisk7 0002430901949cf6 hcsjbvg
hdisk8 0002430901885cca hcsjbvg
hdisk9 00024309018912ad hcsjbvg
hdisk10 00024309ee64a17e plcvg
hdisk11 00024309fb394830 sjbvg
hdisk12 000243090d34d131 sjbvg
hdisk13 00007628aeef81c1 sjbvg
hdisk14 00007628aef20f1e sjbvg
hdisk15 00007628aef27c23 sjbvg
hdisk16 00007628aef2d570 ascentvg
---------------------------------------------------------------

but when I do a lsvg -p rootvg I see:
---------------------------------------------------------------
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 268 7 00..07..00..00..00
hdisk1 active 268 10 00..10..00..00..00
0516-304 lsvg: Unable to find device id 0000404414206652 in the Device
Configuration Database.
0000404414206652 missing 268 129 54..38..00..00..37
hdisk2 active 537 537 108..107..107..107..108
---------------------------------------------------------------

the new hdisk2 is part of the vg, but the old device is still somewhere. I need to get rid of it.

This happens in both of the vg's I added a new disk

Thanks
Mike

Seems that you didn't do the replacement in the right way... You should have done
a reducevg before. If you did not, then try:

reducevg rootvg 0000404414206652

good luck :wink:

I had to use the -d option to force the deletion of partitions, but it worked.

Thanks
Mike