[wellylug] Mounting USB flash memory
Pete Black
pete at marchingcubes.com
Thu Oct 28 08:52:32 NZDT 2004
Actually, Mandrake has probably done the right thing and mounted the
stick with the sync,noatime options in /etc/fstab or whatever mechanism
it uses to mount the flash disk.
using sync forces all disk writes to be synchronous, without this flag
your data will sit in buffer cache for some unpredictable period until
either some kernel event that triggers a sync occurs , or the 'sync' or
'umount' - which does a sync implicitly commands are entered.
noatime is useful for flash drives as it stops the kernel updating the
access time on files on the flash disk whenever they are read - e.g. if
you plug in the disk and your filemanager generates previews for each
image on it, when the flash disk has to update the atime for each file,
it has to write to the flash disk. Since flash has a limited rewrite
lifespan, this will slowly wear out your flash disk. Its not a big
issue, but something handy to know
If you have your USB flah drive mounted with the sync option, there
really isn't a lot of risk of losing data by removing it as long as the
drive light isn't flashing at the time.
-Pete
>On Thu, 2004-10-28 at 07:17 +1300, Eugene Van Wyk wrote:
>
>
>>I run Mandrake10 (Disk Smith version). So far I have used my memory
>>stick (Kingston) without any issues. The first time I plugged it in,
>>Mandrake detected it and created an icon on my desktop. I can not
>>remember whether I had any input in the initial exercise as it was
>>months ago.
>>
>>Now I plug it in click on "mnt/removable" and the directory appears. I
>>do what I need to do, save the files, and unplug the device. No drama.
>>
>>Should I explicitly unmount it? Maybe I've just been lucky, but I have
>>not had file corruption, and I have been using it for at least 7 months
>>now.
>>
>>
>Yes you should. :)
>Mandrake is probably writing to the stick as it appears to copy instead
>of waiting and writing in bursts to save people from unplugging their
>sticks without unmounting first and winding up with corrupt data.
>
>
>>Eugene van Wyk
>>Test Development Engineer
>>4RF Communications Ltd
>>26 Glover St
>>Ngauranga
>>Wellington
>>New Zealand
>>
>>
>>-----Original Message-----
>>From: wellylug-admin at lists.wellylug.org.nz
>>[mailto:wellylug-admin at lists.wellylug.org.nz] On Behalf Of David Antliff
>>Sent: Wednesday, 27 October 2004 11:51 p.m.
>>To: wellylug at lists.wellylug.org.nz
>>Subject: Re: [wellylug] Mounting USB flash memory
>>
>>
>>On Wed, 27 Oct 2004, Centurion Computer Technology Ltd wrote:
>>
>>
>>>You will have to look at hotplug to solve this one. I think
>>>automounting may be difficult because when it comes time to remove it
>>>you have to unmount it before you unplug it otherwise you end up with
>>>data corruption especially if you use the default fat filesystem on
>>>
>>>
>>it.
>>
>>
>>>I just setup an entry in /etc/fstab and a disk drive applet on the
>>>desktop (Gnome) to mount and unmount it.
>>>
>>>
>>I do pretty much the same with my USB camera and USB mp3 player. However
>>I
>>use udev instead of devfs to manage my device nodes. You might want to
>>look into this if you are using a 2.6 kernel. There's a very good howto
>>I
>>can point you at if you're interested...
>>
>>(udev means you don't have to worry about /dev/sda1 being either device,
>>
>>depending on which you plugged in first, amongst other things...)
>>
>>--
>>David.
>>
>>
>>--
>>Wellington Linux Users Group Mailing List:
>>wellylug at lists.wellylug.org.nz
>>To Leave: http://lists.wellylug.org.nz/mailman/listinfo/wellylug
>>
>>
>>
>>
>
>
>
>
More information about the wellylug
mailing list