LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Locked Files - How To Unlock Them (https://www.linuxquestions.org/questions/linux-software-2/locked-files-how-to-unlock-them-69323/)

bas12547 07-01-2003 12:57 PM

Locked Files - How To Unlock Them
 
I have an application that creates an entry in the /proc/locks file on a server.

A client NFS mounts a file server. The client application locks a file on the fileserver and created and entry in /proc/locks on the file server.

For some reason, when the application crashes on the client it leaves the enrty in the /procs/locks file on the server. How do I unlock the file?

What commands deal with locked files? I have tried lsof -N and that does not help.

Thanks,

Brian

whansard 07-01-2003 01:23 PM

the lock files are usually in the applications home
directory.

bas12547 07-01-2003 02:06 PM

I know where the file is. When the application tries to restart it says that it is in use. Even a touch doesn't change the date and time.

Brian

whansard 07-01-2003 02:38 PM

the stuff in /proc isn't real files.

maybe the process is still running.
check with top.

bas12547 07-01-2003 07:40 PM

It isn't running on the server, but the file is locked there.

It is being locked via a NFS mount. I have even stopped NFSD.

Brian

bas12547 07-01-2003 08:00 PM

I re-read your response again. I did look for the process that is listed in /proc/locks to see if it was running on the server.

It is not.

Brian

bas12547 07-02-2003 06:27 PM

bump

andslm 07-15-2003 09:14 PM

I have a problem in my root directory. When i install the mandrake linux its not locked so i can load the KDE desktop automaticly on startup but now the root directory is locked and only can be view by root only so i cannot start the KDE on start up. Can someone help me on this ?

nyfaisal 08-05-2003 10:53 AM

anyone knows how I can login to KDE as root in mandrake linux? At start up, I only see other uesrnames, and not root indicated (there's nothing that lets you type the username)

I also have the lock problem--how do i unlock a file?

dcatiii 01-26-2011 04:11 PM

Not sure if it will help you all at this point, but utilizing lsof or fuser can possibly lead to some valuable information. You may be able to determine what is utilizing the file and after killing the pid unlock the file.


All times are GMT -5. The time now is 10:49 PM.