Clearing PVID’s from hdisks

On an ESS, early versions of Subsystem Device Driver flakes out if your hdisks have PVIDs. You can get hdisks with PVID’s lots of ways, but it’s easy to clear out. Here’s a quick and dirty hack to clean them up. I know it’s dumb, but it works, and at 2am, it’s easy to know what it’s doing.

CAUTION: this WILL remove PVIDs for all hdisks not in the rootvg. If you have other SCSI or SSA disks, be sure to exclude them. Also, this only deletes the PVID from the ODM, not the physical disk. DO NOT run “chpv pv=clear”, that will whack the PVID on the disk.

for hdisk in `lspv|grep hdisk|grep -v none|grep -v rootvg|awk '{print $1}'`
do
odmdelete -o CuAt -q "name=$hdisk and attribute=pvid"
done

Leave a Reply

Your email address will not be published. Required fields are marked *