Automount fails with external USB drive

Ok, this used to work a few weeks ago… (I know, not very useful)

When I plug my USB drive in, the kernel sees it and I can mount it manually. However, it won’t automount. Can someone point me the way to dig deeper into this? I’ve done plenty of google searches but nothing I’ve tried has worked for ‘GNOME, SUSE 11.3.’ I am not sure if it is a permissions problem, configuration problem, a kernel automount, HID, or USB problem.

uname -a (stock SUSE desktop kernel):


Linux linux-hez9 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 i686 i686 i386 GNU/Linux

Here is the output from /var/log/messages:

Feb 14 15:47:09 linux-hez9 kernel: [16258.620213] usb 1-1: new high speed USB device using ehci_hcd and address 6
Feb 14 15:47:09 linux-hez9 kernel: [16258.749549] usb 1-1: New USB device found, idVendor=1058, idProduct=1023
Feb 14 15:47:09 linux-hez9 kernel: [16258.749553] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 14 15:47:09 linux-hez9 kernel: [16258.749557] usb 1-1: Product: Elements 1023
Feb 14 15:47:09 linux-hez9 kernel: [16258.749561] usb 1-1: Manufacturer: Western Digital
Feb 14 15:47:09 linux-hez9 kernel: [16258.749563] usb 1-1: SerialNumber: 575838314337304837363334
Feb 14 15:47:09 linux-hez9 kernel: [16258.756315] scsi7 : usb-storage 1-1:1.0
Feb 14 15:47:10 linux-hez9 kernel: [16259.800513] scsi 7:0:0:0: Direct-Access     WD       Elements 1023    2005 PQ: 0 ANSI: 4
Feb 14 15:47:10 linux-hez9 kernel: [16259.800737] sd 7:0:0:0: Attached scsi generic sg2 type 0
Feb 14 15:47:10 linux-hez9 kernel: [16259.819561] sd 7:0:0:0: [sdb] 1953519616 512-byte logical blocks: (1.00 TB/931 GiB)
Feb 14 15:47:10 linux-hez9 kernel: [16259.829423] sd 7:0:0:0: [sdb] Test WP failed, assume Write Enabled
Feb 14 15:47:10 linux-hez9 kernel: [16259.829429] sd 7:0:0:0: [sdb] Assuming drive cache: write through
Feb 14 15:47:10 linux-hez9 kernel: [16259.845620] sd 7:0:0:0: [sdb] Test WP failed, assume Write Enabled
Feb 14 15:47:10 linux-hez9 kernel: [16259.845626] sd 7:0:0:0: [sdb] Assuming drive cache: write through
Feb 14 15:47:10 linux-hez9 kernel: [16259.845638]  sdb: sdb1
Feb 14 15:47:10 linux-hez9 kernel: [16259.865437] sd 7:0:0:0: [sdb] Test WP failed, assume Write Enabled
Feb 14 15:47:10 linux-hez9 kernel: [16259.865442] sd 7:0:0:0: [sdb] Assuming drive cache: write through
Feb 14 15:47:10 linux-hez9 kernel: [16259.865447] sd 7:0:0:0: [sdb] Attached SCSI disk

Is this formated with NTFS by chance? Maybe the ‘dirty’ bit is set.

From root console, (with device plugged in), type

fdisk -l

Yes, it is NTFS, but I don’t think the dirty bit is set:


Disk /dev/sdb: 1000.2 GB, 1000202043392 bytes
255 heads, 63 sectors/track, 121600 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00021631

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121601   976758784    7  HPFS/NTFS

Did you use it recently with windows ? Did you disconnect it properly ?

As DaaX has suggested, not unmounting correctly (Windows or Linux) can cause problems. The best method is to mount within Windows and let it check/reset/repair the partition.

However, you could try the ntfsfix utility from a console:

sudo ntfsfix /dev/sdb1

I understand, but this is managed by the VM that I have SUSE installed into and the dirty bit isn’t set.

Yes, but if you used it improperly in windows, you’ll have to go back in windows, plug the drive and disconnect it properly. It doesn’t cost a lot to try it. :wink:

