Linux - GeneralThis 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.
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.
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?
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:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.