nautilus, media containing multiple partitions cannot be unmounted(with eject) (USB connected)

Bug #108643 reported by Duncan Lithgow
38
Affects Status Importance Assigned to Milestone
Nautilus
Unknown
High
eject (Ubuntu)
Invalid
Medium
Unassigned
Declined for Gutsy by Henrik Nilsen Omma

Bug Description

Binary package hint: nautilus

Ubuntu 7.04 (Feisty Fawn), Gnome/ Nautilus 2.18.1

I have an external USB2 ATA hard drive with two partitions, EXT2 and FAT32. They are seen and mounted when I insert the cable, an icon appears on the desktop for each and everything works fine while I'm working.

I cannot unmount the hard drive. If I use the right click context menu to 'eject' one of the partitions, it is momentarily unmounted (I think) and then the whole drive is mounted again, both partitions. I _can_ unmount on or other partition from the command line without trouble.

duncan@ubuntu:~$ sudo umount /media/FAT32
Password:
duncan@ubuntu:~$ sudo umount /media/EXT3
duncan@ubuntu:~$

This bug would probably cause a regular user to pull the USB plug without unmounting - potentially causing serious damage.

Changed in nautilus:
status: Unknown → Unconfirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. Looks like a gnome-mount bug

Changed in nautilus:
importance: Undecided → Medium
Revision history for this message
jfs (jfschmakeit) wrote :

I can confirm this.

I have here an external 80 gig Hard drive with 2 partitions: NTFS (mounted as read-only - haven't changed anything here) and FAT32.

Umounting from the command-line works fine, but I am not able to umount the harddrive using any of Gnome's tools (righ-click on the icon on the desktop -> eject, using the Disk Mounter taskbar-applet or right-click -> eject in nautilus).

As Duncan said, it seems like both partitions are umounted , but get re-mounted straight away.

The error message I am receiving says "Cannot eject volume." - followed by an empty error dialog box without any text.

Revision history for this message
Jean-Pierre Rupp (xenog) wrote : Unmount and then remount

The partitions do get unmounted, and then they are mounted again, or at least that's what daemon.log says.

I'll attach something out of that file when everything happens.

Revision history for this message
Florian Kollmannsberger (florian-kollmannsberger) wrote : Re: nautilus cannot unmount USB media containing multiple partitions

I can confirm this too.

My gnome-popup-message is:
There is data that needs to be written to the device SAMSING SP1604N before it can be removed. Please do not remove the media or disconnect the drive"

Followed by another popup:
"Cannot" eject volume"

I'm sure that there are no files to tranfer.

Revision history for this message
Mikko Saarinen (mikk0) wrote :

I have the same problem with a usb drive containing a vfat volume and an ext3 volume.
The text "Cannot eject volume" appears soon after I've selected eject from the context menu. Then both volumes are remounted. It doesn't matter which volume I select to eject.

The volumes can be unmounted from terminal if I use "sudo umount /media/LINUXBACKUP" or "sudo umount /media/WINBACKUP", but is the data flushed in this case?

This problem did not exist with Dapper.

Revision history for this message
Mikko Saarinen (mikk0) wrote :

Oops... did I say the problem didn't exist with Dapper? I meant with Edgy (6.10)...

Revision history for this message
mlavikai (marko-lavikainen-netkoti) wrote :

I can confirm that same happens with my external Lacie 250GB HDD with only single FAT-partition in Feisty. I cannot unmount throgh Gnome. Partition just keeps remounting itself back.

However, using 'sudo umount' works just fine. Other USB memory stick etc. has no problems with unmounting.

With Dapper I had no problems.

Revision history for this message
zier (shawnzier) wrote :

I can confirm this problem. I have a lacie external hard drive with a few partitions. It has an apple partition map and boot sector on it along with some ext partitions (one for gentoo and one for file storage)

The problem looks like a permissions problem that happens when the drive automounts. The folder that the ext partitions mount to, "/media/disk" has root as the owner. If I plug in a regular vfat usb stick it mounts with the correct permissions (User is owner) and it can be unmounted/ejected with no problems. It can easily be corrected with a chown on the directory, but who really wants to do that?

Revision history for this message
Thomas Schiex (thomas-schiex) wrote :

I confirm this too on a Feisty Fawn. But it does not seem related to multi-partition not to owneership problems.

My USB hard drive with a single ext3 partition is mounted automatically but then it cannot be ejected without being immediately remounted. Owner of the corresponding directory in /media is effectively root.root. But changing it by hand does not correct the bug. The volume still autoremounts immediately after eject (saying it cannot be ejected). Worked fine under Dapper and Edgy.

Revision history for this message
Ahmet Öztürk (dmxe) wrote :

same situation here with a 128 MB memory stick which i connect to feisty through my digital camera. the memory stick has only a single fat16 partition formatted by the camera itself, so i agree that this is not related to the multiple partitions. it also shouldn't be related to permissions, because my flash disk works perfectly with same permission set.

i can also confirm that it used to work on dapper painlessly though not on edgy.
i tried it on two different computers, one desktop and one laptop, and no difference at all.

Revision history for this message
Duncan Lithgow (duncan-lithgow) wrote : Re: nautilus, media containing multiple partitions cannot be unmounted (USB connected)

This bug is for USB media with _Multiple Partitions_ NOT single partitions. If you have USB problems with media which has only one partition then this is the wrong place for your bug report. Thanks.

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

Same here.

I have an external usb disk with three partitions in it, NTFS, VFAT, EXT3.

Changed in gnome-mount:
status: Unconfirmed → Confirmed
Revision history for this message
Cosmin Saveanu (csaveanu) wrote :

Same problem for me. I have an external USB drive with a fat and a hfsplus partition. In addition, the hfsplus partition is mounted read-only (I'll look if this bug was already reported).

Revision history for this message
Cosmin Saveanu (csaveanu) wrote :

After 4 hours of laborious search I finally found why the hfsplus partition was mounted read-only. Due to the bug we discuss here, unmounting does create problems on the hfsplus partition which becomes readable only on the next mount. Manual unmounting does not help either.

Under these conditions, I needed to install fsck.hfsplus, repair the partition and mount it, and have to do it on every occasion I'm using the disk. This is a major annoyance and I think that the bug importance might be increased. Thanks.

Revision history for this message
Simon Ruggier (simon80) wrote : Re: [Bug 108643] Re: nautilus, media containing multiple partitions cannot be unmounted (USB connected)

Cosmin: you can work around it by disabling automatic mounting of
removable devices.

Revision history for this message
Sergio Zanchetta (primes2h) wrote : Re: nautilus, media containing multiple partitions cannot be unmounted (USB connected)

I'm quite sure this is the same bug as Bug #36252 and Bug #111541.

It should be a EJECT command problem (both launched in terminal and via Nautilus)
UMOUNT command works fine.

Check out my comments on Bug #36252 https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/36252/comments/26

and Bug #111541 https://bugs.launchpad.net/ubuntu/+source/eject/+bug/111541/comments/12

Revision history for this message
VLK (valentyn) wrote :

Same trouble here on my both PCs!

Using Feisty + External USB Drive (FAT32 formated)

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

As I wrote here on Bug #36252, installing hal version 0.5.9-1ubuntu2~feisty1 from backports everything works fine.
It changed eject command in nautilus with umount.
It fixed both bugs, so I guess bug is one in fact and it's related to nautilus "eject" problem.

Revision history for this message
Mikko Saarinen (mikk0) wrote :

I can confirm what Sergio wrote here.

I have two computers and the other one is affected by this bug, but the other one is not! From the working machine I can unmount either one of the volumes in the external drive (the other volume is not automatically unmounted too - the way this used to work in earlier versions - but have to be unmounted by hand before I can detach the drive). In the other machine I get the message saying "Cannot eject volume".

The only difference I found (besides different hardware) is that the non-working machine has hal version 0.5.8.1-4ubuntu12 and the working one has hal 0.5.9-1ubuntu2-feisty1.
When I have updated my other machine too, I'll let you know if it starts working.

Revision history for this message
Mikko Saarinen (mikk0) wrote :

I can confirm that things start working again with the latest hal from backports =)
Thank you Sergio for pointing out the solution =)

Maybe the package should be offered as an official update instead of just backport?

Revision history for this message
Michele (mikelito) wrote :

I confirm both the problem and that the update to 0.5.9 solves it. Thanks.

This should make its way into the "official" repos.

Revision history for this message
Duncan Lithgow (duncan-lithgow) wrote :

Since hal has the solution I'm reassigning this to them

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

Are you sure it's correct to reassign this bug to hal?
The bug is on "eject" packet, not into "hal" packet...
Updating hal is just a workaround since updated hal uses umount instead of eject.

Revision history for this message
Duncan Lithgow (duncan-lithgow) wrote :

Sergio, it sounds like you understand it more than I do. Which package do you think is closest to the cause of this error?

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

1. hal from backports changed the way nautilus disconnect external mass-storage devices.
In fact, it uses "umount" instead of "eject" in nautilus right-click menu.

