Stopping disk automounting for one disk
Cameron Hutchison
lists at xdna.net
Sun Jun 24 09:43:14 UTC 2007
Cameron Hutchison wrote:
>Thilo Six writes:
>>> Cameron Hutchison wrote:
>>>
>>>> I do not want this disk to be automounted. I will mount it in my backup
>>>> script when I add the scsi device. But I do want the usual case of auto
>>>> mounting other hotplugged disks, such as USB devices, etc.
>>generally spoken all is posible with udev.
>>But you have to write your own rules for that drive.
>I dont think this is a udev issue. I think it is related to
>hal/gnome-volume-manager. There is a udev rule that passes all events to
>hal. Hal is probably then passing the event to gnome-volume-manager via
>dbus. gnome-volume-manager is then automounting based on its configuration
>which happens to be quite coarse.
Ok. I've got it figured out now. Short answer: Put the following in
/etc/hal/fdi/policy/backup-disk.fdi (name the file whatever you want):
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<!--
System policy to not automount the backup disks.
-->
<deviceinfo version="0.2">
<device>
<match key="volume.uuid" string="09af9742-82eb-4520-86a8-0f2425d5f1aa">
<merge key="volume.ignore" type="bool">true</merge>
</match>
</device>
</deviceinfo>
Add more <device> tags for additional volumes to be ignored.
It's not ideal, since volume.ignore means more than just "dont
automount". There is a storage level option called
storage.automount_enabled_hint which seems to be ignored. Ideally,
there'd be a volume.automount_enabled_hint to work on a per-volume basis
instead of a per-storage-device basis, but since the hint seems to be
ignored it really doesn't matter where it is :-)
Thanks for spuring me on to find this. Thank God for Free Software.
There's no more accurate documentation than the source code.
More information about the ubuntu-users
mailing list