Stopping disk automounting for one disk
Cameron Hutchison
lists at xdna.net
Sun Jun 24 08:50:52 UTC 2007
Thilo Six writes:
>Matthew Flaschen wrote the following on 24.06.2007 09:07
>> 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.
Perhaps I can put in a udev rule that catches the event and somehow
stops it from being passed to hal, but I dont know of a way to do that.
And, really, the event should be passed to hal. I just want
gnome-volume-manager not to do anything with the device.
>I am currently just wondering, this drive is connected to the computer
>always? ...or do you manually plug it in for backups?
I have some hotswap SATA drive bays. I plan to leave the drive plugged
in but removed from the scsi subsystem (scsiadd -r <n> 0 0 0). When my backup
script runs, it will add the scsi device (scsiadd -s <n>), mount the
partition, do the backup, unmount and remove the device.
Every week, I will physically remove the drive and swap it with another,
stored offsite.
I want to keep the drive removed from the scsi bus so it cannot be
accessed at all by a rogue process that may decide to delete the data on
it. My problem comes about because when I re-add the drive
gnome-volume-manager tries to automount it but does not have permission,
so a privilege escalation prompt takes over the display.
I would like to avoid this. I would also prefer that
gnome-volume-manager not automount it at all, since it is a system disk
and has nothing to do with the current desktop session.
>(you can mount partitons in /etc/fstab the same way with LABEL=<your_LABEL>
>instead of /dev/xyz or UUID nowadays.)
I tried /dev/disk/by-label/backup in /etc/fstab (the LABEL=... syntax is
obsoleted by udev's by-label link creation), but instead of the
privilege escalation prompt, I just get an error dialog saying I am not
privileged to mount the volume.
So, gnome-volume-manager is still trying to automount.
Thanks for your ideas, though.
Cheers
More information about the ubuntu-users
mailing list