Thursday, April 6, 2017

Vmware ESXi -- reclaim space you need to run unmap command from Vmware server.

Kindly run refer below.

esxcli storage vmfs unmap -l (label name)
or
esxcli storage vmfs unmap -u (UUID)

Refer the VMware Knowledge base.
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2057513

or https://youtu.be/5pWI0K0iJA8



esxcli storage vmfs unmap -l MyDatastore

or

esxcli storage vmfs unmap -u 509a9f1f-4ffb6678-f1db-001ec9ab780e

HP 3PAR -- how to find failed disk details in 3par

Commands to check failure disk details.

showpd
showpd -c
showpd -i
showpd –s
servicemag status –d

HP 3PAR - how convert thin provision datastrore to thin dedup

1). Command to run dryrun before converting thin to thin dedup

checkvv -dedup_dryrun <vv_name>



2. Command to change thin provision vv to thin dedup.


tunevv usr_cpg name -tdvv VV_name

HP 3PAR - To Reclaim the Freed space on the CPG

Please see the below commands details.

Compact Commands : compactcpg

DESCRIPTION
The compactcpg command consolidates logical disk space in Common Provisioning Groups (CPGs) into as few logical disks as possible, allowing unused logical disks to be removed and their space reclaimed.

SYNTAX
compactcpg [options] <CPG_name>...
compactcpg -pat [options] <pattern>...

OPTIONS
-pat : Compacts CPGs that match any of the specified patterns.
-waittask : Waits for any created tasks to complete.
-trimonly : Removes unused logical disks after consolidating the space. This option will not perform any region moves.
-dr : Specifies that the operation is a dry run, and the tasks will not actually be performed.
-f : Does not ask for confirmation before compacting the logical disks. Unless the -f option is specified,the command asks for confirmation before compacting each CPG.

To Reclaim the Freed space on the CPG -R5, you can run the below command.

===> compactcpg –pat CPG -R5 name

Node: - This is a background low priority task and run when the system is idle. If there is any overlapping or parallel task running like AO, DO, or Tunesys, than the task may fail.
Ensure no paralelle task is running. If it fails you may need to run it again. There is no significance of the task failure on the system.

The following command will set up a job to run weekly (Sundays, 0000 hours):  createsched -no_alert "compactcpg -f -pat *" @weekly Compact_All_CPGs

String
Meaning
@yearly
Run every January 1st, "0 0 1 1 *"
@monthly
Run the first day of every month, "0 0 1 * *"
@weekly
Run every Sunday, "0 0 * * 0"
@daily
Run every midnight, "0 0 * * *"
@hourly
Run every hour, on the hour, "0 * * * *"

For more details: Please refer the below link for HP 3PAR Command Line Interface Reference.
http://h10032.www1.hp.com/ctg/Manual/c03618134


compactcpg –pat ESXi_VM_CPG_R5

VM Issue -- another task is already in progress vmware power on

1. Check whether vm is running on snapshot
2. Check datastore size
3. login to esxi host

esxcli vm process list

vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.getstate VMID
vim-cmd vmsvc/power.shutdown VMID

get task
vim-cmd vmsvc/get.task VMID

check disk consitance

vmkfstool -e vmname


check vodb logs to storage issue




restart service management

services.sh restart


command to check who is holding ownership of vm
vmkfstools -D vmname 

How to find invalid vm id's in Vmware ESXi

Command to find all vm ids.


vim-cmd vmsvc/getallvms


If you find any vm id is invalid from above command output.


Please use below command to reload invalid vm id.

vim-cmd vmsvc/reload [vm id number]

steps to deal with hung VM in ESXi



·         Use the vSphere Client to connect to an ESXi host or vCenter Server as an administrative user.

·         Select a virtual machine in the inventory.

·         Go to File > Export > Export System Logs.

·         Select the system log manifest group HungVM and the option Gather performance data. Click Next.

·         Specify a location on the client's disk to place a log bundle. Click Next.

·         Click Finish. After a few moments, a vm-support log bundle is created locally on the client. The filename is displayed in the Downloading System Log Bundles window when complete.

Commands to check ESXi version




1).  Command to check ESXi version.

Ans:    vmware -vl

2). Command to check to HBA card details in ESXi.

Ans:   esxcfg-scsidevs -a

3).  Command to check lpfc driver details

Ans : vmkload_mod -s lpfc | grep Version

4).  Command to check network card list

Ans: esxcli network nic list

5).  Command to check network nic complete information.

Ans :  esxcli network nic get -n vmnic0

6).  

HP 3PAR Thin Reclaim - Linux

How to reclaim space from HP 3PAR storage server.


Please watch below videos. Nice explanation on space reclamation.


https://www.youtube.com/watch?v=XcVYScTX1pM