Microsoft Virtualization Discussions

Get-NcCifsShare not providing complete list of shares through Powershell.

krishna556
8,157 Views

I am new bee working with Netapp Toolkit through Powershell.

I am having one SVM which is impacted by this, rest of all SVM's within same cluster are working fine.

Tool kit version: 

Major Minor Build Revision
----- ----- ----- --------
4 1 0 0

 

Cluster version: NetApp Release 9.1P10

 

Issue: 

 

Get-NcCifsshare provides me complete list of CIFS shares on a cluster, If i execute his on my cluster, Some of the shares on one SVM are missing in CLI. I can validate the shares do exist through GUI.

Possible outcome of this is Powershell is trying to copy the CIFS shares from Source, and the files were already exist causing error "duplicate entry "

 

ERROR: Failed to create CIFS Share DFS_PECAN_COMMON$ on SVM inxxxxxx8

NetApp.Ontapi.ErrnoException+EDUPLICATEENTRY: duplicate entry

   at NetApp.Ontapi.NaApi`1.Invoke(INaServer server)

   at DataONTAP.C.PowerShell.SDK.Cmdlets.Cifs.AddNcCifsShare.ProcessRecord(NcController controller)

 

Could you please provide some help in this regard, does Toolkit upgrade can fix this issue.

1 ACCEPTED SOLUTION

krishna556
8,123 Views

Hi Asulliva,

Sorry for the confusion am pretty new to Netapp.

From ONTAP CLI and GUI,  I am able to validate all the shares and they do exist for  vserver SVM123.

 

From Powershell , I am trying to query the same vserver using Get-NcCifsshare query command. 

 

 

Some parameters are missing from powershell output

 

PS D:\working\scripts> Get-NcCifsShare -vserver inx123456 | select *

 

Acl : {Everyone / Full Control}
AttributeCacheTtl : 
CifsServer : INX123456
Comment : 
DirUmask : 
FileUmask : 
ForceGroupForCreate : 
MaxConnectionsPerShare : 4294967295
NcController : inx.abc.com
OfflineFilesMode : manual
Path : /vol01/ogc/projects/SHELLFR-NDH/02_NDEU Connection Design
ShareName : DFS_02_NDEU Connection Design$
ShareProperties : {oplocks, browsable, changenotify, show_previous_versions}
SymlinkProperties : {symlinks}
Volume : vol01
VscanFileopProfile : standard
Vserver : inx123456
AttributeCacheTtlSpecified : False
DirUmaskSpecified : False
FileUmaskSpecified : False
MaxConnectionsPerShareSpecified : True

 

Acl : {Everyone / Full Control}
AttributeCacheTtl : 
CifsServer : INX123456
Comment : COMMON discipline share for the ASORC project.
DirUmask : 
FileUmask : 
ForceGroupForCreate : 
MaxConnectionsPerShare : 4294967295
NcController : inx.abc.com
OfflineFilesMode : manual
Path : /vol01/ogc/projects/ASORC/Common
ShareName : DFS_ASORC_Common$
ShareProperties : {oplocks, browsable, changenotify, show_previous_versions}
SymlinkProperties : {symlinks}
Volume : 
VscanFileopProfile : standard
Vserver : inx123456
AttributeCacheTtlSpecified : False
DirUmaskSpecified : False
FileUmaskSpecified : False
MaxConnectionsPerShareSpecified : True

 

Acl : {Everyone / Full Control}
AttributeCacheTtl : 
CifsServer : INX123456
Comment : CONTROLS discipline share for the ASORC project.
DirUmask : 
FileUmask : 
ForceGroupForCreate : 
MaxConnectionsPerShare : 4294967295
NcController : inx.abc.com
OfflineFilesMode : manual
Path : /vol01/ogc/projects/ASORC/Controls
ShareName : DFS_ASORC_Controls$
ShareProperties : {oplocks, browsable, changenotify, show_previous_versions}
SymlinkProperties : {symlinks}
Volume : 
VscanFileopProfile : standard
Vserver : inx123456
AttributeCacheTtlSpecified : False
DirUmaskSpecified : False
FileUmaskSpecified : False
MaxConnectionsPerShareSpecified : True

 

 

 

Volume parameter is not returning any value for some shares, which is highlighted above. Please let me know if you have any questions

Any help would be appreciated.

 

View solution in original post

3 REPLIES 3

asulliva
8,151 Views

Hello @krishna556,

 

I'm not sure what error you're experiencing/needing help with...

 

  • Some CIFS shares are not being shown when using the ONTAP CLI (e.g. "cifs share show -vserver NAME"), but are correctly reported in the GUI and when using PowerShell (e.g. "Get-NcCifsShare -Vserver NAME")?
  • You are unable to create a CIFS share using PowerShell because it already exists?
    • How are you creating the CIFS share?  What is the PowerShell code you're using?  How are you checking to see if the share name already exists?

 

Andrew

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

krishna556
8,124 Views

Hi Asulliva,

Sorry for the confusion am pretty new to Netapp.

From ONTAP CLI and GUI,  I am able to validate all the shares and they do exist for  vserver SVM123.

 

From Powershell , I am trying to query the same vserver using Get-NcCifsshare query command. 

 

 

Some parameters are missing from powershell output

 

PS D:\working\scripts> Get-NcCifsShare -vserver inx123456 | select *

 

Acl : {Everyone / Full Control}
AttributeCacheTtl : 
CifsServer : INX123456
Comment : 
DirUmask : 
FileUmask : 
ForceGroupForCreate : 
MaxConnectionsPerShare : 4294967295
NcController : inx.abc.com
OfflineFilesMode : manual
Path : /vol01/ogc/projects/SHELLFR-NDH/02_NDEU Connection Design
ShareName : DFS_02_NDEU Connection Design$
ShareProperties : {oplocks, browsable, changenotify, show_previous_versions}
SymlinkProperties : {symlinks}
Volume : vol01
VscanFileopProfile : standard
Vserver : inx123456
AttributeCacheTtlSpecified : False
DirUmaskSpecified : False
FileUmaskSpecified : False
MaxConnectionsPerShareSpecified : True

 

Acl : {Everyone / Full Control}
AttributeCacheTtl : 
CifsServer : INX123456
Comment : COMMON discipline share for the ASORC project.
DirUmask : 
FileUmask : 
ForceGroupForCreate : 
MaxConnectionsPerShare : 4294967295
NcController : inx.abc.com
OfflineFilesMode : manual
Path : /vol01/ogc/projects/ASORC/Common
ShareName : DFS_ASORC_Common$
ShareProperties : {oplocks, browsable, changenotify, show_previous_versions}
SymlinkProperties : {symlinks}
Volume : 
VscanFileopProfile : standard
Vserver : inx123456
AttributeCacheTtlSpecified : False
DirUmaskSpecified : False
FileUmaskSpecified : False
MaxConnectionsPerShareSpecified : True

 

Acl : {Everyone / Full Control}
AttributeCacheTtl : 
CifsServer : INX123456
Comment : CONTROLS discipline share for the ASORC project.
DirUmask : 
FileUmask : 
ForceGroupForCreate : 
MaxConnectionsPerShare : 4294967295
NcController : inx.abc.com
OfflineFilesMode : manual
Path : /vol01/ogc/projects/ASORC/Controls
ShareName : DFS_ASORC_Controls$
ShareProperties : {oplocks, browsable, changenotify, show_previous_versions}
SymlinkProperties : {symlinks}
Volume : 
VscanFileopProfile : standard
Vserver : inx123456
AttributeCacheTtlSpecified : False
DirUmaskSpecified : False
FileUmaskSpecified : False
MaxConnectionsPerShareSpecified : True

 

 

 

Volume parameter is not returning any value for some shares, which is highlighted above. Please let me know if you have any questions

Any help would be appreciated.

 

krishna556
8,052 Views

Deleted the target vservers manually and tryed to run the script fixed the issue.

Public