LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-01-2003, 01:57 PM   #1
bas12547
LQ Newbie
 
Registered: Jun 2003
Location: Milton, NY
Distribution: Redhat
Posts: 17

Rep: Reputation: 0
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
 
Old 07-01-2003, 02:23 PM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
the lock files are usually in the applications home
directory.
 
Old 07-01-2003, 03:06 PM   #3
bas12547
LQ Newbie
 
Registered: Jun 2003
Location: Milton, NY
Distribution: Redhat
Posts: 17

Original Poster
Rep: Reputation: 0
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
 
Old 07-01-2003, 03:38 PM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
the stuff in /proc isn't real files.

maybe the process is still running.
check with top.
 
Old 07-01-2003, 08:40 PM   #5
bas12547
LQ Newbie
 
Registered: Jun 2003
Location: Milton, NY
Distribution: Redhat
Posts: 17

Original Poster
Rep: Reputation: 0
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
 
Old 07-01-2003, 09:00 PM   #6
bas12547
LQ Newbie
 
Registered: Jun 2003
Location: Milton, NY
Distribution: Redhat
Posts: 17

Original Poster
Rep: Reputation: 0
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
 
Old 07-02-2003, 07:27 PM   #7
bas12547
LQ Newbie
 
Registered: Jun 2003
Location: Milton, NY
Distribution: Redhat
Posts: 17

Original Poster
Rep: Reputation: 0
bump
 
Old 07-15-2003, 10:14 PM   #8
andslm
LQ Newbie
 
Registered: Jul 2003
Posts: 4

Rep: Reputation: 0
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 ?
 
Old 08-05-2003, 11:53 AM   #9
nyfaisal
LQ Newbie
 
Registered: Apr 2003
Posts: 25

Rep: Reputation: 15
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?
 
Old 01-26-2011, 05:11 PM   #10
dcatiii
LQ Newbie
 
Registered: Apr 2010
Location: Dallas, TX
Distribution: Arch, Ubuntu, Redhat
Posts: 26

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can "root" unlock a locked screen in Gnome? AZ_Rider Linux - Newbie 5 11-30-2011 02:28 AM
DISCUSSION: unlock rpmdatabase when: RPM DATABASE LOCKED bglnelissen LinuxAnswers Discussion 5 03-01-2008 07:46 AM
unlock a locked folder in Suse 10.0 dcg757s Linux - Newbie 6 11-11-2005 05:54 PM
Locked VFAT Drive, can't Unlock Kenji Miyamoto Linux - General 9 01-04-2005 10:28 PM
CDROM is "locked", can't unlock it thezerosystem Linux - Newbie 6 04-19-2002 09:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration