external USB HDD canno't unmout

Bug #103790 reported by Chalumeau
This bug report is a duplicate of:  Bug #63090: do not eject all USB/Firewire devices. Edit Remove
24
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu 7.04 H5 AMD64

since maj 2007-04-04 or 2007-04-05
USB stick Mount and Unmout correctly, but USB HDD (Hitachi 40g USB2 or WD 120g USB2) Mount correctly,
but USER cann't umount, icone stop, warning "impossible d'éjecter le volume", and auto-re-mount with icone reapers.
until Unbuntu 6.10 all these USB device were OK

ROOT can umount by sudo umount /media/DIDIER120

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/hda1
UUID=b257e117-3c5a-4557-9642-9f5253c6f172 / ext3 defaults,errors=remount-ro 0 1
# /dev/hda3
UUID=e6a2edd7-cfb9-4493-ba10-81f77f3ac2ed /home ext3 defaults 0 2
# /dev/hda2
UUID=7fdbd251-029e-4a42-a1e4-1325ce09ad29 none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

MATB:
/dev/hda1 / ext3 rw,errors=remount-ro 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
/sys /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
devshm /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
lrm /lib/modules/2.6.20-13-generic/volatile tmpfs rw 0 0
/dev/hda3 /home ext3 rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/dev/sda1 /media/DIDIER120 vfat rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077 0 0

I do not now what package: gnome-manager-volume? gnome-mount? kernel?
I do not speak and write english, sorry

Revision history for this message
Ralph Janke (txwikinger) wrote :

It is normal that a user cannot unmount a drive. It needs sudo permission to that.

If you want to change that you need to set the suid flag of the umount executable (/bin/umount)

This in not a bug, but supposed to be like this. Is it ok to close this bug?

Revision history for this message
Chalumeau (died-dic) wrote :

This is not a bug, but under ubuntu 6.10 and 7.04 before update I can umount my EXTERNEL USB drive.

I think that : for user the external drive can be removed. (It was ok before update and umount after a writting work)

I can do a "sudo umount" but how can I explain to the windows's user that linux is better and simple?

Revision history for this message
9johnny (s.j.) wrote :
Download full text (3.7 KiB)

I'm not sure it can be closed, I am experiencing the same thing. Why should one have to be root to unmount an USB external hdd with HAL/dbus, and why should not being in the group plugdev suffice? I am not sure this is permissions related, as if I look at it right, my hdd gets unmounted, but it gets remounted right away, I here attach the output of syslog when I try to unmount the external hdd with hal. This disk has 3 partitions, two ext3 and one fat.

===snip===
Apr 8 00:53:56 minitux hald: unmounted /dev/sdb4 from '/media/disk-1' on behalf of uid 1000
Apr 8 00:53:56 minitux hald: unmounted /dev/sdb2 from '/media/disk' on behalf of uid 1000
Apr 8 00:53:56 minitux hald: unmounted /dev/sdb1 from '/media/BACKUP' on behalf of uid 1000
Apr 8 00:53:56 minitux NetworkManager: <debug info>^I[1175986436.713312] nm_hal_device_removed (): Device removed (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_ECB6_7B49').
Apr 8 00:53:56 minitux kernel: [43029.368000] SCSI device sdb: 78140160 512-byte hdwr sectors (40008 MB)
Apr 8 00:53:56 minitux NetworkManager: <debug info>^I[1175986436.715179] nm_hal_device_removed (): Device removed (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_2fa84716_fd9b_4d17_8e34_2b9062d949a5').
Apr 8 00:53:56 minitux NetworkManager: <debug info>^I[1175986436.716914] nm_hal_device_removed (): Device removed (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_317c98a0_421e_4f83_a7f5_3ca129023686').
Apr 8 00:53:56 minitux NetworkManager: <debug info>^I[1175986436.718397] nm_hal_device_removed (): Device removed (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_517f56cc_7d22_424c_a2c1_2b2bb3202ce6').
Apr 8 00:53:56 minitux kernel: [43029.380000] sdb: test WP failed, assume Write Enabled
Apr 8 00:53:56 minitux kernel: [43029.380000] sdb: assuming drive cache: write through
Apr 8 00:53:56 minitux kernel: [43029.380000] sdb: sdb1 sdb2 sdb3 sdb4
Apr 8 00:53:57 minitux NetworkManager: <debug info>^I[1175986437.083218] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_317c98a0_421e_4f83_a7f5_3ca129023686').
Apr 8 00:53:57 minitux NetworkManager: <debug info>^I[1175986437.307414] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_ECB6_7B49').
Apr 8 00:53:57 minitux NetworkManager: <debug info>^I[1175986437.364524] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_2fa84716_fd9b_4d17_8e34_2b9062d949a5').
Apr 8 00:53:57 minitux hald: mounted /dev/sdb1 on behalf of uid 1000
Apr 8 00:53:57 minitux NetworkManager: <debug info>^I[1175986437.492802] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_517f56cc_7d22_424c_a2c1_2b2bb3202ce6').
Apr 8 00:53:57 minitux kernel: [43030.172000] kjournald starting. Commit interval 5 seconds
Apr 8 00:53:57 minitux kernel: [43030.172000] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
Apr 8 00:53:57 minitux kernel: [43030.172000] EXT3 FS on sdb2, internal journal
Apr 8 00:53:57 minitux kernel: [43030.172000] EXT3-fs: mounted filesystem with ordered data mode.
Apr ...

Read more...

Revision history for this message
9johnny (s.j.) wrote :

I might also want to add that unmounting as root does not cause the drive's partitions to be remounted (" sudo umount /dev/sdb* " in this case), so this might be a hal/dbus issue?

Revision history for this message
Chalumeau (died-dic) wrote :
Revision history for this message
nilsja (nilsjansen) wrote :

imho this is definitely a (not little) bug.

The regular user is able to plug in an external hdd - so he should also be able to unplug it without loss of data. Why shouldn't he?

As written in the post Chalumeau linked, it is possible to "eject" the hdd from console without root permissions. I think nautilus should do this too.

Revision history for this message
Chalumeau (died-dic) wrote :

in /media 2 hidden files are created by hal (.hal-mtab & .hal-mtab-lock)
here is my .hal-mtab:

/dev/sdb1 1000 0 vfat noexec,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,exec /media/DIDIER120
/dev/sda1 1000 0 vfat noexec,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,exec /media/DIDIER40
/dev/sdc1 1000 0 vfat noexec,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,exec /media/DIEDSONY

/dev/sdb1 & /dev/sda1 are two external usb drive (40G & 120g) which can't be unpluged by nautilus but can be umount in console by sudo umount /media/DIDIER***

/dev/sdc1 is an external usb drive (sony microvault 5G) which can be unpluged by nautilus

9johnny (s.j.)
Changed in util-linux:
status: Needs Info → Confirmed
Revision history for this message
9johnny (s.j.) wrote :

Yes it is very strande, that external usb hhds can not be unmounted, but my Creative MuVO V100, which acts as an usb flash drive, can be ejected properly.

Revision history for this message
9johnny (s.j.) wrote :

Oh, yes, I didn't see the original bug was reportes as amd64 bug, I am using 32bit feisty, so it's a cross-platform bug, I guess
:D

Revision history for this message
Dale E. (rusty-bronco) wrote : Re: external USB HDD can't unmount

same problem here, it' the only bug in 7.04 beta that I'm having, this started when I turned off my usb hard drive without ejecting it first.

Revision history for this message
Jorge Castelao (jcastelao) wrote :

I have the same problem (Feisty, 32 bit).
My extenal USB hard disk drive doesn't unmount from nautilus, but it can be unmounted with:
  sudo umount /media/lacie
or with:
  eject /media/lacie (without sudo)

And USB flash drives work properly.

The significant lines of /var/log/syslog when trying to unmount from nautilus are:

Apr 12 21:54:10 zeus hald: unmounted /dev/sdd1 from '/media/lacie' on behalf of uid 1000
Apr 12 21:54:10 zeus kernel: [ 2922.102576] SCSI device sdd: 1172229408 512-byte hdwr sectors (600181 MB)
Apr 12 21:54:10 zeus kernel: [ 2922.104605] sdd: Write Protect is off
Apr 12 21:54:10 zeus kernel: [ 2922.104612] sdd: Mode Sense: 10 00 00 00
Apr 12 21:54:10 zeus kernel: [ 2922.104615] sdd: assuming drive cache: write through
Apr 12 21:54:10 zeus NetworkManager: <debug info>^I[1176407650.074592] nm_hal_device_removed (): Device removed (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_a8af3cec_b2e7_43c2_80af_2d86776a08c2').
Apr 12 21:54:10 zeus kernel: [ 2922.110570] sdd: sdd1
Apr 12 21:54:10 zeus NetworkManager: <debug info>^I[1176407650.592374] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_a8af3cec_b2e7_43c2_80af_2d86776a08c2').
Apr 12 21:54:10 zeus kernel: [ 2922.697434] kjournald starting. Commit interval 5 seconds
Apr 12 21:54:10 zeus kernel: [ 2922.697885] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
Apr 12 21:54:10 zeus kernel: [ 2922.699152] EXT3 FS on sdd1, internal journal
Apr 12 21:54:10 zeus kernel: [ 2922.699446] EXT3-fs: mounted filesystem with ordered data mode.
Apr 12 21:54:10 zeus hald: mounted /dev/sdd1 on behalf of uid 1000

So it seams clear that the disk is unmounted BUT it is remounted again.

The content of /media/.hal-mtab is:
/dev/sdd1 1000 0 ext3 noexec,nosuid,nodev /media/lacie
/dev/sde1 1000 0 vfat noexec,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,exec /media/disk

where /dev/sdb1 is the USB hard disk drive with this problem, and /dev/sde1 is a flash USB drive which is correctly unmounted from nautilus.

Waiting for help .....

Revision history for this message
afonic (afonic) wrote :

Hi,

I have the same problem here, Ubuntu Feisty Beta 32bit. Used to work fine until an update about 1 1/2 week ago.

Ralph Janke (txwikinger)
Changed in util-linux:
assignee: rjanke → nobody
Revision history for this message
nilsja (nilsjansen) wrote :

i'm also running 32bit and have this problem with feisty.

Revision history for this message
iGadget (igadget) wrote : confirmed

I also have this problem on 32bit Feisty. This bug seems to be a duplicate of

https://bugs.launchpad.net/ubuntu/+source/hal/+bug/99498 and
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/102514

Can someone with the required privileges mark this one and the others?
Maybe we should keep the discussion 'central' in the confirmed one, bug #99498, with the sidenote that having 2 or more partitions on the external drive doesn't seem to be relevant.

Revision history for this message
iGadget (igadget) wrote : possible workaround

A workaround can be found here:

https://bugs.launchpad.net/ubuntu/+source/hal/+bug/99538/comments/6

I haven't tried it yet, can somebody please confirm?

Revision history for this message
Dale E. (rusty-bronco) wrote :

igaget moved the file and i can unmount it through nautilus now

Revision history for this message
9johnny (s.j.) wrote :

I can confirm that if I remove the /usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi file, then unmounting works perfectly. Is this file that important, what are the devices that _need_ to be ejected and can this not be done more selectively, I mean, usb mass storage devices vary greatly, I'm sure there's some hal info that can be used to create a rule.

Revision history for this message
Jorge Castelao (jcastelao) wrote :

I also confirm that the workaround ponted out by iGadget works for me (Ubuntu Feisty 32 bit, USD hard disk drive LaCie)

Revision history for this message
Nuno Almeida (n-alm) wrote :

When I removed the /usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi file, it'd appear that the umount was sucessfully, but it was not.

At least on my external usb 320gb IOMEGA, the default behaviour is that the disk stops "humming" when ummounted, but in this case it continues (even though it appears "ummount" in Nautilus, is still mounted in the system somehow).

Only stops "humming" when I use the eject /dev/sda1 command.

This worked perfectly with Ubuntu Edgy, so it must have been a recent update.

Revision history for this message
Brice Terzaghi (terzag) wrote :

Same problem for me with Feisty (final) 32 bits : my USB external harddisk, when removed using the "eject" command from the context menu, is immediately mounted again and I have to turn it off to remove it.
All worked well with Dapper and Edgy (I haven't tested Feisty alphas or betas).

Revision history for this message
Olivier Guéry (nemolivier) wrote :

Not exactly here but near... Test with an external 250G disk with a small 20G Fat32 and a big 230G ext3
- Feisty 64 : the ext3 failed to mount (bad fs type. superbloc, etc). The fat 32 mount. When ejecting the fat32 (what else ?) with mouse the two trie to remount, same error as previous...
- Feisty 32 : the two mounts. Can't unmount... it remount each time !

Everything was right under Edgy... for me it's a bug !

Revision history for this message
Jonathan Michaels (jhmichaels) wrote :

The workaround noted above did not fix the problem for me. Having the problem on a 500gb usb drive.

In case there's any confusion as to whether this is a bug or a "feature", I assure you that that not being able to safely unmount a drive is a fairly serious bug.

This was not a problem until a few weeks ago, several upgrades into the Feisty beta.

Revision history for this message
Paco Avila (monkiki) wrote :

The workaround worked for me :)

Revision history for this message
huiii (a00ps) wrote :

hello,
i have the same problem.
eject device in right-click mouse does not work since feisty.
thats a pity, cause on this point it feels like windows xp, where its a hell to eject external devices.
sudo eject /media/XXX does not work properly, as nautilus still holds the disk and when clicking on disk-icon its online again. it does not completely disappear from system. but i must say, this bug, till now, never corrupted my data. its just annoying and uncomfortable.
the workaround mentioned before ( https://bugs.launchpad.net/ubuntu/+source/hal/+bug/99538/comments/6 )
does not work for me.
i'm sure it can be fixed, the question is how.

Revision history for this message
huiii (a00ps) wrote :

sorry, update to previous message: sudo eject /media/XXX works better than sudo umount /media/XXX because external HDD powers off correctly. umount does not.

Revision history for this message
Jonathan Michaels (jhmichaels) wrote :

I hope this offers a clue as to what's going on:

I have two external drives, one ejects properly, the other does not.

The smaller drive is set up as two EXT3 partitions, both under 100GB. This ejects without problem.
The larger drive is set up as a single 458 GB EXT3 partition. Viewing the System Monitor/File Systems I can see it briefly unmount after ejecting it then it immediatly remounts stating "cannot eject volume".

Revision history for this message
JPDune (jeanpierre-duneau) wrote :

Same bug with an usb stick (ubuntu feisty 32 bit 7.04), since the recent upgrade from Edgy . I use sudo "pumount /media/Mydrive" to overcome it.

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.