Nautilus and hal can't umount usb hd disk

Bug #99498 reported by Alfredo Matas
This bug report is a duplicate of:  Bug #63090: do not eject all USB/Firewire devices. Edit Remove
20
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I can't umount an external usb hd-disk of 160Gb with two partitions. The system mounts fine this partitions, but when I select "eject" option in the menu of "computer" of nautilus, the system umount and mount again the two partitions instantly and get the message "Unable to eject media". A few days ago this didn't happened.

Here is a syslog dump:

Mar 31 19:07:38 kornston hald: unmounted /dev/sdb5 from '/media/hd_externo' on behalf of uid 1000
Mar 31 19:07:38 kornston hald: unmounted /dev/sdb1 from '/media/cajita' on behalf of uid 1000
Mar 31 19:07:38 kornston NetworkManager: <debug info>^I[1175360858.592402] nm_hal_device_removed (): Device removed (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_444C_DE1E').
Mar 31 19:07:38 kornston NetworkManager: <debug info>^I[1175360858.618578] nm_hal_device_removed (): Device removed (hal udi is '/org/freedesktop/Hal/devices/volume_part2_size_1024_0').
Mar 31 19:07:38 kornston NetworkManager: <debug info>^I[1175360858.674968] nm_hal_device_removed (): Device removed (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_464432c0_4d48_45f7_b81b_eef1ce2b0fe2').
Mar 31 19:07:38 kornston kernel: [ 1424.368000] SCSI device sdb: 312581809 512-byte hdwr sectors (160042 MB)
Mar 31 19:07:38 kornston kernel: [ 1424.372000] sdb: Write Protect is off
Mar 31 19:07:38 kornston kernel: [ 1424.372000] sdb: Mode Sense: 03 00 00 00
Mar 31 19:07:38 kornston kernel: [ 1424.372000] sdb: assuming drive cache: write through
Mar 31 19:07:38 kornston kernel: [ 1424.372000] sdb: sdb1 sdb2 < sdb5 >
Mar 31 19:07:39 kornston NetworkManager: <debug info>^I[1175360859.115830] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_444C_DE1E').
Mar 31 19:07:39 kornston NetworkManager: <debug info>^I[1175360859.163512] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/volume_part2_size_1024_0').
Mar 31 19:07:39 kornston NetworkManager: <debug info>^I[1175360859.363913] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_464432c0_4d48_45f7_b81b_eef1ce2b0fe2').
Mar 31 19:07:39 kornston hald: mounted /dev/sdb1 on behalf of uid 1000
Mar 31 19:07:39 kornston kernel: [ 1425.572000] kjournald starting. Commit interval 5 seconds
Mar 31 19:07:39 kornston kernel: [ 1425.572000] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
Mar 31 19:07:39 kornston hald: mounted /dev/sdb5 on behalf of uid 1000
Mar 31 19:07:39 kornston kernel: [ 1425.576000] EXT3 FS on sdb5, internal journal
Mar 31 19:07:39 kornston kernel: [ 1425.576000] EXT3-fs: mounted filesystem with ordered data mode.

Thanks

ProblemType: Bug
Architecture: i386
Date: Sat Mar 31 19:00:32 2007
DistroRelease: Ubuntu 7.04
Uname: Linux kornston 2.6.20-13-generic #2 SMP Sun Mar 25 00:21:25 UTC 2007 i686 GNU/Linux

Alfredo Matas (amatas)
description: updated
description: updated
Alfredo Matas (amatas)
description: updated
Revision history for this message
Alex Murray (alexmurray) wrote :

This is a regression due to the addition of 10-storage-policy.fdi, and more specifically the requires_eject policy for usb devices. IMO this is incorrect and should be removed.

Revision history for this message
Alex Murray (alexmurray) wrote :

This is also affecting a number of other users:

http://ubuntuforums.org/showthread.php?t=398262
http://ubuntuforums.org/showthread.php?t=398704

Can the requires_eject policy for all usb storage devices please be changed to false, as in general unmounting is a more desirable feature - especially since unlike a cdrom, the device itself is not physically ejected by the computer, and still remains electrically connected. If some usb devices specifically require ejection custom rules should perhaps be created for them, but to make ALL usb storage devices use eject is wrong IMO.

The original problem occurred when 10-storage-policy.fdi was incorporated in the lastest hal release, which was done to fix bug #97366, but I think a better fix would simply to be to add a specific rule in hal for ipod's as requires_eject (a similar thing was suggested for the nokia n770 in https://launchpad.net/ubuntu/+source/hal/+bug/24399 - also includes an example fdi file for how to match the device - but it was rejected, even though it looks like the right way to try and fix these bugs), and then to change the desktop notification to say "eject or unmount" rather than simply eject, so that we do not confuse users.

Revision history for this message
Matthias Urlichs (smurf) wrote :

The device may not be physically ejected, but it's told to do so. This may change the state of the device's display from "don't disconnect me" to "OK to disconnect", flush internal buffers et al.

Look at any iPod for confirmation.

Conclusion: We do need a "real" eject. We might want to rename it to "eject or disconnect" so as to not confuse users, and we may need to fix an immediate-remount bug if a device misbehaves. But reverting this is IMHO not an option.

Data point: All the USB sticks, iPods, cameras and memory stick readers I possess (about 20 of them, all together, I might add) behave correctly.

Changed in hal:
importance: Undecided → High
status: Unconfirmed → Confirmed
Revision history for this message
unggnu (unggnu) wrote :

I have the same problem with a usb harddisk which contains two partitions. The only solution is to unmount both partitions in console or just plug off USB which isn't a good idea. Could this please be fixed until Feisty release? I think it is not a rare case that usb devices have two or more partitions.
I am using Ubuntu Feisty with latest updates.

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

I think too that this bug should/must been solved for feisty (i think that it's critical). I (400Go, 2x250Go, and 300Go in a Dvico M5000A box player) and other friends of mine use external DD with many partitions (often vfat and ntfs now we have ntfs writing with feisty). Using multiple partition on external DD ensure that we don't loose all datas.

Revision history for this message
freefal67 (freefal67) wrote :

Same issue here with Feisty using LaCie F.A. Porsche USB HD. It only has one XFS partition on it and yet I see the same errors described above. The only way to unumout is to run "sudo umount" on the partition. Running the command as a normal user gives "umount: /media/disk is not in the fstab (and you are not root)". Using the graphical interface to eject gives the error followed by instant remount described above.

Revision history for this message
sparc128 (marcelino-mata) wrote :

I am having the same problem with 80Gb HD with FAT32 and EXT3 partitions under Feisty 2.6.20-15. Same operation on same computer works fine under Edgy with 2.6.17-11. This is serious regression which will dumb found new users. sudo umount works fine but not user friendly.

Revision history for this message
sparc128 (marcelino-mata) wrote :

I can confirm that this can be fixed by applying workaround suggested in https://bugs.launchpad.net/ubuntu/+bug/99538...

which is :

Can you guys please temporarily move away
/usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi, then reboot
and check if it works then? If so, then bug 63090 would be the root
cause.

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

Is someone have tried to understand the problem with hal ?

Unmount seem's to works fine. The problem seems to be that hal, just after unmounting USB DD, detect the DD USB and so remount it.
Is it right ?

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

For informations i'v tried this to see if i can reproduce the bug on root account.
added password for root
allow him to login under gdm
open root gnome session.
Plug an external USB DD
Eject it by right click-> bug occur ! but not with "umount /dev/sda1" comand.

So i think that there is a possible work around to find in gnome-mount package...

Revision history for this message
Jarek Zgoda (jzgoda) wrote :

I can confirm this is present in final 7.04 - just cann't unmount my USB HDD.

Revision history for this message
racoon97 (racoon97) wrote :

I have the same problem with an usb key with two fat32 partitions. I get a window with "Unable to umount the volume" I confirm this bug persist in Feisty final release, could you fix this as soon as possible please because it is very annoyant. :(

/dev/sda1 on /media/_home type ext3 (rw,noexec,nosuid,nodev)
/dev/sda5 on /media/disk type ext3 (rw,noexec,nosuid,nodev)

I have to do sudo eject /media/_home to umount them correctly

Revision history for this message
hardyn (arlenn) wrote :

Same problem with my USB camera, and one of my USB hard disks.

My SATA external USB drive will eject properly.
My IDE external USB drive exhibits the above symptoms.

suggesting it has something to do with the response given by the IDE->USB interface; although it seems to be with ALOT of devices.

and as stated above, a CLI umount is not really acceptable.

Revision history for this message
Marco Boneff (neffscape) wrote :

I have a similar problem in gutsy. When I try to unmount my Belkon USB Memory Stick (1GB, fat16) or my cell phone memory card (SD m2 micro 4GB) nautilus gives me this error:
<img src="http://marco.boneff.ch/downloads/erroreusb.png">

This error came up after the upgrade from feisty, before everything were perfect, I wonder why there has been this regression.
I really don't know what to do this problem is really critical for my daily work, please fix it as soon as possible!

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

Other bug subscribers

Bug attachments

Remote bug watches

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