Bug 125127

Summary: Add updfstab.conf.default entry for hotplug of SimpleTech USB FlashDrive
Product: [Fedora] Fedora Reporter: Victor Semizarov <v_semizarov>
Component: kudzuAssignee: Bill Nottingham <notting>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-07 23:40:57 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 Victor Semizarov 2004-06-02 21:34:09 UTC
Description of problem:
When I insert my 128MB SimpleTech USB FlashDrive memory stick
usb-storage loads but no /etc/fstab entry
is added via updfstab because of a missing entry in
/etc/updfstab.conf.default.

Version-Release number of selected component (if applicable):
kudzu-1.1.57-1
hotplug-2004_04_01-1
hwdata-0.118-1

How reproducible:
Always

Steps to Reproduce:
1. Insert memory stick into usb jack
2.
3.
  
Actual results:
/var/log/messages shows that USB Mass Storage is found,
usb-storage is visible via lsmod, lsusb shows the device,
but /etc/fstab entry does not appear

Expected results:
following entry in /etc/fstab:
/dev/sda1               /mnt/memstick           auto   
noauto,owner,kudzu 0 0

Additional info:

I tried to add fstab entry manually. It worked, but when I removed the
stick,
entry disappeared, i.e. updfstab worked only for "remove", not for "add".
Calling updfstab manually did not help either, i.e. updfstab did not
recognize device.
To find out actual device info, I did:
  # scsi_unique_id /dev/sda
  model: Generic USB SD Reader
  page83: No page83 information found.
  page80:

Then applied the patch as follows:
--- /etc/updfstab.conf.default  2004-05-06 03:44:33.000000000 +0400
+++ /etc/updfstab.conf.default.patched  2004-06-03 00:50:03.421420000
+0400
@@ -42,6 +42,7 @@
 device memstick {
     partition 1
     match   hd MSC
+    match   hd "Generic USB SD Reader"
 }

Now manual run of updfstab found device after hotplugging.
However, it did not happen automatically on 'add', fstab wipeout on
removals worked fine :)

I applied following patch:
--- /etc/hotplug/usb.agent      2004-05-04 02:05:18.000000000 +0400
+++ /etc/hotplug/usb.agent.patched      2004-06-03 00:51:59.540767176
+0400
@@ -432,6 +432,10 @@
        debug_mesg "... no modules for $LABEL"
        exit 2
     fi
+
+    if [ -x /usr/sbin/updfstab ]; then
+        /usr/sbin/updfstab
+    fi
     ;;
  
 remove)

(this is end of 'add' case entry).

After that everything was OK. But trying to open memory stick on GNOME
nautilus poped up dialog "only root can mount /dev/sda....."
If updfstab could add entries with "user" or "users" option it would work,
but updfstab can only add entries with "owner" option, so I wanted the
devices to become mine upon logon. So I applied following patch:

--- /etc/security/console.perms 2004-04-14 19:09:41.000000000 +0400
+++ /etc/security/console.perms.patched 2004-06-02 23:24:52.377416792
+0400
@@ -33,7 +33,7 @@
 <scanner>=/dev/scanner /dev/usb/scanner*
 <rio500>=/dev/usb/rio500
 <camera>=/mnt/camera* /dev/usb/dc2xx* /dev/usb/mdc800*
-<memstick>=/mnt/memstick*
+<memstick>=/dev/sda* /dev/sdb* /dev/sdc* /mnt/memstick*
 <flash>=/mnt/flash*
 <diskonkey>=/mnt/diskonkey*
 <rem_ide>=/mnt/microdrive*

After that everything is OK and I propose these patches as a solution.
Do I need to cross-post this bug for abovementioned components ?

Victor

Comment 1 Bill Nottingham 2005-02-07 23:40:57 UTC
Apologies for the delay.

As this functionality has moved to HAL, this will not be fixed at this
point for Fedora Core in updfstab.