After that, try mounting and unmounting it in openSUSE.

It mounts fine. However, automount doesn’t work. Same log as before.

Sorry, I missed that. Your using Gnome right? Maybe check media mounting with ‘gconf-editor’ utility. If the media mounting settings look ok, then we may have to look at policykit settings…

On 2011-02-14 22:06, mark3397 wrote:
>
> Ok, this used to work a few weeks ago… (I know, not very useful)

Try creating a new user, and try with that one.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-02-14 22:36, deano ferrari wrote:
>
> Is this formated with NTFS by chance? Maybe the ‘dirty’ bit is set.

No, as it mounts manually.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-02-14 22:36, deano ferrari wrote:
>
> Is this formated with NTFS by chance? Maybe the ‘dirty’ bit is set.

No, as it mounts manually.


Cheers / Saludos,

Carlos E. R.

Stating the obvious. I mentioned that I missed that previously, hence last post. Cheers.

mark3397 wrote:
> It mounts fine. However, automount doesn’t work. Same log as before.

FWIW, I have a (possibly) similar problem. Gnome, 11.3 and an external
USB drive that used to automount and now doesn’t (see below).

I’ll check through this topic when I’m in front of the machine and
report whether it seems to really be the same or not. FWIW, the details
of my disk are:

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf459a71a

Device Boot Start End Blocks Id System
/dev/sdb1 1 262 2104483+ c W95 FAT32 (LBA)
/dev/sdb2 263 1306 8385930 c W95 FAT32 (LBA)
/dev/sdb3 1307 120296 955787175 8e Linux LVM
/dev/sdb4 120297 121601 10482412+ c W95 FAT32 (LBA)

It used to automount the three fat32 partitions and now it just
automounts /dev/sdb4.

More of a nuisance, it used to be that I could plug it in and then just
mount an LV in the LVM partition.

mount /dev/backup_vg/backup_home_lv

Now, the LV is not detected and has to be manually discovered and
activated. The following were executed after the drive was plugged in
and had settled down for a while:

piglet:~ # lvscan
ACTIVE ‘/dev/pooh_vg/home’ [150.00 GiB] inherit
ACTIVE ‘/dev/pooh_vg/usr’ [50.00 GiB] inherit
piglet:~ # pvscan
PV /dev/sdb3 VG backup_vg lvm2 [911.51 GiB / 661.51 GiB free]
PV /dev/sda3 VG pooh_vg lvm2 [268.10 GiB / 68.10 GiB free]
Total: 2 [1.15 TiB] / in use: 2 [1.15 TiB] / in no VG: 0 [0 ]
piglet:~ # lvscan
inactive ‘/dev/backup_vg/backup_home_lv’ [250.00 GiB] inherit
ACTIVE ‘/dev/pooh_vg/home’ [150.00 GiB] inherit
ACTIVE ‘/dev/pooh_vg/usr’ [50.00 GiB] inherit
piglet:~ # lvchange -ay /dev/backup_vg/backup_home_lv
piglet:~ # lvscan
ACTIVE ‘/dev/backup_vg/backup_home_lv’ [250.00 GiB] inherit
ACTIVE ‘/dev/pooh_vg/home’ [150.00 GiB] inherit
ACTIVE ‘/dev/pooh_vg/usr’ [50.00 GiB] inherit

Only then can I run the mount command.

These looked ok (I hope).

How do I look at the policykit stuff?

Have a read of this guide:

Chapter 9. PolicyKit

There is a Gnome GUI tool that can be used to check/configure policy settings.

Start the Authorizations tool either via the GNOME main menu by selecting More Applications+Tools+Authorizations or by pressing Alt+F2 and entering polkit-gnome-authorization.

In particular, the XML file /usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy contains a section that should look like this:

<action id="org.freedesktop.hal.storage.mount-removable">
    <description>Mount file systems from removable drives.</description>
    <message>System policy prevents mounting removable media</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

The ‘<allow active>’ (active console) part should be set to ‘yes’. It can be edited directly (with root privileges) if preferred.