Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

[Solved] Cannot unmount: device is busy

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
Luc484
Veteran
Veteran
User avatar
Posts: 1035
Joined: Sat Mar 26, 2005 6:26 pm
Location: Italy

[Solved] Cannot unmount: device is busy

  • Quote

Post by Luc484 » Wed Jan 03, 2007 1:52 am

Hi all. It's been some days since I started to have this problem. When I try to unmount a partition (dvd) I get:

Code: Select all

pluca luca # umount /dev/hdc
umount: /mnt/cdrom: device is busy
umount: /mnt/cdrom: device is busy
I know it's quite usual, and it means some process is still using the device, right? So, as usual, I try to find the process with:

Code: Select all

fuser -u /dev/hdc
but, strangely I get no process. I used to have some process using the resource, but not this time. I get nothing. But umount still says the device is in use. I've never had this problem before. Any idea?
Thanks for any help, it's not too good to restart each time I unmount the volume.
Last edited by Luc484 on Thu Feb 01, 2007 6:31 pm, edited 1 time in total.
Top
Row
n00b
n00b
Posts: 51
Joined: Mon Dec 25, 2006 11:48 pm

Duh

  • Quote

Post by Row » Wed Jan 03, 2007 2:36 am

This problem is so typical... It usually occurs when:

a) A process is accesing the device, solution: just close the app
b) A process is working even offline with the device (i.e., you have the device content or content of a folder of the device shown on your filemanager): just move to another folder or close the filemanager
c) A process was working with the app, got closed but freed incorrectly its file descriptors, so there is no process anywhere but kernel still keeps a file descriptor pointing to the device. Solution: just pray. In fact, I don't know any way to fix this but rebooting.

Bye!
<<Gentoo GNU/Linux, AMD64 X2 4200+, Nvidia GForce 6600GT, Beryl, Emerald, KDE>>
Top
Luc484
Veteran
Veteran
User avatar
Posts: 1035
Joined: Sat Mar 26, 2005 6:26 pm
Location: Italy

Re: Duh

  • Quote

Post by Luc484 » Wed Jan 03, 2007 2:40 am

Row wrote:c) A process was working with the app, got closed but freed incorrectly its file descriptors, so there is no process anywhere but kernel still keeps a file descriptor pointing to the device. Solution: just pray. In fact, I don't know any way to fix this but rebooting.
I'm surely in this case. Strange that I haven't seen this for years and now I see it so often.
Thanks for your answer.
Top
SZwarts
l33t
l33t
User avatar
Posts: 629
Joined: Mon Oct 13, 2003 10:08 pm
Location: Sydney, NSW, Australia
Contact:
Contact SZwarts
Website

  • Quote

Post by SZwarts » Wed Jan 03, 2007 4:32 am

You can also use the command eject if you have that installed. You can call eject with as a parameter the mount point or the device, it will unmount stuff itself for you, if that can be 'easily' done.
only when it is dark enough, can you see the stars
Top
vadik56
n00b
n00b
Posts: 70
Joined: Tue Feb 14, 2006 10:56 pm

  • Quote

Post by vadik56 » Wed Jan 03, 2007 5:00 am

You can unmount with -l "lazy" option that way you can at least remove your dvd:

Code: Select all

umount -l /dev/dvd
Top
Aysen
Apprentice
Apprentice
Posts: 187
Joined: Wed May 18, 2005 7:32 pm
Location: Poland

  • Quote

Post by Aysen » Wed Jan 03, 2007 10:50 pm

vadik56 wrote:You can unmount with -l "lazy" option that way you can at least remove your dvd:

Code: Select all

umount -l /dev/dvd
True.
It also helps me when sometimes my USB stick gets "stuck" the way Luc484 described.
Top
Luc484
Veteran
Veteran
User avatar
Posts: 1035
Joined: Sat Mar 26, 2005 6:26 pm
Location: Italy

  • Quote

Post by Luc484 » Thu Feb 01, 2007 6:30 pm

I discovered the problem was mainly caused by NFS. Even if I unmount the device from the system connecting through NFS, the device is used since it is exported. I have to stop NFS to unmount the device locally. It seems not comfortable like this to me, but I read it is normal.
Thanks for your suggestions.
Top
mattmatteh
Guru
Guru
Posts: 449
Joined: Wed Mar 10, 2004 9:45 pm
Location: near chicago

  • Quote

