Skip to content


AIX/PowerHA – cannot remove caavg_private disk (change pvid of a disk)

another chapter in storage migration….. Previously XIV delivered all disks. Currently it is VSP. A VSP disk had to replace the caa private disk in order to complete the migration. This process, focused around the procedure from on of my previous posts (search this blog for “CAA_FORCE_ENABLED=1”) kept failing and eventually being limited by time all XIV disks were removed from cluster nodes. HA ODM still showed the original caa disks PVID when queried and the cluster would not sync or operate…..

The PVID from the new caa candidate disk was removed and replaced with the PVID of the original caa disk. Next, both nodes have been rebooted, cluster synced and the peace returned to the cluster!

# lspv
hdisk1          00f660fd7411a5f3              rootvg          active
hdisk0          00f660fdc7e49dad              rootvg          active
hdisk10         00f660fd67ab3d30              lawappqa_vg
hdisk11         00f660fd67ab42ed              lawappqa_vg
hdisk12         00f660f667cb1f64              None
hdisk13         00f660f667cb1e16              None
hdisk14         00f660fd67ab4665              lawappqa_vg
hdisk15         00f660fd67ab4916              lawappqa_vg
hdisk16         00f660f667cb13bf              None
hdisk17         00f660f667cb0f0e              None

The last disk (hdisk17) will be the new caa disk, we will clean its pvid (on all cluster nodes!).

# chdev -l hdisk17 -a pv=clear

The original disk pvid was “00f660fde083fb16”. Now it will be assigned to hdisk17 (done on the primary node).

# perl -e 'print pack("H*","00f660fde083fb16");' >/tmp/pvid
# cat /tmp/pvid | dd of=/dev/hdisk17 bs=1 seek=128
# rmdev -dl hdisk17
# shutdown -Fr

After the reboot (which really was not needed as cfgmgr could be used instead).

# lspv
hdisk1          00f660fd7411a5f3               rootvg          active
hdisk0          00f660fdc7e49dad               rootvg          active
hdisk10         00f660fd67ab3d30               lawappqa_vg
hdisk11         00f660fd67ab42ed               lawappqa_vg
hdisk12         00f660f667cb1f64               None
hdisk13         00f660f667cb1e16               None
hdisk14         00f660fd67ab4665               lawappqa_vg
hdisk15         00f660fd67ab4916               lawappqa_vg
hdisk16         00f660f667cb13bf               None
hdisk2          00f660fde083fb16               caavg_private   active
# /usr/es/sbin/cluster/utilities>./clmgr sync cluster

Notice that hdisk17 has morphed into hdisk2, which is normal. Now, let’s start the cluster and watch it run.

today, scouting the Web, I found another way of changing AIX disk PVID token – see bellow for a neat script (I have not tested it).

#!/usr/bin/ksh
PVID=$1
DISK=$2
set -A a `echo $PVID | \
awk ' {
for (f=1; f <= length($0); f=f+2) { print "ibase=16\nobase=8\n"toupper(substr($0,f,2)) } }' |\ bc 2>/dev/null`
/usr/bin/echo "\0"${a[0]}"\0"${a[1]}"\0"${a[2]}"\0"${a[3]}"\0"${a[4]}"\0"${a[5]}"\0"${a[6]}"\0"${a[7]}"\0\0\0\0\0\0\0\0\c" | dd bs=1 seek=128 of=/dev/$DISK

Posted in LINUX.

Tagged with , , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield



Copyright © 2016 - 2017 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.