Wednesday, February 27, 2013

Not able to Delete a file located in a CIFS share


This is due to that particular file might have locked...

First find the lock stat

Nayab> lock status -p cifs

Drilled down on it and ran this on the host IP:

Nayab> lock status -h <ip address>

Now break the lock

Nayab>lock break -h <ip address> -p cifs

Verify if it is unlocked

Nayab> lock status -h <ip address>

For Example :-


First Run this :

Nayab> lock status -f "/vol/nasvol1/nasshare1/file1.doc" -p cifs

And got this back:

========1237903r5:015b50dc
CIFS path=\nasvol1\nasshare1\file1.doc(/vol/nasvol1/nasshare1/file1.doc) host=xxx.xxx.xxx.xxx(pc-name) owner=nayabsk state=GRANTED mode=Read-denyW oplock=None

If I run this, I can then break the lock:

Nayab> lock break -f "/vol/nasvol1/nasshare1/file1.doc" -p cifs


Please refer to the below link as well

http://a2alpha.webnode.com/news/cifs-share-locked-files-on-a-netapp-filer/



No comments:

Post a Comment