USB drive taking a long time to mount

My USB flash drive (Kingston DataTraveler microDuo 64 GB) takes almost a minute and a half to mount on openSuSE 13.2. It does not do this on Ubuntu 15.04 (same computer), or my Windows 8.1 tablet.

I also have a Kingston Data Traveler (a 32GB microDuo) but my experience is slightly different from yours. I have found it slow to mount under every device I have tried it with, which includes:

  • multiple PCs running openSUSE-13.2
  • two separate Android devices with different versions of Android (v.4.2.2 on my Zopo ZP-980+ Android phone, and v.4.4.2 on a Samsung Galaxy Note 10.1 tablet).
  • two separate MS-Windows PCs running windows-7.

Clearly this is more than just an openSUSE issue from my above experience. It would be nice if there was an openSUSE configuration tuning that could help.

I have an openSUSE Tumbleweed install I have yet to try it on.
.

It could be useful to monitor kernel messages during the connection and mounting phases perhaps

journalctl -f

Running that command only gave output after the drive had mounted:

Jul 01 07:24:53 linux-isuw.site org.gtk.Private.UDisks2VolumeMonitor[1427]: libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /run/media/joseph/KINGSTON/BDMV/index.bdmv
Jul 01 07:24:53 linux-isuw.site org.gtk.Private.UDisks2VolumeMonitor[1427]: libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /run/media/joseph/KINGSTON/BDMV/BACKUP/index.bdmv


Was the command running before you attached the device?

In openSUSE-13.2 with the 32-GByte USB Kingston Traveller Usb stick NOT yet plugged in to a USB-2.0 slot :

  • sent the command " journalctl -f " in a konsole
  • let the initial messages scroll by, and then there were no messages for a while
  • plugged in USB stick … still no new messages in konsole
  • after ~25 seconds, KDE in lower right corner identifies USB stick and gives me opportunity to click on it. NO entries in konsole yet
  • after ~10 seconds I click on USB drive entry in lower right corner of KDE desktop, and
  • obtain:

Jul 01 21:35:03 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1474]: disc.c:332: error opening file BDMV/index.bdmv                      
Jul 01 21:35:03 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1474]: disc.c:332: error opening file BDMV/BACKUP/index.bdmv

despite those errors, USB stick is nominally acessible.

I will try same memory stick with Tumblweed (on a separate PC) later.

