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 ...

Get Mastering PowerCLI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.