Subscribe

Cannot Delete a file located in a CIFS share

We have a file on our NetApp that we cannot delete it says that the file is in use. When we check using computer management it does not list that files as being in use. The file is located on A CIFIS share. How can we get the file unlocked, deleted, or what process has it open?

Re: Cannot Delete a file located in a CIFS share

Try the command:

netapp> cifs sessions *

(note the '*'). See if it shows a cifs session with your file open.  You could then use cifs terminate <session> to kill off that particular session if necessary.

Hope this helps.

Re: Cannot Delete a file located in a CIFS share

I tried that as well but the files still does not show up as in use.

Re: Cannot Delete a file located in a CIFS share

It's not a folder is it?

Re: Cannot Delete a file located in a CIFS share

No it’s just a file. In fact even trying to bring up the properties of the file take a very long time.

Re: Cannot Delete a file located in a CIFS share

Perhaps it is visible with the lock status command. E.g.:

> lock status -f -p cifs

If found you can break the lock with the lock break command.

Re: Cannot Delete a file located in a CIFS share

I tired to issue this command lock break -f phase4.vsd and it says no locks to break. Even though when I issues the lock ststus command the file shows up in the list.

Re: Cannot Delete a file located in a CIFS share

use a 3rd party tool to force kill the lock?  ofl.exe is what I use in scenarios like that.

Re: Cannot Delete a file located in a CIFS share

You also need to specify the full path name of the file, including volume and qtree. The full path is also listed in the lock status output.

Re: Cannot Delete a file located in a CIFS share

This is the path that it came back with
/vol/ese_admin_share/ES Admin/Projects/PSTools Upgrade/PSTools - Phase4.vsd
So I tried this command
lock break lock break -f /vol/ese_admin_share/ES Admin/Projects/PSTools Upgrade/PSTools - Phase4.vsd
It came back with this error Error:
Invalid option Admin/Projects/PSTools

It seems to be having an issue with the space in the path I tred to inclose it with ' but that did not work.