LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2005, 12:43 PM   #1
lnebrown
Member
 
Registered: Sep 2004
Location: Seattle
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 15
USB thumb drive -- Need to stop?


Hopefully a simple question ....

You know how in windows you have to "stop" the usb device before removing it? I don't really know what this does, and I'm wondering if I'm causing any problems by plugging and unplugging at will (when the light is not flashing, of course) in linux (suse 9.1).

Is there anything I need to be careful of here?
 
Old 10-21-2005, 12:44 PM   #2
calcon
Member
 
Registered: Mar 2005
Location: somewhere over the rainbow theres a place....
Distribution: Ubuntu Dapper and Arch
Posts: 121

Rep: Reputation: 15
Do you normally unmount it before you take it out?

That should be all you have to do :P
 
Old 10-21-2005, 02:01 PM   #3
lnebrown
Member
 
Registered: Sep 2004
Location: Seattle
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 15
No, I don't unmount it. Am I hurting anything by doing this? The icon that automatically showed up just disappears.

If it is necessary to unmount, it seems like the user-friendly thing to do would be to have a desktop link that would do whatever should be done with the click of a button. I'm sure I'm not the first person to think about this, which is why I doubt that I need to unmount it manually.
 
Old 10-21-2005, 10:15 PM   #4
brainiac
Member
 
Registered: Jan 2005
Location: middle of a cornfield, IL
Distribution: Kanotix HD Install, Debian Testing, XP Pro,Vista RC1
Posts: 145

Rep: Reputation: 15
If you right click the icon does it give you the option to "unmount" it?
 
Old 10-21-2005, 11:06 PM   #5
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
When you "stop" the device in Windows, you're doing the same thing as "unmounting" it in Linux. Like brainiac mentioned, try right-clicking a desktop icon to see if it has an unmount option. I'm 99.9% sure it will.

So what does the unmount do, and why should users care? THe unmount forces the system to sync-up the filesystem on the device. The OS (Windows, Linux, Mac, etc.) buffers writes to devices; it collects them in memory. When enough has been collected, the OS will "flush" the writes in one big chunk, and start collecting again, then another flush, etc. An unmount tells the OS, "You need to flush now because you're not going to have the opportunity later." If the device is yanked before a flush occurs, there's a risk that the last "save" for a file may not be stored on disk, and hence, lost.
 
Old 10-22-2005, 02:58 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
As far as USB-memory devices or cf-cards go, you
probably want the following two options in the fstab
for them:
Code:
noatime,sync
e.g.
Code:
/dev/sda1        /mnt/cam         auto        noatime,sync,noauto,noexec,user,rw
,umask=000   0   0

Why?
noatime:
Given the limited number of writes those media can
handle you don't want to waste their life by writing the
date you last read a file.
sync:
So you can actually unplug it without DAMAGING data
due to write-back caching. Still not a good method, you
SHOULD unmount it, but better than nothing ;}


Cheers,
Tink
 
Old 10-22-2005, 07:57 PM   #7
lnebrown
Member
 
Registered: Sep 2004
Location: Seattle
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks to everyone for the great info. I will stop being lazy and unmount it. I checked, and there is no right-click option. I would guess there would be a way to write a script of some sort (run from an icon of some sort?), but I have no experience in this. Could anyone point me in the right direction for this?
 
Old 10-25-2005, 01:29 PM   #8
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Rep: Reputation: 32
suse 9.0 and on has auto-unmounting for the USB sticks, etc. so you're safe to just pull it.
 
Old 10-25-2005, 01:35 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally posted by lefty.crupps
suse 9.0 and on has auto-unmounting for the USB sticks, etc. so you're safe to just pull it.
How would that work? Basically like what I said, that the thing
doesn't write-cache, and the auto-mounter just forces the unmount
after it has been pulled?


Cheers,
Tink
 
Old 10-26-2005, 12:40 AM   #10
ishti_du
LQ Newbie
 
Registered: Oct 2005
Location: Dhaka, Bangladesh
Posts: 22

Rep: Reputation: 15
Dear all,
I was reading the interesting discussion and came with another question: why does it says " cannot unmount: device is busy" (sort of message) after I have typed the umount command-of course after closing all the windows?? I have to always pull my USB stick though the light is 'on' for that.

I am using Fedora core 2. And no Icon is shown when i mount it , so no chance of right clicking on it!!

Last edited by ishti_du; 10-26-2005 at 01:16 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
USB thumb drive detected by usb but not by scsi ashlock Linux - Hardware 6 06-02-2005 03:58 PM
USB Thumb Drive WolfCub Linux - Hardware 18 03-01-2005 10:06 AM
Usb Thumb Drive Crippledzero Linux - Hardware 1 10-07-2004 10:29 PM
USB drive using different partitions (usb key thumb drive) Arodef Linux - Hardware 0 08-04-2004 07:36 PM
USB thumb drive works great, but I still can't get my USB mouse to work. blk96gt Slackware 8 06-22-2004 02:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration