Microsoft Virtualization Discussions

Get root vol with PowerShell toolkit

solal

Hi all.

I'm using it in a WFA command in order to append data into a configuration file (i.e RC file, hosts...).

At the moment i'm appending with Write-NaFile and it requires full path (/vol/vol0/etc/....) and not /etc/***.

I can't use always /vol/vol0 and need to query the filer and see which volume name is the root volume.

Did you ever try to get with one command / concatenated commands in PowerShell ToolKits a filer's root volume name?

Many thanks in advance!

Solal.

1 ACCEPTED SOLUTION

mark_schuren

I just tried and found a builtin cmdlet:

PS H:\> Get-NaVolRoot

Name                      State       TotalSize  Used  Available Dedupe  FilesUsed FilesTotal Aggregate

----                      -----       ---------  ----  --------- ------  --------- ---------- ---------

volroot                   online       197,6 GB    3%   191,3 GB False          8k         7M aggr0

What version of the DataONTAP PS Toolkit are you using?

I'm on:

PS H:\> Get-Module DataOntap | fl

Name              : DataOntap

Path              : C:\Program Files (x86)\NetApp\Data ONTAP PowerShell Toolkit\DataOntap\DataOntap.psd1

Description       : Data ONTAP PowerShell Toolkit

ModuleType        : Manifest

Version           : 2.4.0

NestedModules     : {DataONTAP, DataONTAP.C, DataONTAP.Alias}

ExportedFunctions : Add-NaHelpInfoUri

ExportedCmdlets   : {Add-NaAggr, Add-NaCifsShare, Add-NaCredential, Add-NaFpolicyExtension...}

ExportedVariables : {}

ExportedAliases   : {Add-NcHostIscsiConnection, Connect-NcHostIscsiTarget, ConvertTo-NcLun, ConvertTo-NcVhd...}

View solution in original post

4 REPLIES 4

mark_schuren

I just tried and found a builtin cmdlet:

PS H:\> Get-NaVolRoot

Name                      State       TotalSize  Used  Available Dedupe  FilesUsed FilesTotal Aggregate

----                      -----       ---------  ----  --------- ------  --------- ---------- ---------

volroot                   online       197,6 GB    3%   191,3 GB False          8k         7M aggr0

What version of the DataONTAP PS Toolkit are you using?

I'm on:

PS H:\> Get-Module DataOntap | fl

Name              : DataOntap

Path              : C:\Program Files (x86)\NetApp\Data ONTAP PowerShell Toolkit\DataOntap\DataOntap.psd1

Description       : Data ONTAP PowerShell Toolkit

ModuleType        : Manifest

Version           : 2.4.0

NestedModules     : {DataONTAP, DataONTAP.C, DataONTAP.Alias}

ExportedFunctions : Add-NaHelpInfoUri

ExportedCmdlets   : {Add-NaAggr, Add-NaCifsShare, Add-NaCredential, Add-NaFpolicyExtension...}

ExportedVariables : {}

ExportedAliases   : {Add-NcHostIscsiConnection, Connect-NcHostIscsiTarget, ConvertTo-NcLun, ConvertTo-NcVhd...}

View solution in original post

ramong

How about for a vFiler?  How can I find out which vol is root for a vFiler?  Thank you in advance.

mark_schuren

when connected to a vfiler unit, the get-navolroot cmdlet also works.

solal

Hi Mark,

Already found that

Sorry for not responding yet...

I needed that for a command I built in WFA.

Thanks!\

Solal.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public