Package: usbmount
Version: 0.0.14
Severity: wishlist

Hi,

  after spending some time at learning about how syncing works and how you
  use usb disks, I came to the conclusion that usbmount should more
  _explicitely_ warn users or discourage them to use usbmount for accessing
  flash drives.

  The reason for that is as follows:

  1) the user assumes that usbmount takes care of automatic mounting *and*
     unmounting

  2) therefore, usbmount must rely on the "sync" option for mount

  3) sync option for mount is bad for flash drives in general (as it
     enlarges the number of write operations on the drive) and also because
     most of the flash disks are formatted FAT, and sync significantly
     slows down the write time (in the case of my 2.0 usb flash disk, to
     about 8 kb/s).  

     It took me some time to figure out what is happening and why does it
     take ages to write even a small file to a flash disk mounted with
     usbmount. 

I agree that I ignored the warning:

#############################################################################
# WARNING!  The vfat filesystem does not yet fully implement sync-mounting. #
# If you include "vfat" in the list of filesystem types, you *MUST* make    #
# sure all data is written to the medium before you remove it (e.g. run the #
# "sync" command in a terminal window).  Otherwise, you *WILL* lose data!   #
#############################################################################

and added the options suggested for FAT disks.

However, note that

  1) the warning is obsolete with kernel 2.6.12.  First of all, it says
     that the vfat filesystem does not fully implement sync-mounting and
     running sync is required.  This is not true anymore in newer,
     testing/unstable kernels.

     VFAT is mounted by usbmount with a sync option, which
      -- throttles performance
      -- eventually kills the flash disk

  2) it does not warn you about the performance drop with vfat and sync
     option

  3) it does not warn you _not_ to mount flashdisks with the sync option,
     which eventually kills the flashdisk; in some cases of crappy / buggy
     / cheap flashdisks this can happen very quickly, as a "sync"-ed write
     pounds on the FAT partition table repeatedly (unless there is some
     automatic wear leveling).

My suggestion:

  - add explicit warning to /etc/usbmount/usbmount.conf and
    /usr/share/doc/usbmount/README

  something like that would do:

#############################################################################
# WARNING!                                                                  #
# You should not use the "sync" option with USB flash drives, as it slows   #
# down the writing speed beyond usability and leads to a much faster wear-  #
# out of the disk.                                                          #
# Instead, use the command "sync" to synchronize the data on your hard disk #
# before removing the drive.                                                #
#############################################################################

References:

http://kernel.org/git/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commit;h=3e261a474262b622709d4851a1f26123e61ab13c
http://readlist.com/lists/vger.kernel.org/linux-kernel/22/111748.html


Cheers,

January Weiner

-- System Information:
Debian Release: testing/unstable
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686-smp
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)

Versions of packages usbmount depends on:
ii  lockfile-progs                0.1.10     Programs for locking and unlocking
ii  udev                          0.070-2    /dev/ management daemon

usbmount recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to