Same memory stick. Different PC (Tumbleweed about 3 weeks old with kernel, which takes about 20 seconds to mount … :


Linux linux-gzza 4.0.4-3-desktop #1 SMP PREEMPT Fri May 29 15:00:18 UTC 2015 (ac67377) x86_64 x86_64 x86_64 GNU/Linux

and error messages mostly the same as with openSUSE-13.2 on a different PC.:

Jul 01 21:48:34 linux-gzza org.gtk.Private.UDisks2VolumeMonitor[1230]: **disc.c:332: error opening file **BDMV/index.bdmv
Jul 01 21:48:34 linux-gzza org.gtk.Private.UDisks2VolumeMonitor[1230]: **disc.c:332: error opening file **BDMV/BACKUP/index.bdmv

I note same PC, different memory stick (that mounts IMMEDIATELY) and I obtain same error message. Hence I think that error message may not be relevant to the slow USB mounting, as it also occurs with fast USB stick mounting.
.

On 2015-07-01 21:46, oldcpu wrote:

> - plugged in USB stick … still no new messages in konsole

As root or as user? journalctl does work as user, but doesn’t give you
access to all the messages. Or try “dmesg --follow”.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Here is the output from running journalctl as root:

Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: new high-speed USB device number 5 using ehci-pci
Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: New USB device found, idVendor=0951, idProduct=16a3
Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: Product: DT microDuo 3.0
Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: Manufacturer: Kingston
Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: SerialNumber: 1C6F654E48EBBF21C9222B65
Jul 01 20:46:39 linux-isuw.site kernel: usb-storage 2-1:1.0: USB Mass Storage device detected
Jul 01 20:46:39 linux-isuw.site kernel: scsi9 : usb-storage 2-1:1.0
Jul 01 20:46:39 linux-isuw.site mtp-probe[7413]: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1"
Jul 01 20:46:39 linux-isuw.site mtp-probe[7413]: bus: 2, device: 5 was not an MTP device
Jul 01 20:46:40 linux-isuw.site kernel: scsi 9:0:0:0: Direct-Access     Kingston DT microDuo 3.0  PMAP PQ: 0 ANSI: 6
Jul 01 20:46:40 linux-isuw.site kernel: sd 9:0:0:0: Attached scsi generic sg2 type 0
Jul 01 20:46:41 linux-isuw.site kernel: sd 9:0:0:0: [sdc] 122915328 512-byte logical blocks: (62.9 GB/58.6 GiB)
Jul 01 20:46:41 linux-isuw.site kernel: sd 9:0:0:0: [sdc] Write Protect is off
Jul 01 20:46:41 linux-isuw.site kernel: sd 9:0:0:0: [sdc] Mode Sense: 23 00 00 00
Jul 01 20:46:41 linux-isuw.site kernel: sd 9:0:0:0: [sdc] No Caching mode page found
Jul 01 20:46:41 linux-isuw.site kernel: sd 9:0:0:0: [sdc] Assuming drive cache: write through
Jul 01 20:46:41 linux-isuw.site kernel:  sdc: sdc1
Jul 01 20:46:41 linux-isuw.site kernel: sd 9:0:0:0: [sdc] Attached SCSI removable disk
Jul 01 20:47:42 linux-isuw.site kernel: usb 2-1: reset high-speed USB device number 5 using ehci-pci
Jul 01 20:47:43 linux-isuw.site kernel: FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Jul 01 20:47:43 linux-isuw.site udisksd[1474]: Mounted /dev/sdc1 at /run/media/joseph/KINGSTON on behalf of uid 1000
Jul 01 20:48:10 linux-isuw.site kernel: SFW2-INext-DROP-DEFLT IN=wlp6s0 OUT= MAC= SRC=2602:0306:c460:ed50:0226:c6ff:fe83:b458 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 

Thanks. That gives us a clearer picture. So, from the time the device is reported

Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: New USB device found, idVendor=0951, idProduct=16a3
Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: Product: DT microDuo 3.0
Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: Manufacturer: Kingston
Jul 01 20:46:39 linux-isuw.site kernel: usb 2-1: SerialNumber: 1C6F654E48EBBF21C9222B65
Jul 01 20:46:39 linux-isuw.site kernel: usb-storage 2-1:1.0: USB Mass Storage device detected

to the time the the device is mounted

Jul 01 20:47:43 linux-isuw.site udisksd[1474]: Mounted /dev/sdc1 at /run/media/joseph/KINGSTON on behalf of uid 1000

is nearly 1 minute (as you already mentioned). (This does not appear to be a Linux-related issue though, just something intrinsic to the device.)

You might want to check this out further…

Jul 01 20:47:43 linux-isuw.site kernel: FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

That was as a regular user.

As user root, with openSUSE-13.2 on a similar memory stick to the OP (but with a different PC of course) I obtain the following :


Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: new high-speed USB device number 8 using xhci_hcd
Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: New USB device found, idVendor=0951, idProduct=16a1
Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: Product: DT microDuo
Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: Manufacturer: Kingston
Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: SerialNumber: 50E549C34436BEC029097BA2
Jul 02 06:43:49 linux-mtpj kernel: usb-storage 3-12:1.0: USB Mass Storage device detected
Jul 02 06:43:49 linux-mtpj kernel: scsi8 : usb-storage 3-12:1.0
Jul 02 06:43:49 linux-mtpj mtp-probe[7791]: checking bus 3, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-12"
Jul 02 06:43:49 linux-mtpj mtp-probe[7791]: bus: 3, device: 8 was not an MTP device
Jul 02 06:43:50 linux-mtpj kernel: scsi 8:0:0:0: Direct-Access     Kingston DT microDuo      PMAP PQ: 0 ANSI: 4
Jul 02 06:43:50 linux-mtpj kernel: sd 8:0:0:0: Attached scsi generic sg4 type 0
Jul 02 06:43:58 linux-mtpj kernel: sd 8:0:0:0: [sdd] 61457664 512-byte logical blocks: (31.4 GB/29.3 GiB)
Jul 02 06:43:58 linux-mtpj kernel: sd 8:0:0:0: [sdd] Write Protect is off
Jul 02 06:43:58 linux-mtpj kernel: sd 8:0:0:0: [sdd] Mode Sense: 23 00 00 00
Jul 02 06:43:58 linux-mtpj kernel: sd 8:0:0:0: [sdd] No Caching mode page found
Jul 02 06:43:58 linux-mtpj kernel: sd 8:0:0:0: [sdd] Assuming drive cache: write through
Jul 02 06:43:58 linux-mtpj kernel:  sdd: sdd1
Jul 02 06:43:58 linux-mtpj kernel: sd 8:0:0:0: [sdd] Attached SCSI removable disk
Jul 02 06:44:11 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1474]: disc.c:332: error opening file BDMV/index.bdmv
Jul 02 06:44:11 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1474]: disc.c:332: error opening file BDMV/BACKUP/index.bdmv
Jul 02 06:44:11 linux-mtpj udisksd[1578]: Mounted /dev/sdd1 at /run/media/oldcpu/KINGSTON on behalf of uid 1000

