ONTAP Discussions
ONTAP Discussions
NetApp support directed me here to pose my question. If this is not the correct spot to ask please let me know where would be. Thanks. It seems that the NetApp Powershell module does not support creating home directory shares. Can someone shed some light on what might be going on? Is there a way to add them via Powershell that I'm not understanding? I keep getting "Standard shares must define an absolute share path in the Vserver's namespace." Also the flag -DisablePathValidation doesn't make it work either. Any help or suggestions would be appreciated. Thank you.
<user> O:\> Get-NcVserver $DestinationSVM | Add-NcCifsShare -Name "CIFS.HOMEDIR" -Path "%w" -ShareProperties $ShareProps
Add-NcCifsShare : Failed to create CIFS share CIFS.HOMEDIR. Reason: Standard shares must define an absolute share path in the Vserver's namespace.
At line:1 char:37
+ ... nationSVM | Add-NcCifsShare -Name "CIFS.HOMEDIR" -Path "%w" -SharePro ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (naeau1:NcController) [Add-NcCifsShare], EAPIERROR
+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Cifs.AddNcCifsShare
<user> O:\> Get-NcVserver $DestinationSVM | Add-NcCifsShare -Name "%w" -Path "%w" -ShareProperties $ShareProps -DisablePathValidation
Add-NcCifsShare : Failed to create CIFS share %w. Reason: Standard shares must define an absolute share path in the Vserver's namespace.
At line:1 char:37
+ ... nationSVM | Add-NcCifsShare -Name "%w" -Path "%w" -ShareProperties $S ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (naeau1:NcController) [Add-NcCifsShare], EAPIERROR
+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Cifs.AddNcCifsShare
Solved! See The Solution
This is an old topic but since it's the first hit in google for this error, the problem was mostly likely because he didn't use a '/'
You need to give the full junction path name '/name' not just 'name'
Hello @wafl_scan,
Can you explain the "%w" value you provided for the path? Does that denote something special? Also, if the share(s) were to be created using the CLI, what would the command be?
Andrew
The equivalent commands in the CLI are:
vserver cifs share create -vserver dr-eau-testlab -share-name %w -path %w -share-properties oplocks,browsable,changenotify,homedirectory
vserver cifs share create -vserver dr-eau-testlab -share-name CIFS.HOMEDIR -path %w -share-properties oplocks,browsable,changenotify,homedirectory
These shares appear to be documented by NetApp here:
Thanks!
This is an old topic but since it's the first hit in google for this error, the problem was mostly likely because he didn't use a '/'
You need to give the full junction path name '/name' not just 'name'