Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Newbie > fuser -v mount_point

Forgot Password?
 Linux Newbie   If you're new to the wonderful world of Linux, start here!

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 07-12-2009   #1 (permalink)
Linux User
 
vickey_20's Avatar
 
Join Date: Mar 2009
Location: Mumbai, India
Posts: 493
fuser -v mount_point

I am having problem understanding how to use the above command. Whenever I try to umount a partition which is presently busy , the fuser command is supposed to come in handy. I have read from a book that
Code:
fuser -v mount_point
Provides the necessary information about who is using the mounted point.
Now where I get the problem : I login as a normal user( vickey in this case) in /home directory ( also a partition as per my fstab), on some other terminal as root I try to unmount /home and get the device is busy ( Ok no problem as expected) . Now the command
Code:
fuser -v /home
must tell me that /home is currently used by user vickey. But it doesn't show me anything but on the other hand when I issue this command
Code:
fuser -v /home/vickey
It shows the activity of user vickey on the /home partition . But the whole point is , fuser by default should show me that vickey is doing some thing on /home , when "/home" is passed as an argument to the fuser command and not when "/home/vickey" is passed.
Thanks in advance for replying.
__________________
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
vickey_20 is offline  


Reply With Quote
Old 07-12-2009   #2 (permalink)
Linux Newbie
 
Join Date: Mar 2009
Posts: 133
Not sure why fuser does that. What I use is lsof, that works.

Code:
lsof /home
lomcevak is offline   Reply With Quote
Old 07-12-2009   #3 (permalink)
Linux User
 
vickey_20's Avatar
 
Join Date: Mar 2009
Location: Mumbai, India
Posts: 493
thank that works but shouldn't the fuser command work with only /home given to it.
__________________
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
vickey_20 is offline   Reply With Quote
Old 07-12-2009   #4 (permalink)
Linux User
 
Join Date: Jun 2008
Location: Acadiana
Posts: 334
Looking at your problem at another angle, "lazy" umount often will work. See man umount, search for "lazy".
Segfault is offline   Reply With Quote
Old 07-12-2009   #5 (permalink)
Linux User
 
vickey_20's Avatar
 
Join Date: Mar 2009
Location: Mumbai, India
Posts: 493
going throught the man pages I uderstood that specifying the lazy option with umont will only umoun the partition when there is no activity going on it( If I m not wrong) . But I what I wanna know is who are working on the partition right now (lsof porved to be useful ) But "fuser -v" is supposed to do the same task?
__________________
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
vickey_20 is offline   Reply With Quote
Old 07-12-2009   #6 (permalink)
Linux User
 
Join Date: Jun 2008
Location: Acadiana
Posts: 334
Try it. If all you need is to unmount while volume is in use lazy will often do. It waits until activity stops for a fraction a second and umounts.
Segfault is offline   Reply With Quote
Old 07-13-2009   #7 (permalink)
Linux Newbie
 
Join Date: Mar 2009
Posts: 133
Figured it out. You need to also use the -m option with fuser. From the manpage:

Quote:
-m name specifies a file on a mounted file system or a block
device that is mounted. All processes accessing files on that
file system are listed. If a directory file is specified, it
is automatically changed to name/. to use any file system that
might be mounted on that directory.
lomcevak is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 05:16 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2