Post by mattmatteh » Thu Feb 22, 2007 11:17 pm

the only option is to reboot ? i was working on an install and could not umount /mnt/gentoo/dev

logger ~ # umount /mnt/gentoo/dev
umount: /mnt/gentoo/dev: device is busy
umount: /mnt/gentoo/dev: device is busy
logger ~ # lsof | grep 'mnt/gentoo/dev'
udevd 11601 root 0u CHR 1,3 983 /mnt/gentoo/dev/null
udevd 11601 root 1u CHR 1,3 983 /mnt/gentoo/dev/null
udevd 11601 root 2u CHR 1,3 983 /mnt/gentoo/dev/null
logger ~ #

rebooting is a windows solution. is there a bug to be filed ?

i have another box like this too where i need it un mounted but can not reboot.

anyone have a solution to this ?

matt
Top
Luc484
Veteran
Veteran
User avatar
Posts: 1035
Joined: Sat Mar 26, 2005 6:26 pm
Location: Italy

  • Quote

Post by Luc484 » Fri Feb 23, 2007 7:16 am

mattmatteh wrote:the only option is to reboot ? i was working on an install and could not umount /mnt/gentoo/dev

logger ~ # umount /mnt/gentoo/dev
umount: /mnt/gentoo/dev: device is busy
umount: /mnt/gentoo/dev: device is busy
logger ~ # lsof | grep 'mnt/gentoo/dev'
udevd 11601 root 0u CHR 1,3 983 /mnt/gentoo/dev/null
udevd 11601 root 1u CHR 1,3 983 /mnt/gentoo/dev/null
udevd 11601 root 2u CHR 1,3 983 /mnt/gentoo/dev/null
logger ~ #

rebooting is a windows solution. is there a bug to be filed ?

i have another box like this too where i need it un mounted but can not reboot.

anyone have a solution to this ?

matt
I don't know whether this is the same problem I had or not. Anyway, in my case it is not necessary to reboot the system. It is only necessary to restart NFS on the client machine. That's it.
I googled a little bit and found out this is a common behaviour and it seems it is not considered a bug. I don't know if this is your case or not.
Top
mattmatteh
Guru
Guru
Posts: 449
Joined: Wed Mar 10, 2004 9:45 pm
Location: near chicago

  • Quote

Post by mattmatteh » Fri Feb 23, 2007 7:54 pm

i didnt have any nfs mounts. i was thinking this might be a the problem, but thats only a guess.
Row wrote:c) A process was working with the app, got closed but freed incorrectly its file descriptors, so there is no process anywhere but kernel still keeps a file descriptor pointing to the device. Solution: just pray. In fact, I don't know any way to fix this but rebooting.
matt
Top
loony
Apprentice
Apprentice
User avatar
Posts: 199
Joined: Wed Feb 25, 2004 12:39 pm

Re: Duh

  • Quote

Post by loony » Mon Feb 26, 2007 7:58 am

Row wrote: c) A process was working with the app, got closed but freed incorrectly its file descriptors, so there is no process anywhere but kernel still keeps a file descriptor pointing to the device. Solution: just pray. In fact, I don't know any way to fix this but rebooting.
Thank you so much, I almost got crazy about this :) fuser, lsof, ps etc and I couldn't get any info which process sits on that path. Also, the umount -l command helped me out with this.

loony
Please vote for this issue of OpenOffice.org (18004): http://qa.openoffice.org/issues/show_bug.cgi?id=18004
Top
x22
Apprentice
Apprentice
Posts: 208
Joined: Mon Apr 24, 2006 10:19 am

Re: Duh

  • Quote

Post by x22 » Mon Feb 26, 2007 8:35 am

Row wrote: c) A process was working with the app, got closed but freed incorrectly its file descriptors, so there is no process anywhere but kernel still keeps a file descriptor pointing to the device. Solution: just pray. In fact, I don't know any way to fix this but rebooting.
Kernel will always close files open by a process before completely destroying it.

But kernel may have files open for its own purposes (swap, loopback devices, mounting filesystems, NFS, ...) and this use is invisible for lsof and fuser.
Top
Post Reply

12 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy