Bug 112946

Summary: Fstab option hotplug has no affect
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Marcel Hilzinger <marcel>
Component: HotplugAssignee: Christian Zoz <zoz>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dkukawka, ro
Version: Beta 3   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: the patch

Description Marcel Hilzinger 2005-08-25 11:40:34 UTC
According to Christian Zoz, an fstab entry with the mount option hotplug 
should prevent external USB-disks from be mountet automatically with subfs. 
 
I tested this on beta2 and beta3, but there is no reaction. The disk get's 
mountet by hal-subfs-mount with -t subfs
Comment 1 Christian Zoz 2005-08-29 14:30:06 UTC
Up to now the script /sbin/udev.mount.sh was missing completely. This will be
added in beta4. This will fsck and mount storage devices that have matching
lines in fstab.

Also submount has been fixed at least partially. It does not try to mount
already mounted devices. Only if you add 'nomount' to your fstab line, then
udev.mount.sh wont mount it. Then unfortunately submount will mount that. I
don't know if that can be fixed in time for SL10.0. Danny?

Another little missig thing is a patch for boot.localfs. It is necessary that
fsck in boot.localfs ignores all lines that have the mount option hotplug. fsck
-t noopts=hotplug will do this. I'l attach a patch
Rudi is it ok, to apply it?
Comment 2 Christian Zoz 2005-08-29 14:31:15 UTC
Created attachment 48017 [details]
the patch
Comment 3 Ruediger Oertel 2005-08-29 14:56:58 UTC
patch applied. 
Comment 4 Christian Zoz 2005-08-29 16:42:07 UTC
udev.mount.sh is now in udev. Package submitted.
Descripton for new HOTPLUG_* variables are still missing.
Comment 5 Marcel Hilzinger 2005-09-01 16:05:46 UTC
I cannot see big changes in Beta4. Which entry am I supposed to use, that Suse 
wont mount the USB disk automatically: 
- nomount 
- hotplug 
?? 
 
I also realised, that this is not a solution, just a workaround. A solution 
would be an HAL-based check wheter to mount. Because with multiple devices 
(digital camera, flash-drive, harddisk etc) /dev/sda1 get's /dev/sdb1 and so 
on. 
 
Isn't there a possibility to create an FDI-file with a nomount-option for a 
specific disk? There must be one. 
 
Comment 6 Danny Al-Gaaf 2005-09-01 16:47:11 UTC
> Isn't there a possibility to create an FDI-file with a nomount-option for a 
> specific disk? There must be one. 

http://portal.suse.de/sdb/de/2005/05/dkukawka_subfs_nomount.html

Comment 7 Christian Zoz 2005-09-01 18:39:34 UTC
And this feature should not avoid mounting by submount or whatever, but allow
mounting static via fstab as system partition.

For hal you have to edit fdi files of course. We hope we that someone will write
a fdi file editor soon to make this easier. Danny, would you please file a
feature request?

That's all we can do now. Will be improved of course.

Variables are now in sysconfig/storage and have a description.
Comment 8 Marcel Hilzinger 2005-09-01 20:27:53 UTC
To #6: The question was, how to disable ONE device from beeing mountet via  
subfs. The linked article tells me, how to disable ALL.  
You know, those crazy guys having several 300 GB USB-disks also have  
MP3-players, digital cameras and memory sticks, which should be handled by  
subfs... :-) 
  
To #7: So this means, if I use the 'hotplug' option in /etc/fstab AND the 
device is plugged in on bootime, it will be mountet as in old times? And if I 
hotplug it? Will it be mountet twice? I really do not understand, how it 
should work. 
Comment 9 Danny Al-Gaaf 2005-09-02 06:06:37 UTC
> To #6: ....
Whats the problem? There are also other articels about this in the SDB! Take a 
look at http://portal.suse.de/sdb/de/2005/06/dkukawka_halnosync_html.html for a 
special case and merge the key from the other article from #6 (storage.policy.
should_mount).
Comment 10 Christian Zoz 2005-09-02 08:08:19 UTC
To #7: Yes, it will be mounted before and after you plugged it.
There will be a README in the final version.

Danny, could you also provide an easy to understand HowTo for proper fdi file
tweaking?
Comment 11 Marcel Hilzinger 2005-09-02 09:47:40 UTC
As I'm not completely stupid :-) I already tried to make a special fdi-file, 
which contains the id of my disk, to avoid automatic mounting. At least under 
9.3 it did not work for me. 
 
I will retry it ASAP under 10.0. 
Comment 12 Danny Al-Gaaf 2005-09-02 12:41:31 UTC
If you need assistance to prevent automount with hal for a special device, 
please feel free to mail me directly.