Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Unble to create home directory shares with Powershell - Standard shares must define an absolute
2016-11-09
06:15 AM
5,259 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
1 ACCEPTED SOLUTION
ttran has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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'
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
ttran has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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'
