O'Reilly logo

Mastering PowerCLI by Sajal Debnath

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Fibre Channel storage

To add Fibre Channel (FC) storage, we first get a list of LUNs added to the host. To get a list, we can use the Get-ScsiLun cmdlet. The format is as follows:

PS C:\> Get-ScsiLun -VmHost Esxi1.lab.com | Select CanonicalName
CanonicalName
-------------
naa.60060e801660c500000160c500000107
naa.60060e801660c500000160c500000108
naa.60060e801660c500000160c500000109

Once we get a list of the attached LUNs and identify the particular LUN that we want to add to the host, we create a new datastore using the New-Datastore cmdlet:

PS C:\> New-Datastore -Name SAN-1 -VMHost Esxi1.lab.com -Path naa.60060e801660c500000160c500000109 -Vmfs

This will create a new VMFS datastore with the name SAN-1. If we rescan all the HBAs, then ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required