This is the main reason why now it works!

So, "eject" packet is the problem.
You can test it, just open a terminal and try to disconnect an external usb hd with eject command (eject /media/etc...), even if you have hal from backports installed.
It gives you an error.

Revision history for this message
Michele (mikelito) wrote :

even if the discussion about this bug is getting somewhat phylosophical, and after all the important thing is that the updated HAL
makes its way to all the people experiencing this bug, as it effectively solves it, IMHO an external USB storage device _cannot_ be ejected,
so there are two issues: 0.5.8 is wrong in issueing an eject command (moreover, when two partitions are present, one could wish
to umount just one rather than ejecting the device), and the eject command should behave more meaningfully when issued upon a device
with two partitions on it, or on a "non-ejectable" device.
that said, i leave to you more experienced guys the decision about to whom bug report belongs better.

Revision history for this message
AlwaysLearning (always-learning) wrote :

I can confirm that this is still a problem in Feisty.

Using a CoolerMaster USB-SATA device with ntfs, vfat and ntfs partitions (yes, two ntfs) I'm given only an "Eject" option in Nautilus/Desktop (no "Unmount Volume" option like I get for network shares). Selecting the Eject option unmounts all three partitions, gives a "Cannot eject volume" error and then remounts all three partitions a second or so later. If the "Disk Mounter" applet is running an empty error dialog also pops up.

For me "sudo unmount /media/sdg?" and "sudo eject /media/PartitionName" will both unmount the device so that it can be unplugged safely (albeit hacking through Terminal *and* requiring a sudo privelege), so I'm kinda in agreeance here with Sergio that the Eject command needs to be fixed in hal.

Although I can't think of any reason why it would benefit me, personally, there probably is a case for having an "Unmount Volume" command for each partition of multi-partition devices so that they can be unmounted individually. Avoiding accidental writes to the wrong partition is probably a good reason.

I have to disagree with Mikele, though, where he says that USB storage devices _cannot_ be ejected. There are plenty of USB devices that can and do have a real eject function. Syquest-like devices on a USB-SCSI/IDE bridge accept and act on Eject commands, spinning down the cartridge and disengaging it for manual completion. Plus Zip and Jazz drives, and Sony electronic-eject floppy drives, CD/DVD's, etc. There's bound to be a few DLT's around as well. Having a working Eject command would be a requirement for those devices.

Revision history for this message
Michele (mikelito) wrote :

Uhm... my poit was rather that "not all" USB devices (actually quite a few) have a phyisically meaningful "eject" function, so that in principle Nautilus (or hal or whatever) should display -and issue- an eject command only on devices which are "eject capable". I understand the point for displaying "eject" instead of "unmount", as probably newbies have no clue about what mounting/unmounting means, and that probably this is again an issue of finding a balance between user friendliness and UI dumbification. but unless we are capable of detecting if a device can be ejected, I think that umount is the right guy to call "behind the scenes". Anyway, install the backported package to have everything working form the GUI.

Revision history for this message
Giampiero Salvi (giampi-kth) wrote :

Hi there,
I have the opposite problem, I don't know if my problem is already mentioned in another bug report:

if I run 'eject' from the command line, the volume is correctly ejected. If I right click on it and choose Eject, I get a "Cannot eject volume" window, and a new Nautilus window with the content of the volume pops up. This is not dependent on the kind and number of partitions as far as I can tell.

I am running Feisty Fawn, with:
hal 0.5.8.1-4ubuntu12
gnome-mount 0.5-2ubuntu8
nautilus 1:2.18.1-9ubuntu1
eject 2.1.4-2.1ubuntu2

Giampiero

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Hi, could someone please confirm this problem on Hardy (the alpha 2 CD out in a few days would be good). If still an issue, please nominate a Hardy release target. Thanks!

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

With Hardy daily build cd (yesterday) partitions can be unmounted separately.
I tried with an external hard disk via usb with multiple partitions(ext3, ntfs, fat32) and umount works!

I think this happens because "eject" has been replaced with "umnount" in nautilus, not because eject problem has been fixed!

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

No problem in Gutsy too because it uses unmount in Nautilus instead of eject.

This problem is still in Feisty, that uses eject.

Changed in nautilus:
status: New → Invalid
Revision history for this message
Przemek K. (azrael) wrote :

Feisty is EOL now. If you experience a similar problem in one of the currently supported Ubuntu releases then please open a new bug.

Changed in eject (Ubuntu):
status: Confirmed → Invalid
Changed in nautilus:
importance: Unknown → High
status: Invalid → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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