组合两个 Cmdlet 的输出以获得公共输出
我想从 Net App commandlet 中提取 filerview,我在下面写了一个表达式
Get-NaLun | Select @{Name="LUN";Expression={$_.path}},@{Name="Size";Expression= {[math]::Round([decimal]$_.size/1gb,0)}},`
@{Name="OnlineStatus";Expression={$_.online}},`
@{Name="Group";Expression={([string]::Join(",",(Get-NaLun $_.path | get-nalunmap | select -ExpandProperty initiatorgroupname)))}},`
@{Name="LunID";Expression={Get-NaLun $_.path | get-nalunmap | select -ExpandProperty lunid}} | Export-Csv "c:\LUN_FilerView.csv"
我想要的是可以根据 LUN ID、启动器组名称进行搜索(
如果我可以获得 cmdlet)
- 我还想运行“Get-NaLUNbyMap” ” 使用特定的 igroup 映射和 LUN ID,并使用映射到该 LUN ID 的 LUN 进行响应
- Get-naLunByMap –igroup SEAPSQLPWS1_Cluster_Nodes – LunID 7
有人可以帮帮我吗谢谢!
这是输出
PS 103 > Get-NaLun /vol/Co4_I_UserDB
Path TotalSize Protocol Online Mapped Thin Comment
---- --------- -------- ------ ------ ---- -------
/vol/Co4_I_UserDB 100.0 GB windows_2008 True True True TEST - Authoring UserDBs
PS 104 > Get-NaLunmap /vol/Co4_I_UserDB
InitiatorGroupName : IA
InitiatorGroupType : iscsi
Initiators : {i, iqn.1991-05.com.microsoft:}
InitiatorGroupOsType : windows
InitiatorGroupPortsetName :
InitiatorGroupThrottleBorrow : False
InitiatorGroupThrottleReserve : 0
InitiatorGroupUsePartner :
InitiatorGroupAluaEnabled : False
InitiatorGroupVsaEnabled : False
LunId : 14
I wanted to extract a filerview from Net App commandlets, i wrote a an expression below
Get-NaLun | Select @{Name="LUN";Expression={$_.path}},@{Name="Size";Expression= {[math]::Round([decimal]$_.size/1gb,0)}},`
@{Name="OnlineStatus";Expression={$_.online}},`
@{Name="Group";Expression={([string]::Join(",",(Get-NaLun $_.path | get-nalunmap | select -ExpandProperty initiatorgroupname)))}},`
@{Name="LunID";Expression={Get-NaLun $_.path | get-nalunmap | select -ExpandProperty lunid}} | Export-Csv "c:\LUN_FilerView.csv"
What i wanted is it possible to search based on the LUN ID, Initiator Group Name
if i can get a cmdlet
- I would also like to run “Get-NaLUNbyMap” with a specific igroup map and LUN ID and have it respond with the LUN that is mapped at that LUN ID
- Get-naLunByMap –igroup SEAPSQLPWS1_Cluster_Nodes – LunID 7
Can some one help me thanks!
here is the output of
PS 103 > Get-NaLun /vol/Co4_I_UserDB
Path TotalSize Protocol Online Mapped Thin Comment
---- --------- -------- ------ ------ ---- -------
/vol/Co4_I_UserDB 100.0 GB windows_2008 True True True TEST - Authoring UserDBs
PS 104 > Get-NaLunmap /vol/Co4_I_UserDB
InitiatorGroupName : IA
InitiatorGroupType : iscsi
Initiators : {i, iqn.1991-05.com.microsoft:}
InitiatorGroupOsType : windows
InitiatorGroupPortsetName :
InitiatorGroupThrottleBorrow : False
InitiatorGroupThrottleReserve : 0
InitiatorGroupUsePartner :
InitiatorGroupAluaEnabled : False
InitiatorGroupVsaEnabled : False
LunId : 14
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 DataONTAP PowerShell 工具包中内置的 Get-NaLunByIgroup cmdlet 正是您所寻找的:
此外,您还可以查看 Get-NaHostDisk 和/或 Get-NaHyperV 以将 Windows 磁盘映射回 NetApp 存储。
I think the Get-NaLunByIgroup cmdlet built in to the DataONTAP PowerShell Toolkit is what you are looking for:
Also, you might take a look at Get-NaHostDisk and/or Get-NaHyperV for mapping Windows disks back to NetApp storage.