Showing posts with label storage. Show all posts
Showing posts with label storage. Show all posts

Saturday, 3 February 2024

Deleting vvols inside contianer directly from 3par or HPE Primera storage

In HPE 3par or Primera storage, we have noticed that, sometimes when we deleted disks of virtual machines but didn't get back space to storage. Such issue occurred in storage when vvols not deleting from storage back-end.

To remove vvols from storage back-end, we need to run below commands on Storage CLI. 

Below steps need to be carefully followed before removing the vvols from container in storage. 

1. Login on Storage via service account in CLI mode and check the container name.

HPE cli% showvvolsc
                                        --------(MiB)--------
Name                  Num_VMs Num_VVols    In_Use Provisioned

hpe.vvol.ds01     269      1339 103369860   275678184
-------------------------------------------------------------
total                     269      1339 103369860   275678184

showvvolsc command will show you the container name in HPE 3par or Primera storage. All vvols are part of this container. 

2. To check the unbound vm_state, please run the below command.

HPE cli% showvvolvm -d -sc hpe.vvol.ds01

above command which show you the below parameter which you require to check that vm state.

VM_Name - Virtual machine name

UUID - Virtual machine UUID number

Num_vv - Number of vvols present on virtual machine

Num_snap - Number of snapshot present on virtual machine

Physical - Total vvols size of virtual machines

Logical - Used vvols size of virtual machine in container

GuestOS - Operating system information         

VM_State- Machine is power-on, unbound ( power-off or deleted) and bound state.

UsrCPG - CPG of storage

SnpCPG - CPG of snapshot storage

Container - Name of container where all vvols are kept.          

CreationTime - creation of vvols time.

3. To check the particular virtual machine vvol name from back-end, please run the below command.

HPE cli% showvvolvm -sc sys:all -vv redhat
                                                                            -----(MiB)------
VM_Name         VV_ID VVol_Name                  VVol_Type Prov Compr Dedup Physical Logical

redhat       8000 cfg-redhatba-e3fb20cb      Config    tpvv No    No        2457    4096
                 8001 dat-redhatba-a8d0bea0      Data      tpvv No    No        9830   51200
                 8002  dat-redhatb-de253534-Snap Data      snp  NA    NA           0   51200
--------------------------------------------------------------------------------------------
              1 total                          3                               12287  106496

 In above output, virtual machine name is "redhat" and it shows you the configuration file and vvol,snap data file information.

4. To remove this virtual machine "redhat" from the storage, we need to run below commands.

HPE cli% removevvset hpe.vvol.ds01 dat-redhatba-a8d0bea0
Remove dat-redhatba-a8d0bea0 from vv set hpe.vvol.ds01
select q=quit y=yes n=no: y
gb1inpst024.vvol.ds01 is a vVol storage container. vVols should not be removed from a vVol storage container individually. Instead use "setvvolsc -remove <vvsetname>" to remove the entire storage container. However, the matchbulkobjs environment variable can be used to remove vVols from a storage container. Use with caution.

Above error message is intresting. According to this message you need to set below CLI env.

HPE cli% setclienv matchbulkobjs 1

Now run the below command to delete the vvol and snap.


HPE cli% removevvset hpe.vvol.ds01 dat-redhatba-a8d0bea0
Remove dat-redhatba-a8d0bea0 from vv set hpe.vvol.ds01
select q=quit y=yes n=no: y

HPE cli% removevvset hpe.vvol.ds01 dat-hpeb-de253534-Snap
Remove dat-hpeb-de253534-Snap from vv set hpe.vvol.ds01
select q=quit y=yes n=no: y

Command to delete config file.

HPE cli% removevvset hpe.vvol.ds01 cfg-redhatba-e3fb20cb
Remove cfg-redhatba-e3fb20cb from vv set hpe.vvol.ds01
select q=quit y=yes n=no: y

Above "removevvset" command to use to remove virtual machine from container "hpe.vvol.ds01

5. Now remove the virtual machine vvol from storage to reclaim the space back, please use below command.

HPE cli% removevv dat-redhatba-a8d0bea0
Removing vv dat-redhatba-a8d0bea0
select q=quit y=yes n=no: y
VV dat-redhatba-a8d0bea0 has snapshot children which must be removed first.

If you are getting above message while deleting the data file, that means, you need to remove first snap file from storage then data file.

HPE cli% removevv dat-redhatb-de253534-Snap
Removing vv dat-redhatb-de253534-Snap
select q=quit y=yes n=no: y

HPE cli% removevv dat-redhatba-a8d0bea0
Removing vv dat-redhatba-a8d0bea0
select q=quit y=yes n=no: y

Remove config file:

HPE cli% removevv cfg-redhatba-e3fb20cb
Removing vv cfg-redhatba-e3fb20cb
select q=quit y=yes n=no: y

Once you remove all vvols and virtual machine from storage, please run the below command to check that virtual machine "redhat" exist or not.


HPE cli% showvvolvm -sc sys:all -vv redhat
No VM listed

if you are getting above message that means, virtual machine successfully remove from the storage and you can reclaim space back to storage.

You can run the below command to reclaim the space in CPG

HPE cli% compactcpg "CPG_NAME"

You can use "-dr" before run the reclaim the space, it will dry run and provide you the amount of space which you can reclaim.

Thursday, 18 May 2017

How to get the SAN Storage Information on AIX Operating System

If you are using IBM AIX Operating System and wants to work on Storage part, then you need understand basic of SAN fiber connectivity with server.

In blog, I would show you all the commands with an example, through which you can get an idea how SAN fiber connect with server and works.

➤ If you want to see how many fiber card (FC) adapter are present on the AIX operating system then please run the below command.

ibm_aix:/> lsdev -Cc adapter | grep fcs

"lsdev" command used for to check the FC adapter present on the IBM AIX servers. In the below line you can find the command output.

ibm_aix:/> lsdev -Cc adapter | grep fcs
fcs0    Available 00-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs1    Available 00-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs2    Available 03-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs3    Available 03-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

In above command output, you can see on my AIX machine , I have 4 FC card adapter present. Each card adapter have dual port 8Gb. You can see the available adapter name like "fcs0,fcs1". It would be different on every AIX server depend up which type of storage you used.

➤ If you want to check WWN number or SAN ID, please use the below command to check specific information.

ibm_aix:/> lscfg -vl fcs2 | grep "Network Address"
        Network Address.............10000090FAC8D594

In above example, "lscfg" command use to check the all information about a adapter. In my machine , I need an information about WWN  of third adapter "fcs2" which are present on the AIX server. 

This command show you the wwn or SAN ID number which are connected to the server.

➤ If you want to see the fiber card adapter current status, then please use the below command. This command show you regarding the fiber health and all the information regarding the fiber.

ibm_aix:/> fcstat fcs0

FIBRE CHANNEL STATISTICS REPORT: fcs0

Device Type: FC Adapter (adapter/pciex/df1000f114108a0)
Serial Number: 1A550004C1
Option ROM Version: 027820F5
ZA: U2D2.03X5
World Wide Node Name: 0x20000090FACA86B4
World Wide Port Name: 0x10000090FACA86B4

Output of this command "fcstat" is very long so I can not write here, you can run this command on your AIX platform and check all the information. 

Please post your comment on this blog, if you have any query regarding this topic. I will try to resolve your query as earliest.