Bug 145975 - 2GB limit for noatime and sync mount options too small
Summary: 2GB limit for noatime and sync mount options too small
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: hal
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Zeuthen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-24 14:16 UTC by Luke Hutchison
Modified: 2013-03-06 03:42 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-01-24 22:51:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Luke Hutchison 2005-01-24 14:16:30 UTC
I'm really glad that HAL adds the sync option for hotplug media e.g.
memory sticks.  Since I discovered that, I've happily been plugging
media, writing files, and unplugging without unmounting (as you can do
without problems on a lesser OS!).  However, recently I wrote some
files to a Rio Carbon MP3 player, which has an internal 5GB HDD.  I
unplugged it without unmounting, and then thought I'd better plug it
back in and make sure there was a sync option it /etc/fstab.  There
was not.  After some digging I found out that sync (and noatime) is
added only for drives < 2GB in size.

I think this limit is too small.  I understand that for "real" USB
drives, you shouldn't unplug without unmounting -- but all consumer
electronics devices should have sync in the options, or people are
going to end up with corrupted files.  (I haven't determined yet
whether or not I have corrupted anything on the Carbon by unplugging
in a mounted state.)

I don't know what the best fix is, but perhaps raising the limit to
40GB would eliminate most MP3 players/cameras (present and near
future) from having problems.  The biggest players I know of are 20GB.
 Mind you, there are handheld video players with bigger drives in the
works.  Perhaps it would be better to have the user manually disable
sync for any hotplugged drive they don't want the option on, rather
than automatically disabling it based on disk size.

Comment 1 Luke Hutchison 2005-01-24 14:19:15 UTC
BTW I also suggest there is a problem setting a limit like 2GB,
otherwise the user has to think, "OK, this drive I have plugged in is
4GB, which is bigger than 2BG, so I have to unmount first before
unplugging".  This is even more complicated than users having to
remember, "OK, this is seen by the OS as a drive, even though it's
external, so I have to unmount before unplugging".  Non-oldtime Linux
users have trouble with the unmount concept in any context.

Comment 2 David Zeuthen 2005-01-24 22:51:54 UTC
First of all, you should always use unmount; using sync and noatime is
a stopgap fix.

Second, for using the sync and noatime mount options, you may manually
create a .fdi file in /usr/share/hal/fdi/95userpolicy to achieve this
for your device(s) - for guidance, see this file

 /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi

and this article

 http://www.redhat.com/magazine/003jan05/features/hal/#fdi

Some day this will be configurable from the UI (could be: right click
drive in Nautilus, select "Optimize for fast removal" or "Optimize for
performance"), until then I refuse to raise the limit in the default
install. Sorry.



Note You need to log in before you can comment on or make changes to this bug.