Bug 145975 - 2GB limit for noatime and sync mount options too small
2GB limit for noatime and sync mount options too small
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-24 09:16 EST by Luke Hutchison
Modified: 2013-03-05 22:42 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-24 17:51:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Luke Hutchison 2005-01-24 09:16:30 EST
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 09:19:15 EST
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 17:51:54 EST
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.