Recently some disks had their PVIDs wiped accidentally. If you have the original PVIDs, they can be restored without too much trouble (and averting a restoration process).
The steps for a VIOS/VIOC compared to an AIX system are similar. In the case of a VIOS, there are a couple more steps involved.
To replace the PVID, run a command like:
Step 1: (put PVID into a text file)
perl -e 'print pack("H*","0123456789abcdef");' > /tmp/pvid
replace the 0123456789abcdef with the old PVID you wish to restore.
Step 2: (write PVID to the physical device)
cat /tmp/pvid | dd of=/dev/hdiskX bs=1 seek=128
Replace hdiskX with the actual physical device you are attempting to fix. Assuming it works, you should get output from dd indicating 8 records in, and 8 records out.
Note: If you get an I/O error when attempting the dd operation, you may be hitting a size issue. I recently hit this… Check the size of the device with: bootinfo -s hdiskX
. If the size of the disk = 0, that is your problem. You won’t be able to write anything to a 0 byte device. Simply do a rmdev -dl hdiskX
and then rescan the bus with: cfgmgr
. It should detect the disk at the right size (verifiable with: bootinfo -s hdiskX
) and then the dd operation should complete properly.
Once the dd has written the records properly, remove the device and rescan: rmdev -dl hdiskX && cfgmgr
You should now have the proper PVID back.
In the case of a VIOS, you may NOT be able to write to the PV if it has virtual mappings. So, you’ll want to unmap the virtual disk(s) from the VIOC (and rmdev the devices), make the above changes, and then re-create your virtual mappings to the VIOC.