IBM Support

VIOS Shared Storage Pools - Reusing Disks

How To


Summary

Some hints and tips added disk LUNs with a previous life into the SSP.

Objective

Nigels Banner

Steps

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. 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 use:
cleandisk –r hdisk5
To clear out the storage pool signature on hdisk5 use:
cleandisk –s hdisk5
They both report messages as they go and fail to find the now missing defunct cluster etc. This is normal.
If they still don't make the disk available for SSP use, you can try the following as the root user:
chpv –C hdisk5
Notes: The -C option: Clears the owning volume manager from a disk. This flag is only valid when running as the root user. This command will fail to clear LVM as the owning volume manager if the disk is part of an imported LVM volume group.

If you SSP is up and running and you are adding new disks to it, you can use the following command to list disks that are fully available for SSP use:
lspv -clustername galaxy -capable
As an example on a different VIOS:
$ lspv -clustername gaalaxy -capable
PV NAME          SIZE(MB)    PVUDID                            
hdisk20          2048        332136005076802808423600000000000002E04214503IBMfcp

$ lspv -free                      
NAME            PVID                                SIZE(megabytes) 
hdisk0          00c049304a97c9ba                    544792          
hdisk2          00c049303f183ab1                    369984          
hdisk20         000e0a218343b798                    2048            

$ lspv -avail
NAME            PVID                                SIZE(megabytes) 
hdisk0          00c049304a97c9ba                    544792          
hdisk2          00c049303f183ab1                    369984          
hdisk20         000e0a218343b798                    2048            
$ 
In this case hdisk0 an hdisk2 are local LUNs (suitable for alternative boot disk upgrades ot the backing devie for a client LPAR - an old fashioned way of providing disk space), and hdisk20 is a LUN and the only one available across the SSP cluster of Virtual I/O Servers.  You might think the size is very small - it is my alternative SSP repository disk for emergency use only.

Having got the disks in the right state and available my "cluster -create ... "  command worked.
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 disk 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 with prepdisk.   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!

Additional Information


Other places to find Nigel Griffiths IBM (retired)

Document Location

Worldwide

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"Component":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"HW1W1","label":"Power -\u003EPowerLinux"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
13 June 2023

UID

ibm11165288