external Seagate FreeAgent disk doesn't auto mount

Bug #126825 reported by Alec Faithfull
12
Affects Status Importance Assigned to Milestone
gnome-volume-manager (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: gnome-volume-manager

After reformatting a recently-purchased Seagate FreeAgent 320GB external disk to ext3 (it was supplied as a pre-formatted NTFS drive), it doesn't automatically mount when plugged in. It's auto-mounted if the disk is present when the computer is restarted, but unmounting and unplugging the disk in this condition leads to the same problem. It works as expected when mounted manually, and it auto-mounted without issues prior to being reformatted. The disk is connected via USB 2.0, I'm using an up-to-date installation of Feisty Fawn, and "gnome-volume-manager --version" reports "gnome-volume-manager version 2.17.0".

Starting gnome-volume-manager in a terminal gives the following output when the disk is plugged in:

manager.c/3302: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2536: Device added: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8
manager.c/3302: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2536: Device added: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_if0
manager.c/3302: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2536: Device added: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_usbraw
manager.c/3302: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2536: Device added: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_if0_scsi_host
manager.c/3302: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2536: Device added: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_if0_scsi_host_scsi_device_lun0
manager.c/3302: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2536: Device added: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_if0_scsi_host_scsi_device_lun0_scsi_generic

... and the following output when it's unplugged:

manager.c/2620: Device removed: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_if0_scsi_host_scsi_device_lun0_scsi_generic
manager.c/2620: Device removed: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_if0_scsi_host_scsi_device_lun0
manager.c/2620: Device removed: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_if0_scsi_host
manager.c/2620: Device removed: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_usbraw
manager.c/2620: Device removed: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8_if0
manager.c/2620: Device removed: /org/freedesktop/Hal/devices/usb_device_bc2_3000_____________9QF383V8

... but no attempt to mount the drive is made, and no corresponding "volume" entry appears in the hal-device-manager tree.

Revision history for this message
Alec Faithfull (alec-faithfull) wrote :

Sorry; here's the rest of the information suggested by https://wiki.ubuntu.com/DebuggingRemovableDevices:

"id" gives "uid=1000(alec) gid=1000(alec) groups=4(adm),20(dialout),21(fax),24(cdrom),25(floppy),26(tape),29(audio),30(dip),46(plugdev),109(lpadmin),111(scanner),114(admin),115(kqemu),117(fuse),1000(alec),1002(webdudes)"

"id haldaemon" gives "uid=106(haldaemon) gid=110(haldaemon) groups=110(haldaemon),24(cdrom),25(floppy),46(plugdev),121(powerdev)"

"uname -a" gives "Linux PICTIONARY 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux"

Revision history for this message
Alec Faithfull (alec-faithfull) wrote :
Revision history for this message
Alec Faithfull (alec-faithfull) wrote :
Revision history for this message
Alec Faithfull (alec-faithfull) wrote :
Revision history for this message
Oxenfrogga (tlatlik) wrote :

Hi folks,

I can confirm that behaviour for todays gutsy. I can add some information:

output of fdisk -l:
*****************
oxi:~ > fdisk -l

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf990f609

   Device Boot Start End Blocks Id System
/dev/sdb1 1 2550 20482843+ b W95 FAT32
/dev/sdb2 2551 20397 143356027+ 83 Linux
/dev/sdb3 20398 38913 148729770 83 Linux

*****************
sdb1: fat32
sdb2: luks + ext3
sdb3: ext3

* I experience this behaviour since I encrypted the 2nd partition two days ago. A fully encrypted HD was mounted without any problems -- but I tried that last week last time. My USB pendrive works without problems (fat32).

* all my drives are mounted correctly if I restart hal with the drive plugged in:
************
sudo /etc/init.d/hal restart
************

* pmount does it wirhout problems, too.

I'll attach -- like Alec -- the output of what was asked for in https://wiki.ubuntu.com/DebuggingRemovableDevices.

************
oxi:~ > id
uid=1000(harald) gid=1000(harald) Gruppen=4(adm),7(lp),20(dialout),21(fax),24(cdrom),25(floppy),26(tape),29(audio),30(dip),44(video),46(plugdev),100(users),107(lpadmin),108(scanner),109(admin),122(fuse),125(dhcpd),1000(harald),1002(sambauser)
oxi:~ >
************

************
oxi:~ > id hal
id: hal: No such user
oxi:~ >
************

************
oxi:~ > id haldaemon
uid=121(haldaemon) gid=121(haldaemon) groups=121(haldaemon),24(cdrom),25(floppy),46(plugdev),127(powerdev)
oxi:~ >
************

************
oxi:~ > uname -a
Linux oxi 2.6.22-14-386 #1 Wed Oct 10 05:26:36 GMT 2007 i686 GNU/Linux
oxi:~ >
************

Revision history for this message
Oxenfrogga (tlatlik) wrote :
Revision history for this message
Oxenfrogga (tlatlik) wrote :
Revision history for this message
Oxenfrogga (tlatlik) wrote :
Revision history for this message
Oxenfrogga (tlatlik) wrote :
Revision history for this message
unggnu (unggnu) wrote : Re: externale Seagate Freeagent disk doesn't auto-mount

I have the same problem with Feisty and Gutsy. Automount works fine on the first time Freeagent is connected but after unmount it doesn't remounts again automatically. Even after auto shutdown through USB unplug.
A possible way to get the drive automount again is to remove power for some seconds of the hard disk and then plug it again.

Revision history for this message
unggnu (unggnu) wrote :

It really doesn't seem to be a Seagate issue since it happens with my other hard disks too but they have a power button so that the behavior is the same like removing the power which works fine.

Revision history for this message
unggnu (unggnu) wrote :

I have made some tests. There seem to be two problems. One is a Kernel/Hal problem and the other a Gnome-Vfs but the first one isn't so important if the second one gets fixed.
If I unmount a Seagate Freeagent disk under Gnome it works fine but it has no power button.
1. Freeagent Controller shuts down the hard disk after a short period and it is shut down completely if I remove USB connection but if I connect the USB cable again hard disk starts but it doesn't get mounted. It is recognized and can be mounted manually but not automatically. This happens under Gnome and KDE.
2. But KDE/Kubuntu hasn't this problem since it unmounts the volume but doesn't remove the desktop hard disk icon. So I can mount the hard disk again without removing USB cable and since Seagate has an own controller which shut down and restart hard disk it works fine and I guess that was the plan. It is kind of uncomfortable to always remove the cable or restart system to get access to the hard disk.
So I can just click on my hard disk icon on the Desktop in KDE hard disk powers up and gets mounted which is great. The mount status of a disk is shown with a green arrow on the side of the icon.
Btw. this happens for all hard disks but KDE is in Gutsy still able to remove USB sticks so the led runs out. (unmount for harddisks and eject for usb sticks, makes sense)

Revision history for this message
unggnu (unggnu) wrote :

A possible workaround could be an fstab entry with the UUID of the Freeagent partition. You can get the UUID with 'sudo vol_id /dev/sdX1' .

/etc/fstab entry:
UUID=LONG_NUMBER /media/MOUNTPOINT FILESYSTEM user,defaults 0 0

The user-Option is needed to be able to mount the Freeagent hard disk without root permissions.
If you don't want to use the Terminal every time you can write a little Script which un/mounts the hard disk and add this to your Panel or desktop.

#!/bin/bash
if `mount | grep -q /media/MOUNTPOINT`
then
        umount /media/MOUNTPOINT
else
        mount /media/MOUNTPOINT
fi

Revision history for this message
unggnu (unggnu) wrote :

Maybe this thread could help: http://ubuntuforums.org/showthread.php?t=494673.
Btw. the Freeagent only wake up for me after starting my script several times. Another workaround would be to poll the UUID with hdparm -I several times before running the mount command.

Revision history for this message
Czikus (czikus) wrote :

Another workaround, which allows to automount the HDD and make it appear in media managers like the one in KDE. It seems that the main problem with the drive is caused by the fact that the "storage" and "volume" devices do not appear in HAL when the disk is remounted without disconnecting the power. So, the workaround is to add the devices manually using hal-device --add. The best solution is to first mount the disk "properly" for the first time after reconnecting the power and look into the output of hal-device for "/org/freedesktop/Hal/devices/volume_uuid_<here_uuid_of_the_volume>" and its parent e.g. "/org/freedesktop/Hal/devices/storage_serial_Seagate_FreeAgentDesktop_6QG220EL_0_0". Copy the parameter list into files e.g. volume.txt and storage.txt and then, when the device is reconnected, use:
cat storage.txt | hal-device --add "/org/freedesktop/Hal/devices/storage_serial_Seagate_FreeAgentDesktop_6QG220EL_0_0"
cat volume.txt | hal-device --add "/org/freedesktop/Hal/devices/volume_uuid_<here_uuid_of_the_volume>"
This will make the drive appear in the media managers.

I wrote a script, which is run by udev and does that automatically. In udev rules I added a file "99-usb-hd-fix.rules" (most of the Freeagent users have that file anyway to solve the spin-down problem), which contains:
BUS=="scsi", ATTRS{vendor}=="Seagate*", ATTRS{model}=="FreeAgent*", PROGRAM="vol_id --uuid %N", RUN+="/bin/usbhdfix %k %P"

Then, I created a script /bin/usbhdfix (attached), which solves the spin-down problem as suggested in several places, and then creates the hal devices. As I said, the property list is copied from hal-device, it just needs to be checked that the property volume.is_mounted = false, otherwise the mount managers will think that the disk is already mounted and will not try to mount it themselves.

Hope this helps someone.

Revision history for this message
Luca (sciamano) wrote :

I've tried the workaround unggnu suggested at comment #13 (https://bugs.launchpad.net/ubuntu/+source/gnome-volume-manager/+bug/126825/comments/13)

but when I launch the suggested script I receive this error:

fuse: failed to open /dev/fuse: Permission denied
FUSE mount point creation failed
Unmounting /dev/sdd1 (FreeAgent Drive)

any suggestions? Thanks!

Revision history for this message
Fabián Rodríguez (magicfab) wrote :

Issues described are a result of this drive going to auto-sleep.

Changing duplicate marking to Bug #193154.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.