… ie its a bit slow to mount after inserting. Note that other memory sticks will mount typically instantly, or within a second of inserting on this very same PC.

My openSUSE-13.2 has the stock kernel:


Linux linux-mtpj 3.16.7-21-desktop #1 SMP PREEMPT Tue Apr 14 07:11:37 UTC 2015 (93c1539) x86_64 x86_64 x86_64 GNU/Linux

I can try Tumbleweed (on a different PC) where Tumbleweed has a different Kernel, but I don’t anticipate any difference, as it is also slow. I also note the Windows-7 PC at the office is also slow to mount this same memory stick.
.

Next is same PC, same openSUSE-13.2 but a different USB stick. In this case also a Kingston memory stick, but it is a USB-3.0 HyperX. It takes about 1 second.


Jul 02 06:50:59 linux-mtpj kernel: usb 4-6.1: new SuperSpeed USB device number 5 using xhci_hcd
Jul 02 06:50:59 linux-mtpj kernel: usb 4-6.1: New USB device found, idVendor=0951, idProduct=162b
Jul 02 06:50:59 linux-mtpj kernel: usb 4-6.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 02 06:50:59 linux-mtpj kernel: usb 4-6.1: Product: DT HyperX 3.0
Jul 02 06:50:59 linux-mtpj kernel: usb 4-6.1: Manufacturer: Kingston
Jul 02 06:50:59 linux-mtpj kernel: usb 4-6.1: SerialNumber: 1C6F65C7CB68BBC08000001B
Jul 02 06:50:59 linux-mtpj kernel: usb-storage 4-6.1:1.0: USB Mass Storage device detected
Jul 02 06:50:59 linux-mtpj kernel: scsi9 : usb-storage 4-6.1:1.0
Jul 02 06:50:59 linux-mtpj mtp-probe[7965]: checking bus 4, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb4/4-6/4-6.1"
Jul 02 06:50:59 linux-mtpj mtp-probe[7965]: bus: 4, device: 5 was not an MTP device
Jul 02 06:51:00 linux-mtpj kernel: scsi 9:0:0:0: Direct-Access     Kingston DT HyperX 3.0    PMAP PQ: 0 ANSI: 4
Jul 02 06:51:00 linux-mtpj kernel: sd 9:0:0:0: Attached scsi generic sg3 type 0
Jul 02 06:51:00 linux-mtpj kernel: sd 9:0:0:0: [sdc] 125108224 512-byte logical blocks: (64.0 GB/59.6 GiB)
Jul 02 06:51:00 linux-mtpj kernel: sd 9:0:0:0: [sdc] Write Protect is off
Jul 02 06:51:00 linux-mtpj kernel: sd 9:0:0:0: [sdc] Mode Sense: 45 00 00 00
Jul 02 06:51:00 linux-mtpj kernel: sd 9:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Jul 02 06:51:00 linux-mtpj kernel:  sdc: sdc1
Jul 02 06:51:00 linux-mtpj kernel: sd 9:0:0:0: [sdc] Attached SCSI removable disk
Jul 02 06:51:03 linux-mtpj udisksd[1578]: Mounted /dev/sdc1 at /run/media/oldcpu/MULTIBOOT on behalf of uid 1000
Jul 02 06:51:03 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1474]: disc.c:332: error opening file BDMV/index.bdmv
Jul 02 06:51:03 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1474]: disc.c:332: error opening file BDMV/BACKUP/index.bdmv

