Bug 155351

Summary: Cannot automatically mount a flash drive that is DOS formatted
Product: [Fedora] Fedora Reporter: AJ Lewis <157070.alewis>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: davej, davidz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-25 10:12:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description AJ Lewis 2005-04-19 13:55:34 UTC
Description of problem:
Even though hotplug recognizes my flash drive and inserts an entry into
/etc/fstab for it, I am unable to mount it without manually editting the fstab
entry.  The 'managed' keyword is not recognized by the DOS filesystem, and so it
fails to mount.

Version-Release number of selected component (if applicable):
kernel 2.6.10-1.770_FC3smp

How reproducible:
Every time

Steps to Reproduce:
1. Plug in flash drive
2. Verify /etc/fstab entry:
/dev/sda                /media/FLASH            vfat  
user,exec,noauto,iocharset=utf8,noatime,sync,managed 0 0

3. Attempt to mount
$ mount /media/FLASH/
mount: wrong fs type, bad option, bad superblock on /dev/sda,
       or too many mounted file systems

4. Check dmseg
FAT: Unrecognized mount option "managed" or missing value
  
Actual results:
Unable to mount drive

Expected results:
Able to mount

Additional info:
I have gotten this to work by modifying the dos filesystem - I think modified
the fat_tokens entries in fs/fat/inode.c to include "managed", and then stuck a
check for it in the case statement in parse_options() just below, but it's been
a while, so I can't remember for certain.  Perhaps there's a simpler method to
fix this though.

Comment 1 Dave Jones 2005-04-20 00:59:22 UTC
I'm puzzled why you added that to your fstab if it works without it ?


Comment 2 AJ Lewis 2005-04-20 14:11:12 UTC
I didn't - hotplug does.  And it puts the managed entry in so it knows to pull
it out of fstab when the device is removed.

Comment 3 Dave Jones 2005-04-20 19:24:58 UTC
mount is broken.
It should be stripping out 'managed' before it even gets passed to the kernel.


Comment 4 David Zeuthen 2005-04-20 19:37:20 UTC
You need a sufficiently new version of util-linux for this; 2.12a-16 (as shipped
with FC3) or later is known to work.