We are running ONTAP 9.6P2. We have a volume that houses symlinks to various CIFS shares. The symlinks are created with:
New-NcSymlink -target /linkname -linkname /vol/Groups/linkname
Add-NcCifsSymlink -unixpath /linkname/ -cifspath / -locality widelink -sharename linkname$
All is working well until we try and delete one of these. We first delete the symlink:
RemoveNcCifsSymlink -Unixpath /linkname/
That works well, but when we try and delete the remaining stub file we get a No such file or directory error.
Remove-NcFile -Path "/vol/Groups/linkname"
We get the same errors if we remove all the symlinks and then try to remove all the remaining stubs in bulk using:
Read-NcDirectory -Path /vol/Groups | ?{ $_.Type -eq "symlink" } | %{ Remove-NcFile -Path "/vol/Groups/$($_.Name)/"}
Also, if we try and delete the stubs via Windows command line del the response is that the object is not empty. So how can we delete these stubs and why does the stub still function after the symlink is deleted?