"Safely Remove" USB drive works great, but is remounted immediately

Bug #748151 reported by karoly.vegh
48
This bug affects 11 people
Affects Status Importance Assigned to Milestone
udev
Confirmed
Undecided
Unassigned
udev (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: unity

Ubunty Natty, update of today (02.04.2011)

Right clicking (either on the desktop or in the on the sidebar) an automounted USB disk's partition and choosing "Safely Remove" umounts and removes all the partitionsicons of the drives, but within seconds they reappear remounted again. "Safely Remove" again, in 4-5 seconds they are back.
I'm not sure if this is a bug or a feature. I tried disabling in Nautilus the "browse inserted media" feature, but that didn't help.

kvegh@lv:~$ apt-cache policy unity
unity:
  Installed: 3.8.2-0ubuntu1
  Candidate: 3.8.2-0ubuntu1
  Version table:
 *** 3.8.2-0ubuntu1 0
        500 http://li.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status
kvegh@lv:~$
kvegh@lv:~$ lsb_release -d
Description: Ubuntu Natty (development branch)
kvegh@lv:~$

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: unity 3.8.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
Uname: Linux 2.6.38-7-generic i686
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,decor,mousepoll,vpswitch,regex,animation,snap,expo,move,compiztoolbox,place,grid,imgpng,gnomecompat,wall,ezoom,workarounds,staticswitcher,resize,fade,unitymtgrabhandles,scale,session,unityshell]
Date: Sat Apr 2 12:03:46 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110330)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
karoly.vegh (karoly-vegh) wrote :
Revision history for this message
Marco Biscaro (marcobiscaro2112) wrote :

I can't reproduce this behaviour here. If I right click the device icon and choose 'Safely remove' it is unmounted and remains this way (untill I remove it and plug it again). Could you test with others USB devices or provide a video of the problem?

Changed in unity (Ubuntu):
status: New → Incomplete
Revision history for this message
karoly.vegh (karoly-vegh) wrote :
Download full text (3.3 KiB)

Tested it now with my smarthone as a disk drive and an usb stick too - wasn't able to reproduce it either.
Seems like it is the external usb hdd the only thing to behave this way, it is a Western Digital "My Passport" drive, FWIW.

If it is the disk itself behaving incorrectly, then sorry for having wasted your time. I upload the video anyway.

[...]

I have had a look at dmesg before and after the "safely remove" action:

This is how it has been automounted after being plugged:

[11589.657577] usb 2-1.1: USB disconnect, address 16
[11595.790837] usb 2-1.1: new high speed USB device using ehci_hcd and address 17
[11596.532849] scsi18 : usb-storage 2-1.1:1.0
[11597.529850] scsi 18:0:0:0: Direct-Access WD My Passport 0730 1015 PQ: 0 ANSI: 6
[11597.530710] scsi 18:0:0:1: Enclosure WD SES Device 1015 PQ: 0 ANSI: 6
[11597.531795] sd 18:0:0:0: Attached scsi generic sg2 type 0
[11597.532129] ses 18:0:0:1: Attached Enclosure device
[11597.532403] ses 18:0:0:1: Attached scsi generic sg3 type 13
[11601.976202] sd 18:0:0:0: [sdb] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
[11601.977162] sd 18:0:0:0: [sdb] Write Protect is off
[11601.977168] sd 18:0:0:0: [sdb] Mode Sense: 47 00 10 08
[11601.978908] sd 18:0:0:0: [sdb] No Caching mode page present
[11601.978913] sd 18:0:0:0: [sdb] Assuming drive cache: write through
[11601.983144] sd 18:0:0:0: [sdb] No Caching mode page present
[11601.983151] sd 18:0:0:0: [sdb] Assuming drive cache: write through
[11601.992038] sdb: sdb1 sdb2 sdb3
[11601.996446] sd 18:0:0:0: [sdb] No Caching mode page present
[11601.996453] sd 18:0:0:0: [sdb] Assuming drive cache: write through
[11601.996458] sd 18:0:0:0: [sdb] Attached SCSI disk
[11602.868941] EXT4-fs (sdb3): mounted filesystem with ordered data mode. Opts: (null)

here the safely remove happens, and then:

[11657.404803] usb 2-1.1: USB disconnect, address 17
[11663.194671] usb 2-1.1: new high speed USB device using ehci_hcd and address 18
[11663.936516] scsi19 : usb-storage 2-1.1:1.0
[11664.933664] scsi 19:0:0:0: Direct-Access WD My Passport 0730 1015 PQ: 0 ANSI: 6
[11664.934512] scsi 19:0:0:1: Enclosure WD SES Device 1015 PQ: 0 ANSI: 6
[11664.935370] sd 19:0:0:0: Attached scsi generic sg2 type 0
[11664.935600] ses 19:0:0:1: Attached Enclosure device
[11664.935756] ses 19:0:0:1: Attached scsi generic sg3 type 13
[11669.384341] sd 19:0:0:0: [sdb] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
[11669.385351] sd 19:0:0:0: [sdb] Write Protect is off
[11669.385358] sd 19:0:0:0: [sdb] Mode Sense: 47 00 10 08
[11669.386947] sd 19:0:0:0: [sdb] No Caching mode page present
[11669.386952] sd 19:0:0:0: [sdb] Assuming drive cache: write through
[11669.390675] sd 19:0:0:0: [sdb] No Caching mode page present
[11669.390682] sd 19:0:0:0: [sdb] Assuming drive cache: write through
[11669.400333] sdb: sdb1 sdb2 sdb3
[11669.405671] sd 19:0:0:0: [sdb] No Caching mode page present
[11669.405678] sd 19:0:0:0: [sdb] Assuming drive cache: write through
[11669.405685] sd 19:0:0:0: [sdb] Attached SCSI disk
[11670.254827] EXT4-fs (sdb3): mounted filesystem with ordered data mode. Opts: (null)

