Find the answer to your Linux question:
Results 1 to 7 of 7
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 ...
  1. #1
    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

  2. #2
    Linux Newbie
    Join Date
    Mar 2009
    Posts
    228
    Not sure why fuser does that. What I use is lsof, that works.

    Code:
    lsof /home

  3. #3
    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

  4. #4
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    855
    Looking at your problem at another angle, "lazy" umount often will work. See man umount, search for "lazy".

  5. #5
    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

  6. #6
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    855
    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.

  7. #7
    Linux Newbie
    Join Date
    Mar 2009
    Posts
    228
    Figured it out. You need to also use the -m option with fuser. From the manpage:

    -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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...