There is something pecular about how hardware reacts to this memory stick, and how the software then deals with that. Fortunately, I don’t have the massive wait the OP has, but I still have a longer than normal wait.
.

One thing I noted, is TechConspracy has a USB-3.0 microDuo (I think) while mine is a USB-2.0 :


Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: new high-speed USB device number 8 using xhci_hcd
Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: New USB device found, idVendor=0951, idProduct=16a1
Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: **Product: DT microDuo**
Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: Manufacturer: Kingston

I did not try to plug the memory stick into a USB-3.0 port. I guess I could try that to see if it is even slower to mount (for my case).

would a " journalctl -f " run on Ubuntu while the memory stick is being mounted yield any insight as to why Ubuntu is faster for the OP ?
.

On 2015-07-02 06:56, oldcpu wrote:

> As user root, with openSUSE-13.2 on a similar memory stick to the OP
> (but with a different PC of course) I obtain the following :
>
>
> Code:
> --------------------
>
> Jul 02 06:43:49 linux-mtpj kernel: usb 3-12: new high-speed USB device number 8 using xhci_hcd

> Jul 02 06:44:11 linux-mtpj udisksd[1578]: Mounted /dev/sdd1 at /run/media/oldcpu/KINGSTON on behalf of uid 1000
>
> --------------------
>
> … ie its a bit slow to mount after inserting.

Just 22 seconds. Not terribly slow :-?


>   Jul 02 06:43:50 linux-mtpj kernel: sd 8:0:0:0: Attached scsi generic sg4 type 0
>   Jul 02 06:43:58 linux-mtpj kernel: sd 8:0:0:0: [sdd] 61457664 512-byte logical blocks: (31.4 GB/29.3 GiB)

This phase is 8 seconds. Initial scan looking for layout.


>   Jul 02 06:43:58 linux-mtpj kernel: sd 8:0:0:0: [sdd] Attached SCSI removable disk
>   Jul 02 06:44:11 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1474]: disc.c:332: error opening file BDMV/index.bdmv
>   Jul 02 06:44:11 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1474]: disc.c:332: error opening file BDMV/BACKUP/index.bdmv
>   Jul 02 06:44:11 linux-mtpj udisksd[1578]: Mounted /dev/sdd1 at /run/media/oldcpu/KINGSTON on behalf of uid 1000

And this is 13 seconds. The two errors I don’t know what they are about,
but I also see them in my 13.1 XFCE, in a different order:


> <0.6> 2015-07-01 11:00:55 minas-tirith kernel - - - [213513.031067] usb 1-3: new high-speed USB device number 8 using ehci-pci
....
> <0.5> 2015-07-01 11:00:57 minas-tirith kernel - - - [213514.715339] scsi 21:0:0:0: Direct-Access     Verbatim MICRO PLUS            PQ: 0 ANSI: 4
....
manual mount here

> <3.5> 2015-07-01 11:01:16 minas-tirith udisksd 6311 - -  Mounted /dev/sdb1 at /media/Verbatim on behalf of uid 1000
> <1.4> 2015-07-01 11:01:16 minas-tirith org.gtk.Private.UDisks2VolumeMonitor 6222 - -  disc.c:332: error opening file BDMV/index.bdmv
> <1.4> 2015-07-01 11:01:16 minas-tirith org.gtk.Private.UDisks2VolumeMonitor 6222 - -  disc.c:332: error opening file BDMV/BACKUP/index.bdmv
> <3.5> 2015-07-01 11:02:38 minas-tirith udisksd 6311 - -  Cleaning up mount point /media/Verbatim (device 8:17 is not mounted)
> <3.5> 2015-07-01 11:02:38 minas-tirith udisksd 6311 - -  Unmounted /dev/sdb1 on behalf of uid 1000

Mmm. Sorry, we can’t compare: I just noticed that I do manual mount, not
automatic.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

I plugged the Kingston DT microDuo (32 GB USB-2.0 version) into a USB-3.0 slot in my PC. I did not see any significant difference.


