Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 207710

Assistance Adding Extents for a VMFS Datastore

$
0
0

Hello Folks,

 

I'm working on some automation for datastore creation and need to be able to add extents to a datastore.  The initial datastore creation is working pretty well at this point, but I'm a bit stumped on how to go about adding the additional extents.  In my example, I'm using the navi cli to pull the LUN UID off the EMC array, then formatting it properly to pass the canonical name to the host for datastore creation.

 

I've read a bit about the extendvmfsdatastore here but i'm not able to decouple the 'add extent' portion from the 'query existing datastore and pull references to pass'.  If someone has a snippet of which commands need to be run, and the actual text to pass the .extendvmfsdatastore method, I would greatly appreciate it.  I know multi-extent datastores are falling out of favor with VMware, but I can't migrate over to 10TB datastores just yet.

 

Thanks in advance!

 

Brent

 

variable section omitted

**********************

connect-viserver $VC -protocol https -User $VC_USER -Password $VC_PASSWORD

 

Import-CSV C:\PowerShell\VNX_buildout\TEST-DSCreate\Test_DSCreate.csv | Foreach {
  $LUN = $_.alu
    $UID =  naviseccli -Address $VNX_ADDRESS -User $VNX_USER_NAME -Password $VNX_PASSWORD -Scope 0 lun -list -l $LUN -uid | out-string
      $UID = $UID.Replace(":", "")
      $POS = $UID.IndexOf("6006")
      $UID = $UID.Remove(0, $pos)
      $CN = $UID.Substring(0,32)
      $CN = "naa.$CN"
    write-host "CN = $CN - Array LUNID= $LUN"
  New-Datastore -VMHost $ESX_HOST -Name $_.datastr -Path $CN -Vmfs -confirm:$false
  Set-Datastore -datastore $_.datastr -storageiocontrolenabled $true

 

#### add extents by vmhbax:C:T:L or naa.xxx or???
}


Viewing all articles
Browse latest Browse all 207710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>