as far as I see it g...

Read more...

Revision history for this message
Marco Biscaro (marcobiscaro2112) wrote :

Very strange... When you safely remove your drive it automounts itself again after some seconds.

But this is not a unity's bug (neither a nautilus' one). I don't know what is happening. If someone else has a external drive like this, could test, please?

Revision history for this message
Omer Akram (om26er) wrote :

caroly, can you login to classic desktop session and try to reproduce the same problem so that we could rule out this bug as a unity one.

Changed in unity:
status: New → Incomplete
Revision history for this message
karoly.vegh (karoly-vegh) wrote :

Hi,

As suspected (getting the new usb addresses every time in dmesg probably fooling the box into thinking that this is a new device), I can confirm that the same happens with the classic gnome desktop session - just tested it, it happens the same way.

Revision history for this message
karoly.vegh (karoly-vegh) wrote :

another input: I have 3 partitions on this usb hdd. For one of them (sdb3) I have added now an fstab entry, and now this partition won't be automounted at plug-in, but the two other will be. If I don't mount sdb3 manually, I can reproduce the issue with just two drives:

Three partitions:

kvegh@lv:~$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 1000.2 GB, 1000170586112 bytes
255 heads, 63 sectors/track, 121597 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: 0x0003f448

   Device Boot Start End Blocks Id System
/dev/sdb1 1 3824 30716248+ c W95 FAT32 (LBA)
/dev/sdb2 3825 42069 307202962+ 7 HPFS/NTFS
/dev/sdb3 42070 121597 638808660 83 Linux
kvegh@lv:~$

...one has an fstab entry (yes, this is sdb3):

kvegh@lv:~$ grep wd /etc/fstab
UUID=0c4da9d2-2351-4f58-a0a3-c9398224949e /mnt/wd ext4 errors=remount-ro 0 1
kvegh@lv:~$

after usb plug-in I have the two other partitions mounted:

kvegh@lv:~$ mount | grep sdb
/dev/sdb1 on /media/NEW VOLUME type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
/dev/sdb2 on /media/New Volume type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
kvegh@lv:~$

and if I click safely remove on either of them, these two auto-remount within seconds, with a new usb address, like this:

[ 950.812954] usb 2-1.1.4: USB disconnect, address 14
[ 956.922344] usb 2-1.1.4: new high speed USB device using ehci_hcd and address 15

...isn't this a kernel issue? Or is the usb disk misbehaving?

Omer Akram (om26er)
affects: unity (Ubuntu) → udev (Ubuntu)
Changed in udev (Ubuntu):
status: Incomplete → New
affects: unity → udev
Changed in udev:
status: Incomplete → New
Revision history for this message
Mihai Capotă (mihaic) wrote :

I have the same problem with two different Western Digital USB 3 drives connected to USB 2 ports. The drives are My Book Essential 3 TB (WDBACW0030HBK) and My Passport Essential 500 GB (WDBACY5000ABK). I can reproduce the behavior on a laptop and a desktop, both running Ubuntu 10.10.

Revision history for this message
David (nqk) wrote :

Same problem here, standard 8 GB flash drive. The "Eject" command works, however. What's the purpose of having two commands!?

Revision history for this message
Jan Sonntag (finaljason) wrote :

Same problem here.

Some other persons and me discovered, that only nvidia chipsets are affected -> https://bugzilla.gnome.org/show_bug.cgi?id=641873

I will add 3 attachments:

1. udevadm output after plugging in
2. udevadm output after respawning
3. diff

I'm sure, that this is an udev issue but it could be a kernel bug too...

i think this bug don't exists under lucid (but i'm just able to speak for my pc...)

Revision history for this message
Jan Sonntag (finaljason) wrote :
Revision history for this message
Jan Sonntag (finaljason) wrote :
Revision history for this message
Jan Sonntag (finaljason) wrote :
Changed in udev:
status: New → Confirmed
Changed in udev (Ubuntu):
status: New → Confirmed
Revision history for this message
David Fletcher (flightmaker) wrote :

I became sufficiently tired of this with my nvidia chipped motherboard, that I installed an old PCI USB card plus a front panel hub. These use NEC chips. The bug is not present with this hardware.

Revision history for this message
madtel (madtel-2) wrote :

I can confirm the issue. I have an Nvidia chipset.
This behaviour (remounting after safe removal) happened to me under Ubuntu 11.04, 11.10 and 12.04

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.