automount of internal sata drives with udisks
david at fubar.dk
Fri Apr 9 08:04:04 PDT 2010
On Thu, 2010-04-08 at 13:49 +0200, Stephan Raue wrote:
> Hi all,
> how is it possible to mount internal (SATA) Harddisk drives
> automatically with udisks?
> I am using an embedded Linux system with udisk-1.0.0 and without using
> an /etc/fstab. I can boot my system from an USB stick. Other USB drives
> will be mounted by udisks automatically, but not the internal drives.
> what must i change or do?
Actually udisks doesn't automatically mount anything - the way it works
is that the desktop session is responsible for deciding if a mountable
filesystem is to be automatically mounted. It sounds really easy to do
this but experience has shown that you need to be very careful.
Anyway, for GNOME, Nautilus is in charge of that. Nautilus basically, on
startup and when a new GVolume is announced, just checks the result of
which is set by the GVolumeMonitor in charge (which in this case is the
gnome-disk-utility volume monitor) and, if TRUE, calls g_volume_mount().
So we need to look at the volume monitor to find the answer. It's here:
As you can see this involves looking at the udisks properties
DevicePresentationNopolicy and DriveConnectionInterface. See
for more details.
It also involves setting should_automount to FALSE for GVolume objects
for mountable filesystem that appear much later than the GDrive that
contains them - this is to void automounting a filesystem just created
via fdisk(1) or parted(1) from the command line.
Of course for a fixed function device, rather than a generic OS, you
don't have to be that careful because you know e.g. that there is never
going to be a multi-initiator SAN with 1000 disks connected to it.
More information about the devkit-devel