VIOS Shared Storage Pools - Reusing Disks
nagger 100000MRSJ Comment (1) Visits (13121)
I am using the VIOS Shared Storage Pools more these days and it reduces my system admin time and I really like the Thin Provisioning feature as I have limited SAN disks. Any way, I dusted off an machine that I did my initial investigation on and decided to rebuilt the cluster (of one VIOS) now that I know what I am doing :-)
The command : cluster -create -clustername galaxy -repopvs hdisk2 -spname atlantic -sppvs hdisk3 hdisk4 hdisk5 -hostname diamondvios1
fails with "PV IS IN USE hdisk4". PV meaning Physical Volume. Yes, it is the machine used to create my Shared Storage Pool movies - if you have not seen them of the other 80 AIX and Power Techie hands-on movie take a look at http
The various Shared Storage Pools commands double check the contents of the disks before adopting them and refuse if they suspect the disks is already in use. The developers had already thought of that so we have a command that checks the disk contents (presumably the first block of the disk) and looks around to make sure a cluster of the name on the disk or a pool name found on the disk does not exist. Then is marks the disk as not in use ready to be reused. I knew there was a command to do this but my memory failed me and I had to hunt around for ages to find it. Hence this blog entry.
So if you are sure the disk can be reused try the cleandisk command:
To clear out the cluster signature on hdisk5
They both report messages as they go and fail to find the now missing defunct cluster etc. This is normal. Now my cluster -create ... command worked first time.
Of course, sledge-hammer systems administrators might try the dd command to overwrite the first few block with zeros but if you get that wrong or hit a disk that is in use then you really are in big trouble. Not Recommended.
On the way I also thought I had the right command but prepdisk is used to assign disks ready for Active Memory Sharing - make sure you use the right command for the right job. Also chkdev is useful for checking a device (disk) is suitable for virtual disk provisioning - amazing what you find when you go looking. Perhaps it is time I sat down and read the entire VIOS manual again and learn all these new commands that have sneaked in over the many years we have run the VIOS!
Until next time, Nigel Griffiths