Array Performance and Data Protection
1752783 Members
5591 Online
108789 Solutions
New Discussion юеВ

Re: Zero'ing Nimble LUN's?

 
SOLVED
Go to solution
ron_fisher
Advisor

Zero'ing Nimble LUN's?

Greetings,

So this is sort of a feature request/question. As most Nimblers probably know, when you evacuate a datastore in the vsphere world, the backend array has no knowledge of this removal of data (VM's). vCenter show's nothing used but Nimble still shows 1.5T used. This will lead to oversubscribing the LUN if you move VM's back on to the datastore.

Rather than forcing the customer to go through the steps to do a SCSI unset or whatever its called, it seems like the Nimble vcenter  Plug-in could be used to accomplish this through the vcenter to esxi API.  Click a button that zero's the unused blocks on LUN.

Am I oversimplifying?

At this point I think evacuating the datastore in vcenter, then use the plug-in to delete and re-create the datastore is probably the fastest way to the the result.

4 REPLIES 4
aherbert23
Trusted Contributor
Solution

Re: Zero'ing Nimble LUN's?

Actually this wouldn't over subscribe the LUN. The datastore won't consume more space than what is allocated. New data added after VMDKs are deleted will overwrite the location of old blocks.

Now as to reclaiming the deleted space this is done via the SCSI UNMAP command. VMware has a knowledge base article on how this works here for 5.0 (Using vmkfstools to reclaim VMFS deleted blocks on thin-provisioned LUNs) and here for 5.5 and 6.0 via esxcli (Using esxcli in vSphere 5.5 and 6.0 to reclaim VMFS deleted blocks on thin-provisioned LUNs).

Now another way this can be done is via PowerCLI. Below is a PowerShell script that will do just what you need. It will loop through any Nimble volumes in your vCenter and attach to one of the ESX hosts. If it's v5.0 SSH credentials are used for the reclaim otherwise the VCenter username and password can initiate the reclaim via esxcli commands.

$VCServer = "10.0.0.10"
$VCUser = "Administrator"
$VCPassword = "Password"
$SSHUser = "root"
$SSHPassword = "Password"

if ((Get-PSSnapin -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $null) {
  try {
    Add-PSSnapin VMware.VimAutomation.Core -ErrorAction Stop
  }
  catch {
    Write-Host "Please install VMware PowerCLI"
    Return
  }
}

if ($VCUser -ne "") {
  $vc = Connect-VIServer -Server $VCServer -WarningAction 0 -User $VCUser -Password $VCPassword
}
else{
  $vc = Connect-VIServer -Server $VCServer -WarningAction 0
}

$ds_list = Get-Datastore

foreach ($ds in $ds_list) {
  $vmhost = Get-VMHost -Datastore $ds | Select -Last 1
  Write-Host "Connected to ESXi host" $vmhost.Name
  $esxcli = Get-EsxCli -VMHost $vmhost

  $lun = Get-ScsiLun -Datastore $ds
  if ($lun.Vendor -eq "Nimble") {
    Write-Host "Reclaiming space on Nimble volume" $ds.Name
    if ($vmhost.Version -match "^5.0") {
      Write-Output "y" | c:\plink.exe -l $SSHUser -pw $SSHPassword $vmhost.Name "cd /vmfs/volumes/$($ds.Name) && vmkfstools -y 80"
    }
    else {
      $esxcli.storage.vmfs.unmap("60000", $ds.Name, $null)
    }
  }
  else {
    Write-Host $ds.Name "is not a Nimble volume, skipping."
  }
}
ron_fisher
Advisor

Re: Zero'ing Nimble LUN's?

Hey Adam,

Good to know, I'll see if I can test that idea but it makes sense. Thanks for the reply.

So one of the things our Nimble SE mentioned when we were setting up our environments is to not enable automatic SDRS (we have used very effectively based on space thresholds on our other arrays) on our datastores due to these unzeroed blocks when a VM moves from one DS to another. If there is indeed no issue with oversubscription on the thin provisioned array we should be able to do the automatic SDRS eh?

Ron

aherbert23
Trusted Contributor

Re: Zero'ing Nimble LUN's?

sDRS is a great tool when you have multiple storage tiers or are using traditional arrays where you have multiple RAID groups for performance. Nimble doesn't work this way so sDRS provides no real benefit and can cause issues with snapshot growth. We can zero blocks for the current dataset but we don't zero them from the snapshots. That would defeat their purpose as a layer of data protection.

TL;DR I would concur with your local SE and say to not use sDRS with Nimble. It is not necessary with the Nimble architecture.

ron_fisher
Advisor

Re: Zero'ing Nimble LUN's?

Aye I forgot about snapshot growth. Otherwise the capacity adjustments (moving VM's due to space) could be of value even if just to avoid vcenter alarms when vcenter thinks space is becoming tight. Nimble compression typically alleviates that worry though.