Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-19-2003, 11:18 PM
|
#1
|
Member
Registered: Jan 2003
Location: Ohio, USA
Distribution: RH 9.0 / Fedora Core 3
Posts: 58
Rep:
|
is it ok to use umount -l ?
I have a bash script I'm using for mounting, erasing, then unmounting a compact flash card.
Every now and then when the umount command gets issued I get an error back saying that it is unable to un mount the device because the device is busy. Issuing the umount -l (lazy) command instead works fine.
Is there any reason I would not want to replace the umount command in the script with umount -l so that I know the card will unmount each time?
Thanks.
ewto
|
|
|
10-20-2003, 01:56 AM
|
#2
|
Senior Member
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Rep:
|
It would be better to figure out why it's being reported as busy when it is or isn't, and work from there.
What's running when the device is reported busy ?
ps aux
Is there anything browsing its filesystem at the time?
-Shade
|
|
|
10-20-2003, 04:11 AM
|
#3
|
Member
Registered: Jan 2003
Location: Ohio, USA
Distribution: RH 9.0 / Fedora Core 3
Posts: 58
Original Poster
Rep:
|
Thank you.
I don't see anything in ps aux that is obviously accessing the card at the time: here is the output just in case I don't exactly know what I'm looking for:
Code:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 2.3 0.0 1376 84 ? S 04:09 0:03 init
root 2 0.0 0.0 0 0 ? SW 04:09 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SW 04:09 0:00 [kapmd]
root 4 0.0 0.0 0 0 ? SWN 04:09 0:00 [ksoftirqd_CPU0]
root 9 0.0 0.0 0 0 ? SW 04:09 0:00 [bdflush]
root 5 0.0 0.0 0 0 ? SW 04:09 0:00 [kswapd]
root 6 0.0 0.0 0 0 ? SW 04:09 0:00 [kscand/DMA]
root 7 0.0 0.0 0 0 ? SW 04:09 0:00 [kscand/Normal]
root 8 0.0 0.0 0 0 ? SW 04:09 0:00 [kscand/HighMem]
root 10 0.0 0.0 0 0 ? SW 04:09 0:00 [kupdated]
root 11 0.0 0.0 0 0 ? SW 04:09 0:00 [mdrecoveryd]
root 15 0.0 0.0 0 0 ? SW 04:09 0:00 [kjournald]
root 73 0.0 0.0 0 0 ? SW 04:09 0:00 [khubd]
root 228 0.0 0.0 0 0 ? SW 04:09 0:00 [usb-storage-0]
root 229 0.0 0.0 0 0 ? SW 04:09 0:00 [scsi_eh_0]
root 1606 0.0 0.0 0 0 ? SW 04:09 0:00 [kjournald]
root 1956 0.1 0.1 1440 152 ? S 04:10 0:00 syslogd -m 0
root 1960 0.0 0.1 1368 144 ? S 04:10 0:00 klogd -x
rpc 1978 0.0 0.0 1544 92 ? S 04:10 0:00 [portmap]
rpcuser 1997 0.0 0.1 1616 232 ? S 04:10 0:00 [rpc.statd]
root 2065 0.0 0.0 1364 68 ? S 04:10 0:00 /usr/sbin/apmd -p
root 2102 0.8 0.8 3504 1012 ? S 04:10 0:01 /usr/sbin/sshd
root 2116 0.0 0.2 2020 320 ? S 04:10 0:00 xinetd -stayalive
root 2136 0.0 1.5 5936 1996 ? S 04:10 0:00 [sendmail]
smmsp 2145 0.0 1.3 5728 1664 ? S 04:10 0:00 [sendmail]
root 2155 0.0 0.0 1412 116 ? S 04:10 0:00 gpm -t ps/2 -m /d
root 2164 0.0 0.1 1420 136 ? S 04:10 0:00 crond
root 2175 0.0 1.1 7512 1504 ? S 04:10 0:00 cupsd
xfs 2232 0.2 2.1 4620 2696 ? S 04:10 0:00 [xfs]
daemon 2250 0.0 0.0 1408 72 ? S 04:10 0:00 [atd]
root 2259 0.0 0.0 1348 56 tty1 S 04:10 0:00 /sbin/mingetty tt
root 2260 0.0 0.0 1348 56 tty2 S 04:10 0:00 /sbin/mingetty tt
root 2261 0.0 0.0 1348 56 tty3 S 04:10 0:00 /sbin/mingetty tt
root 2262 0.0 0.0 1348 56 tty4 S 04:10 0:00 /sbin/mingetty tt
root 2263 0.0 0.0 1348 56 tty5 S 04:10 0:00 /sbin/mingetty tt
root 2264 0.0 0.0 1348 56 tty6 S 04:10 0:00 /sbin/mingetty tt
root 2265 0.2 2.0 14112 2592 ? S 04:10 0:00 [gdm-binary]
root 2308 0.8 2.5 14876 3172 ? S 04:10 0:00 [gdm-binary]
root 2309 4.4 6.8 19072 8652 ? S 04:10 0:04 /usr/X11R6/bin/X
eric 2318 1.7 6.9 18392 8780 ? S 04:10 0:01 /usr/bin/gnome-se
eric 2360 0.0 0.5 3132 700 ? S 04:10 0:00 /usr/bin/ssh-agen
eric 2365 1.6 5.3 11152 6784 ? S 04:10 0:01 /usr/libexec/gcon
eric 2367 0.4 1.4 6216 1868 ? S 04:10 0:00 /usr/libexec/bono
eric 2369 0.7 4.7 17220 5968 ? S 04:10 0:00 gnome-settings-da
eric 2374 0.1 0.7 2496 884 ? S 04:10 0:00 [fam]
eric 2379 0.5 1.0 3580 1276 ? S 04:10 0:00 xscreensaver -nos
eric 2382 2.3 5.1 12596 6480 ? S 04:10 0:01 /usr/bin/metacity
eric 2386 2.8 9.0 20480 11408 ? S 04:10 0:02 gnome-panel --sm-
eric 2388 2.7 10.0 62688 12636 ? S 04:10 0:02 nautilus --no-def
eric 2390 0.4 4.4 16304 5564 ? S 04:10 0:00 magicdev --sm-cli
eric 2392 0.5 5.1 16688 6496 ? S 04:10 0:00 eggcups --sm-clie
eric 2394 0.2 2.9 11656 3732 ? S 04:10 0:00 pam-panel-icon --
root 2397 0.0 0.1 1404 148 ? S 04:10 0:00 [pam_timestamp_c]
eric 2404 0.7 5.2 16916 6580 ? S 04:10 0:00 /usr/libexec/noti
eric 2406 2.8 7.6 20420 9628 ? S 04:11 0:01 gnome-terminal
eric 2407 0.0 0.2 1852 284 ? S 04:11 0:00 [gnome-pty-helpe]
eric 2408 0.1 0.2 4308 320 pts/0 S 04:11 0:00 bash
root 2434 0.0 0.2 4088 376 pts/0 S 04:11 0:00 [su]
root 2437 0.1 0.3 4300 456 pts/0 S 04:11 0:00 -bash
root 2477 0.0 0.3 3700 400 pts/0 S 04:11 0:00 tail -f /var/log/
eric 2480 0.4 0.9 4308 1152 pts/1 S 04:11 0:00 bash
eric 2513 0.0 0.5 2644 696 pts/1 R 04:12 0:00 ps aux
Do you see anything jumping out there that I'm not seeing?
Thanks for your time!
ewto
|
|
|
10-20-2003, 04:17 AM
|
#4
|
Member
Registered: Jan 2003
Location: Ohio, USA
Distribution: RH 9.0 / Fedora Core 3
Posts: 58
Original Poster
Rep:
|
As an aside ... playing with it since my last message ... It seems I can unmount it if I use the unmounting utility from the Gnome desktop (rightclick, disks...)
Then I tried the "disk management utility" installed with Gnome. It also reports that the device is busy.
Does this mean perhaps that it is nautilus that is holding it open for some reason? I'm mounting it from the command line, not using the gui ... but I am running gnome and nautilus at the time.
Ideas?
ewto
Last edited by ewto; 10-20-2003 at 04:21 AM.
|
|
|
10-20-2003, 04:08 PM
|
#5
|
Member
Registered: Feb 2003
Location: Cleveland, Ohio (USA)
Distribution: Gentoo, Kubuntu 6.06
Posts: 179
Rep:
|
I have been using umount -l on my floppy drive after writing data to a floppy disk for some time without any trouble. Why I need to use umount -l instead of umount after writing data is beyond me, but it works. If you are nervous about the drive not unmounting properly, try mounting it again a few seconds after umount -l. If the drive re-mounts without error, then you should be able to immediately unmount it with a normal umount and remove the disk/compact flash card/what have you. (I think.)
And after all: umount -l is always preferable to umount -f.
|
|
|
10-21-2003, 02:57 AM
|
#6
|
Member
Registered: Aug 2003
Location: here
Distribution: suse 8.2
Posts: 169
Rep:
|
I have the same problem on both flash cards and cdrom. fuser to find the process and then I kill it.
|
|
|
All times are GMT -5. The time now is 12:42 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|