[opensuse] SUSE 10.0: How to prevent mount of USB disk with subfs?
Hi, Somehow SUSE 10.0 is set up to mount USB disk devices automatically as subfs on /media/* where "*" is the disk name. While that has been OK so far for USB sticks (I don't use them often anyhow), it is not what I want for my shiny new 500GB USB disk that I want to use for videos. I would like to prevent that disk to be mounted via the subfs mechanism, but want to use my own mount parameters. Actually, I don't want to turn off the automatism completely, that's convenient for USB sticks. I just want to turn it off for this one disk. Therefore, how can I do that? I have no problem in mounting and/or umounting this disk manually (it will be on all the time, so I can simply add it to fstab to handle it during boot/shutdown). TIA for any answer, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Joachim Schrod wrote:
Somehow SUSE 10.0 is set up to mount USB disk devices automatically as subfs on /media/* where "*" is the disk name.
While that has been OK so far for USB sticks (I don't use them often anyhow), it is not what I want for my shiny new 500GB USB disk that I want to use for videos.
I would like to prevent that disk to be mounted via the subfs mechanism, but want to use my own mount parameters. Actually, I don't want to turn off the automatism completely, that's convenient for USB sticks. I just want to turn it off for this one disk. Therefore, how can I do that?
I have no problem in mounting and/or umounting this disk manually (it will be on all the time, so I can simply add it to fstab to handle it during boot/shutdown).
$> cat /usr/share/hal/fdi/policy/20thirdparty/no_usbdisk_automount.fdi <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> <deviceinfo version="0.2"> <device> <match key="storage.drive_type" string="disk"> <match key="storage.bus" string="usb"> <match key="info.vendor" string="WDC WD30"> <match key="info.product" string="00JB-00KFA0"> <merge key="storage.policy.should_mount" type="bool">false</merge> </match> </match> </match> </match> </device> </deviceinfo> Vendor and product strings need to be changed to match your 500GB USB disk (see "lshal" for details). Do not forget to restart HAL. Hope this helps, Thomas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Thomas Hertweck wrote:
I would like to prevent that disk to be mounted via the subfs mechanism, but want to use my own mount parameters. Actually, I don't want to turn off the automatism completely, that's convenient for USB sticks. I just want to turn it off for this one disk. Therefore, how can I do that?
$> cat /usr/share/hal/fdi/policy/20thirdparty/no_usbdisk_automount.fdi <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> <deviceinfo version="0.2"> <device> <match key="storage.drive_type" string="disk"> <match key="storage.bus" string="usb"> <match key="info.vendor" string="WDC WD30"> <match key="info.product" string="00JB-00KFA0"> <merge key="storage.policy.should_mount" type="bool">false</merge> </match> </match> </match> </match> </device> </deviceinfo>
Vendor and product strings need to be changed to match your 500GB USB disk (see "lshal" for details). Do not forget to restart HAL.
Great, this worked like a charm! You guys rock! Actually, I placed this file in /etc/hal/fdi/policy/20local/ and not in /usr/share/; it'll better survive updates on my system, as I tend to migrate only /etc/ and not /usr/share/. Best, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
Joachim Schrod
-
Thomas Hertweck