You are not logged in.

#1 2009-08-16 23:30:41

iamsmrt
Member
Registered: 2009-08-12
Posts: 138

[SOLVED] Looking to set up automounting for removable HD's

Hey guys, I'm a new Arch user, coming from Ubuntu and I'd like to say that I'm really enjoying this distribution.

I know how to mount and unmount drives using blkid to find the UUID of each hard drive and then adding it to my fstab. It's fun and all but I'd really like the mounting behavior to be more plug and play i.e. plug in a friend's flash drive and it automatically mounts in /media/<device label>. I looked into autofs but it didn't seem to be quite what I was looking for (and plus I put it in my daemons and it always failed to start the automounting system). How can I go about getting this? Do I have to play around with my udev rules?

-SMRT

Last edited by iamsmrt (2009-08-27 19:12:30)

Offline

#2 2009-08-17 14:08:12

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: [SOLVED] Looking to set up automounting for removable HD's

Look here, this thing works really fine

Offline

#3 2009-08-27 17:38:19

iamsmrt
Member
Registered: 2009-08-12
Posts: 138

Re: [SOLVED] Looking to set up automounting for removable HD's

I tried that but it was mounting one of my hard drives in an irritating manner (mounted in /media/sdb1 or /media/sdc1 depending on what order it had been connected).

I actually have gnome-volume-manager installed but I have no idea how to get it to start. It's not in my processes and I can't find the executable's location.

Offline

#4 2009-08-27 17:40:56

blackrain
Member
From: Poland
Registered: 2008-04-27
Posts: 23
Website

Re: [SOLVED] Looking to set up automounting for removable HD's

thunar --daemon works great for me.

Offline

#5 2009-08-27 18:12:27

iamsmrt
Member
Registered: 2009-08-12
Posts: 138

Re: [SOLVED] Looking to set up automounting for removable HD's

I get a "failed to mount"

org.freedesktop.hal.storage.mount-removable no <-- (action, result).

Here's some output of gvfs-mount:

brian@brian-laptop:~$ gvfs-mount -li
Drive(0): USB Drive
  Type: GProxyDrive (GProxyVolumeMonitorHal)
  ids:
   hal-udi: '/org/freedesktop/Hal/devices/storage_serial_Seagate_FreeAgentDesktop_5QM1CAY5_0_0'
   unix-device: '/dev/sdb'
  themed icons:  [drive-removable-media-usb]  [drive-removable-media]  [drive-removable]  [drive]
  is_media_removable=0
  has_media=1
  is_media_check_automatic=0
  can_poll_for_media=0
  can_eject=0
  Volume(0): 500.1 GB Media
    Type: GProxyVolume (GProxyVolumeMonitorHal)
    ids:
     uuid: 'aaf7b2f8-c1ad-45ce-96e4-f040fc0f4a9f'
     hal-udi: '/org/freedesktop/Hal/devices/volume_uuid_aaf7b2f8_c1ad_45ce_96e4_f040fc0f4a9f'
     unix-device: '/dev/sdb1'
    uuid=aaf7b2f8-c1ad-45ce-96e4-f040fc0f4a9f
    themed icons:  [drive-removable-media-usb]  [drive-removable-media]  [drive-removable]  [drive]
    can_mount=1
    can_eject=0

What worries me is that gnome-volume-manager isn't in my running processes, what is gvfs-hal-volume because that's the only process that seems to be running that's related to volumes.

I have gnome-volume-manager installed but I don't know where the executable is located so I can't actually run it..

Last edited by iamsmrt (2009-08-27 18:43:46)

Offline

#6 2009-08-27 18:54:47

blackrain
Member
From: Poland
Registered: 2008-04-27
Posts: 23
Website

Re: [SOLVED] Looking to set up automounting for removable HD's

iamsmrt wrote:

I get a "failed to mount"

org.freedesktop.hal.storage.mount-removable no <-- (action, result).

Edit your /etc/PolicyKit/PolicyKit.conf:

<config version="0.1">
<match user="yourUserNameGoesHere">
                <match action="org.freedesktop.hal.storage.*">
                        <return result="yes"/>
                </match>
                <match action="hal-storage-mount-fixed-extra-options">
                <!-- for internal devices mounted with extra options like a wished mount point -->
                        <return result="yes" />
                </match>
                <match action="hal-storage-mount-removable-extra-options">
                <!-- for external devices mounted with extra options like a wished mount point -->
                        <return result="yes" />
                </match>
        </match> 
</config>

Offline

#7 2009-08-27 19:12:16

iamsmrt
Member
Registered: 2009-08-12
Posts: 138

Re: [SOLVED] Looking to set up automounting for removable HD's

Thanks, it actually works with nautilus now!

How can I change the name of the folder it mounts to though (preferably through command line)? Also, how about mounting permissions?

EDIT: Figured out the mount folder bit, had to change the label using e2label: https://help.ubuntu.com/community/RenameUSBDrive

And for the mounting permissions, since the hd is formatted in ext3 I just changed it normally with chgrp and chmod.

Last edited by iamsmrt (2009-08-27 19:46:56)

Offline

Board footer

Powered by FluxBB