Umount Problem

Home » CentOS » Umount Problem
CentOS 10 Comments

I’ve got a usb HD mounted, and it has been mounted since the weekend, and has been kept busy during that period.

now I”m done with it an want to umount it, but neither umount nor the on-screen icon (when right-clicked) will let me do it:

it is /dev/sdd1, mounted as /media/seagateusb. when root tries to umount it we get this:

# umount /media/seagateusb umount: /media/seagateusb: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))

lsof | grep sdd1 gives this:

$ lsof | grep sdd1

jbd2/sdd1 26358 root cwd DIR 253,1 4096 2 /
jbd2/sdd1 26358 root rtd DIR 253,1 4096 2 /
jbd2/sdd1 26358 root txt unknown /proc/26358/exe

lsof | grep /media/seagateusb yields no output.

I know, I could reboot, but I’d just as soon not.

Anybody know what that jbd2/sdd1 stuff is that lsof shows me, or how to umount it other than a reboot?

thanks!

10 thoughts on - Umount Problem

  • Fred Smith wrote:

    It’s under control of autofs. You can open the GUI file manager, and do a safely remove/eject.

    Or you can stop autofs for a minute, and then umount it.

    mark

  • here’s the result of your PS command, but I personally do not find it to be the least bit enlightening. perhaps you will…:

    # ps -fwp 26358
    UID PID PPID C STIME TTY TIME CMD
    root 26358 2 0 Oct04 ? 00:01:14 [jbd2/sdd1-8]

  • actually, no I can’t. if I right-click on seagateusb and click unmount, I
    get an error box saying “Unable to unmount seagateusb. Cannot unmount because file system on device is busy.”

    OTOH, if I choose “safely remove drive” instad, I get “Unable to stop drive. This file cannot be stopped.”

    I’ve killed all the shells and in fact all the interactive processes then logged off and on, so I’m pretty sure it’s nothing I ran that is got a hold on the device. I hate to use the three-finger-salue from Windows, just to fix a piddly little problem like this :)

  • Fred Smith wrote:

    Ok, try lsof /media/seagateusb – that may tell you what’s holding it.

    Did you try service autofs stop?

    mark

  • yes, made no difference.

    another responder suggests it is journalling block device daemon/
    thread/whatever holding the device. looking into that as we speak

    Fred

  • Got tired of fooling with it and did a “umount -l” which immediately released the drive. probably left some jbd2 thread hanging loose, but at this point I”m not too concerned.

    thanks for the suggestions!

  • one of the googled articles on jdb2 errors that I read suggested there have been kernel bugs which caused the journal writer to go nuts and constantly write stuff. that article was on an archlinux forum, and I
    didn’t bother to read up on what kernel versions were affected.

  • thanks, John!

    saw that one, but didn’t read it, AFAICT it wasn’t doing that, but “merely”
    wouldn’t let go of the drive