ONTAP Discussions

Unble to create home directory shares with Powershell - Standard shares must define an absolute

wafl_scan
4,071 Views

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

 

1 ACCEPTED SOLUTION

jmiller_exd
2,793 Views

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'

View solution in original post

3 REPLIES 3

asulliva
4,019 Views

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

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

wafl_scan
4,010 Views

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:

 

https://kb.netapp.com/support/s/article/how-to-configure-clustered-data-ontap-home-directories?language=en_US

https://library.netapp.com/ecmdocs/ECMM1277801/html/nfamg/GUID-741EF656-6B92-4A28-BD98-5942AF22FDA9.html

 

Thanks!

 

 

jmiller_exd
2,794 Views

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'

Public