LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-31-2006, 05:40 PM   #1
edman007
Member
 
Registered: Sep 2003
Distribution: slackware-current
Posts: 173

Rep: Reputation: 30
umounting a drive that nothing is using but is busy


i have a usb thumb drive that i mounted and did stuff with, then when i went to umount it it said it was busy (showed twice) i did lsof and fuser on every file on the drive including the mount point itself and all devices (sdb and sdb1) in /dev related to the device, everything said nothing was using it, so i decided to go into single user mode, and it was still busy, i eventually did a umount -l and that said it umounted it, but i don't think did it the correct way (the man page says that just removes it from the file system without actually umounting it all the way), then i pulled the drive out and haven't seen any problems but was wondering what to do if this happens again, is it right to just umount -l and then putt the drive out, or should i try something else?
 
Old 01-31-2006, 09:56 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You weren't cd'd into the directory it was mounted to were you? Say you mount it to /mnt/usbdrive and nothing was accessing any files on it. But say you cd'd into /mnt/usbdrive so it was your present working directory, you will then get a "drive busy" error when trying to umount it.
 
Old 01-31-2006, 10:36 PM   #3
edman007
Member
 
Registered: Sep 2003
Distribution: slackware-current
Posts: 173

Original Poster
Rep: Reputation: 30
yea, i realize that could happen so to verify that i was using fuser right i cd'd to the directory and ran it again, that time i saw 1 PID of bash, i then closed that terminal and fuser once again started reporting that nothing was using anything there
 
Old 01-31-2006, 10:44 PM   #4
nitinatindore
Member
 
Registered: Dec 2004
Location: India
Distribution: Mandrake, Mandriva, PclinuxOS
Posts: 114

Rep: Reputation: 15
try

$umount -l mountpoint
 
Old 01-31-2006, 11:10 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by edman007
... but was wondering what to do if this happens again, is it right to just umount -l and then putt the drive out, or should i try something else?
If you have an LED on the thumbdrive that indicates it's in use, obviously wait until the LED has gone off. Then you could try forcing write of anything in buffer that hasn't made it to the device yet with the "sync" command.
 
  


Reply



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
device is busy, cant eject drive yobknat Linux - General 4 01-10-2006 06:40 AM
Mounting/umounting TomalakBORG Linux - General 7 05-12-2005 09:30 AM
how can i force unmount a busy CD drive mailavj Linux - Software 1 04-04-2005 06:21 PM
can't unmount my cdrom drive (says it's busy) fabs Linux - Hardware 2 02-23-2004 12:12 AM
umounting NFS Syncrm Linux - General 4 10-11-2002 07:55 PM

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

All times are GMT -5. The time now is 05:16 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
Open Source Consulting | Domain Registration