XP Storage
1753726 Members
4509 Online
108799 Solutions
New Discussion

Mass remove volumes using CLI

 
Jim_Mc
Occasional Contributor

Mass remove volumes using CLI

Hi there,

I need to remove thousands of volumes from an XP24000 system and using the RWC or the Command View web interface is taking too long, so I would like to be able to do this from the CLI.

I have a list of CU:LDEV ids, and for that list I need to do the following.

* Remove the Continuous Access relationship for the volume.

* Remove the host paths for the volume.

* Remove the volume from the X-group / parity group / raid group and destroy the volume.

* Delete the X-group / parity group / raid group.

I've been looking at the documentation for the Command View CLI, and it seems the only command I am able to perform from the above would be removing the host paths for the volume using the DeleteLUN function.

The documentation is poor at best, as the example for DeleteLUN is demonstrated with:

hdvmcli DeleteLun -o "D:\logs\XP1024 DeleteLun.log" "serialnum=10001" "model=XP1024"
"port=1" "domain=1" "devnum=1" "deletionoption=lusekeep"

There is nothing which confirms how the domain id is obtained, or whether the devnum here is the LUNid, or the CU:LDEV id or whether it needs to be passed as hexidecimal or decimal.

Can anyone advise how I could do the full process as listed above with the Command View CLI?

If it's not possible in the Command View CLI, is there any other CLI interface for the XP24000 which would allow me to do this?  Is it possible to SSH or Telnet to the XP24K to run these commands, and which address on the XP24K would I connect to do this?

Many thanks,

Jim

1 REPLY 1
StorageMike
HPE Pro

Re: Mass remove volumes using CLI

Hi

CVCLI went as far as the XP12K, you can't use it with the XP24K.  

Sadly there is no single CLI for what you want to do. For the remore copy stuff you'd need to use HORCM but this assume you have a valid HORCM file otherwise you're stuck with the GUI, to delete LUNS you need hdvmcli.

In your example below 

hdvmcli DeleteLun -o "D:\logs\XP1024 DeleteLun.log" "serialnum=10001" "model=XP1024"
"port=1" "domain=1" "devnum=1" "deletionoption=lusekeep"

domain is the number of the hostgroup as it appears on the chip port, you can use domainnickname instead which is the hostgroup name. 

devnumber is the full HEX device for example devnum=00:02:01 is LUN 02:01

so for example

HDVMCLI DeleteLUN model=XP24000 serialnum=12345 domainnickname=Mymachine portname=CL5-C devnum=00:02:01 deletionoption=lusekeep
HDVMCLI DeleteLUN model=XP24000 serialnum=12345 domainnickname=Mymachine portname=CL6-C devnum=00:02:01 deletionoption=lusekeep

I work for HPE

Accept or Kudo