Follow by Email

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:

CIFS path=\nasvol1\nasshare1\file1.doc(/vol/nasvol1/nasshare1/file1.doc) 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

No comments:

Post a Comment