Jul 02 20:43:31 linux-mtpj kernel: usb 3-10.1: new high-speed USB device number 7 using xhci_hcd
Jul 02 20:43:31 linux-mtpj kernel: usb 3-10.1: New USB device found, idVendor=0951, idProduct=16a1
Jul 02 20:43:31 linux-mtpj kernel: usb 3-10.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 02 20:43:31 linux-mtpj kernel: usb 3-10.1: Product: DT microDuo
Jul 02 20:43:31 linux-mtpj kernel: usb 3-10.1: Manufacturer: Kingston
Jul 02 20:43:31 linux-mtpj kernel: usb 3-10.1: SerialNumber: 50E549C34436BEC029097BA2
Jul 02 20:43:31 linux-mtpj mtp-probe[2224]: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.1"
Jul 02 20:43:31 linux-mtpj mtp-probe[2224]: bus: 3, device: 7 was not an MTP device
Jul 02 20:43:31 linux-mtpj kernel: usb-storage 3-10.1:1.0: USB Mass Storage device detected
Jul 02 20:43:31 linux-mtpj kernel: scsi6 : usb-storage 3-10.1:1.0
Jul 02 20:43:31 linux-mtpj kernel: usbcore: registered new interface driver usb-storage
Jul 02 20:43:31 linux-mtpj kernel: usbcore: registered new interface driver uas
Jul 02 20:43:32 linux-mtpj kernel: scsi 6:0:0:0: Direct-Access     Kingston DT microDuo      PMAP PQ: 0 ANSI: 4
Jul 02 20:43:32 linux-mtpj kernel: sd 6:0:0:0: Attached scsi generic sg3 type 0
Jul 02 20:43:39 linux-mtpj kernel: sd 6:0:0:0: [sdc] 61457664 512-byte logical blocks: (31.4 GB/29.3 GiB)
Jul 02 20:43:39 linux-mtpj kernel: sd 6:0:0:0: [sdc] Write Protect is off
Jul 02 20:43:39 linux-mtpj kernel: sd 6:0:0:0: [sdc] Mode Sense: 23 00 00 00
Jul 02 20:43:39 linux-mtpj kernel: sd 6:0:0:0: [sdc] No Caching mode page found
Jul 02 20:43:39 linux-mtpj kernel: sd 6:0:0:0: [sdc] Assuming drive cache: write through
Jul 02 20:43:39 linux-mtpj kernel:  sdc: sdc1
Jul 02 20:43:39 linux-mtpj kernel: sd 6:0:0:0: [sdc] Attached SCSI removable disk
Jul 02 20:43:52 linux-mtpj udisksd[1547]: Mounted /dev/sdc1 at /run/media/oldcpu/KINGSTON on behalf of uid 1000
Jul 02 20:43:52 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1441]: disc.c:332: error opening file BDMV/index.bdmv
Jul 02 20:43:52 linux-mtpj org.gtk.Private.UDisks2VolumeMonitor[1441]: disc.c:332: error opening file BDMV/BACKUP/index.bdmv

I have the same problem here: https://forums.opensuse.org/showthread.php/507409-KDE4-takes-a-minute-to-recognize-USB3-pendrive

My tentative conclusion was:

With a (cheap) EMTEC 16GB USB3 pendrive, lag happens only with xhci (USB3 supported) driver, and speed is somewhat greater then USB2, but not much. With the USB2 driver (ehci IINM) it mounts fast, but of course speed is limited to USB2.

With a USB2 pendrive, it doesn’t matter which driver or port is used, mounting is normally fast.

So it might be due to a bug in the (cheap) hardware implementation, or a combination of hardware + xhci driver.

While my thumb drive is USB3, my laptop only supports USB2, so it is not a USB3 driver issue

Also, I have noticed people saying that the drive takes a while to mount on Android phones. My phone (running Android 4.4.4) mounts the drive in about 10 seconds

What I’ve noticed is that oldpu’s kernel messaging indicates that the uas driver is being used, which might explain why your similar device model behaves differently with respect to mounting time for you. UAS was implemented with the USB 3.0 protocol to help with faster data transfer. You’re connecting via USB 2.0 whereas oldcupu’s output shows USB 3.0 connectivity (xhci_hcd). This might also explain why your Android 4.4.4 device mounts the USB device faster. Perhaps it really does have to do with UAS.