public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] flash drive mounting is very slow
@ 2011-02-20 15:33 David Relson
  2011-02-20 16:50 ` [gentoo-user] " walt
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Relson @ 2011-02-20 15:33 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

Mounting USB devices is very, very slow.  This morning I inserted my
PNY memory stick at 10:18:22 but "df" didn't show it mounted until 3
minutes later at 10:21:05.

As  background information, in /etc/udev/rules.d/10-local.rules is: 

    KERNEL=="sd*1", ATTRS{manufacturer}=="PNY", SYMLINK+="PNY", RUN+="/bin/mount -a"

and in /etc/fstab is:

    /dev/PNY /mnt/pny vfat rw,nosuid,auto 0 0

The kernel messages in /var/log/messages for this period of time are in
the attached file (to avoid line wrapping by mail clients).

Any thoughts on why it takes so long and how I can speed up
recognition?

Ideas for enabling more messages (from udev, the kernel, etc) to see
what's happening would also be helpful.

TIA,

David


[-- Attachment #2: messages.txt --]
[-- Type: text/plain, Size: 1838 bytes --]

Feb 20 10:18:22 osage kernel: usb 1-4.1: new high speed USB device using ehci_hcd and address 25
Feb 20 10:18:22 osage kernel: usb 1-4.1: New USB device found, idVendor=154b, idProduct=0016
Feb 20 10:18:22 osage kernel: usb 1-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 20 10:18:22 osage kernel: usb 1-4.1: Product: USB 2.0 FD      
Feb 20 10:18:22 osage kernel: usb 1-4.1: Manufacturer: PNY     
Feb 20 10:18:22 osage kernel: usb 1-4.1: SerialNumber: 6E821D1300DE
Feb 20 10:18:22 osage kernel: scsi26 : usb-storage 1-4.1:1.0
Feb 20 10:18:23 osage kernel: scsi 26:0:0:0: Direct-Access     PNY      USB 2.0 FD       PMAP PQ: 0 ANSI: 0 CCS
Feb 20 10:18:23 osage kernel: sd 26:0:0:0: Attached scsi generic sg2 type 0
Feb 20 10:18:24 osage kernel: sd 26:0:0:0: [sdc] 15663104 512-byte logical blocks: (8.01 GB/7.46 GiB)
Feb 20 10:18:24 osage kernel: sd 26:0:0:0: [sdc] Write Protect is off
Feb 20 10:18:24 osage kernel: sd 26:0:0:0: [sdc] Mode Sense: 23 00 00 00
Feb 20 10:18:24 osage kernel: sd 26:0:0:0: [sdc] Assuming drive cache: write through
Feb 20 10:18:24 osage kernel: sd 26:0:0:0: [sdc] Assuming drive cache: write through
Feb 20 10:18:24 osage kernel: sdc: sdc1
Feb 20 10:18:24 osage kernel: sd 26:0:0:0: [sdc] Assuming drive cache: write through
Feb 20 10:18:24 osage kernel: sd 26:0:0:0: [sdc] Attached SCSI removable disk
Feb 20 10:18:38 osage usb_id[16872]: unable to access '/devices/pci0000:00/0000:00:13.5/usb1/1-4/1-4.1/1-4.1:1.0/host25/target25:0:0/25:0:0:0/block/sdc'

Feb 20 10:20:01 osage cron[17659]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Feb 20 10:20:01 osage cron[17660]: (health) CMD (/home/health/bin/system_health.py --log --graph > /dev/null 2>&1)
Feb 20 10:25:01 osage cron[18431]: (health) CMD (/home/health/bin/system_health.py --log --graph > /dev/null 2>&1)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user] Re: flash drive mounting is very slow
  2011-02-20 15:33 [gentoo-user] flash drive mounting is very slow David Relson
@ 2011-02-20 16:50 ` walt
  2011-02-20 17:08 ` [gentoo-user] " Dale
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: walt @ 2011-02-20 16:50 UTC (permalink / raw
  To: gentoo-user

On 02/20/2011 07:33 AM, David Relson wrote:
> Mounting USB devices is very, very slow.  This morning I inserted my
> PNY memory stick at 10:18:22 but "df" didn't show it mounted until 3
> minutes later at 10:21:05.
>
> As  background information, in /etc/udev/rules.d/10-local.rules is:
>
>      KERNEL=="sd*1", ATTRS{manufacturer}=="PNY", SYMLINK+="PNY", RUN+="/bin/mount -a"
>
> and in /etc/fstab is:
>
>      /dev/PNY /mnt/pny vfat rw,nosuid,auto 0 0
>
> The kernel messages in /var/log/messages for this period of time are in
> the attached file (to avoid line wrapping by mail clients).

Looks like udev is creating the device immediately, as it should.  I'm
pretty fuzzy on how the automounting actually gets done, though.

I've noticed this puzzling situation on my own machines (which auto-mount
correctly, BTW):

  1929 ?        Sl     0:04 /usr/libexec/udisks-daemon
  1930 ?        S      0:01  \_ udisks-daemon: polling /dev/sdc /dev/sr0 /dev/sdd

And this as well:

  1647 ?        S      0:02      \_ hald-addon-storage: polling /dev/sr0 (every 2 sec)
  1648 ?        S      0:00      \_ hald-addon-storage: polling /dev/sdd (every 2 sec)
  1650 ?        S      0:00      \_ hald-addon-storage: polling /dev/sdc (every 2 sec)

So I have hal and udisks polling the same three removable drives at the same
time, but they don't seem to interfere with each other.

I'm using gnome with automounting enabled, so I'm pretty sure it's gnome that
automounts those three removable drives, possibly with gdu-notification-daemon,
which is part of the gnome-disk-utility package.  A whole lotta guessing going
on here :)




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] flash drive mounting is very slow
  2011-02-20 15:33 [gentoo-user] flash drive mounting is very slow David Relson
  2011-02-20 16:50 ` [gentoo-user] " walt
@ 2011-02-20 17:08 ` Dale
  2011-02-20 17:44 ` Neil Bothwick
  2011-02-20 23:18 ` William Kenworthy
  3 siblings, 0 replies; 9+ messages in thread
From: Dale @ 2011-02-20 17:08 UTC (permalink / raw
  To: gentoo-user

David Relson wrote:
> Mounting USB devices is very, very slow.  This morning I inserted my
> PNY memory stick at 10:18:22 but "df" didn't show it mounted until 3
> minutes later at 10:21:05.
>
> As  background information, in /etc/udev/rules.d/10-local.rules is:
>
>      KERNEL=="sd*1", ATTRS{manufacturer}=="PNY", SYMLINK+="PNY", RUN+="/bin/mount -a"
>
> and in /etc/fstab is:
>
>      /dev/PNY /mnt/pny vfat rw,nosuid,auto 0 0
>
> The kernel messages in /var/log/messages for this period of time are in
> the attached file (to avoid line wrapping by mail clients).
>
> Any thoughts on why it takes so long and how I can speed up
> recognition?
>
> Ideas for enabling more messages (from udev, the kernel, etc) to see
> what's happening would also be helpful.
>
> TIA,
>
> David
>
>    

Just out of curiosity, have you tried it with no entry in fstab?  I 
don't have a entry for any of those in my fstab and it mounts in just a 
few seconds.

Just a thought.

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] flash drive mounting is very slow
  2011-02-20 15:33 [gentoo-user] flash drive mounting is very slow David Relson
  2011-02-20 16:50 ` [gentoo-user] " walt
  2011-02-20 17:08 ` [gentoo-user] " Dale
@ 2011-02-20 17:44 ` Neil Bothwick
  2011-02-20 18:03   ` Mick
  2011-02-21  4:10   ` David Relson
  2011-02-20 23:18 ` William Kenworthy
  3 siblings, 2 replies; 9+ messages in thread
From: Neil Bothwick @ 2011-02-20 17:44 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

On Sun, 20 Feb 2011 10:33:52 -0500, David Relson wrote:

> As  background information, in /etc/udev/rules.d/10-local.rules is: 
> 
>     KERNEL=="sd*1", ATTRS{manufacturer}=="PNY", SYMLINK+="PNY",
> RUN+="/bin/mount -a"
> 
> and in /etc/fstab is:
> 
>     /dev/PNY /mnt/pny vfat rw,nosuid,auto 0 0

Could the delay be caused by something else is fstab trying to mount
and failing? Try with mount /dev/PNY instead of mount -a.

Even better use pmount /dev/PNY.

Either way, you should run the command with & because udev blocks while
running commands.


-- 
Neil Bothwick

And what else floats.....?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] flash drive mounting is very slow
  2011-02-20 17:44 ` Neil Bothwick
@ 2011-02-20 18:03   ` Mick
  2011-02-21  4:09     ` David Relson
  2011-02-21  4:10   ` David Relson
  1 sibling, 1 reply; 9+ messages in thread
From: Mick @ 2011-02-20 18:03 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 1032 bytes --]

On Sunday 20 February 2011 17:44:58 Neil Bothwick wrote:
> On Sun, 20 Feb 2011 10:33:52 -0500, David Relson wrote:
> > As  background information, in /etc/udev/rules.d/10-local.rules is:
> >     KERNEL=="sd*1", ATTRS{manufacturer}=="PNY", SYMLINK+="PNY",
> > 
> > RUN+="/bin/mount -a"
> > 
> > and in /etc/fstab is:
> >     /dev/PNY /mnt/pny vfat rw,nosuid,auto 0 0
> 
> Could the delay be caused by something else is fstab trying to mount
> and failing? Try with mount /dev/PNY instead of mount -a.
> 
> Even better use pmount /dev/PNY.
> 
> Either way, you should run the command with & because udev blocks while
> running commands.

To state the obvious ... have you tried it on a different USB port, a 
different PC and finally a different OS?

I've had a USB stick failing recently and there was a mechanical (contact) 
problem.  So a process of elimination would at least do away with physical 
level problems and indirectly confirm if there is something wrong with your 
system.
-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] flash drive mounting is very slow
  2011-02-20 15:33 [gentoo-user] flash drive mounting is very slow David Relson
                   ` (2 preceding siblings ...)
  2011-02-20 17:44 ` Neil Bothwick
@ 2011-02-20 23:18 ` William Kenworthy
  3 siblings, 0 replies; 9+ messages in thread
From: William Kenworthy @ 2011-02-20 23:18 UTC (permalink / raw
  To: gentoo-user

"usb verbose debug" in the kernel? - check dmesg.  Mine are always slow
to mount if this is on.

BillK



On Sun, 2011-02-20 at 10:33 -0500, David Relson wrote:
> Mounting USB devices is very, very slow.  This morning I inserted my
> PNY memory stick at 10:18:22 but "df" didn't show it mounted until 3
> minutes later at 10:21:05.
> 
> As  background information, in /etc/udev/rules.d/10-local.rules is: 
> 
>     KERNEL=="sd*1", ATTRS{manufacturer}=="PNY", SYMLINK+="PNY", RUN+="/bin/mount -a"
> 
> and in /etc/fstab is:
> 
>     /dev/PNY /mnt/pny vfat rw,nosuid,auto 0 0
> 
> The kernel messages in /var/log/messages for this period of time are in
> the attached file (to avoid line wrapping by mail clients).
> 
> Any thoughts on why it takes so long and how I can speed up
> recognition?
> 
> Ideas for enabling more messages (from udev, the kernel, etc) to see
> what's happening would also be helpful.
> 
> TIA,
> 
> David
> 

-- 
William Kenworthy <billk@iinet.net.au>
Home in Perth!




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] flash drive mounting is very slow
  2011-02-20 18:03   ` Mick
@ 2011-02-21  4:09     ` David Relson
  0 siblings, 0 replies; 9+ messages in thread
From: David Relson @ 2011-02-21  4:09 UTC (permalink / raw
  To: gentoo-user

On Sun, 20 Feb 2011 18:03:24 +0000
Mick wrote:

> On Sunday 20 February 2011 17:44:58 Neil Bothwick wrote:
> > On Sun, 20 Feb 2011 10:33:52 -0500, David Relson wrote:
> > > As  background information, in /etc/udev/rules.d/10-local.rules
> > > is: KERNEL=="sd*1", ATTRS{manufacturer}=="PNY", SYMLINK+="PNY",
> > > 
> > > RUN+="/bin/mount -a"
> > > 
> > > and in /etc/fstab is:
> > >     /dev/PNY /mnt/pny vfat rw,nosuid,auto 0 0
> > 
> > Could the delay be caused by something else is fstab trying to mount
> > and failing? Try with mount /dev/PNY instead of mount -a.
> > 
> > Even better use pmount /dev/PNY.
> > 
> > Either way, you should run the command with & because udev blocks
> > while running commands.
> 
> To state the obvious ... have you tried it on a different USB port, a 
> different PC and finally a different OS?
> 
> I've had a USB stick failing recently and there was a mechanical
> (contact) problem.  So a process of elimination would at least do
> away with physical level problems and indirectly confirm if there is
> something wrong with your system.
> -- 
> Regards,
> Mick

The PNY stick mentioned runs very nicely on a machine at work.  The
environment there is Ubuntu (as guest OS) running in VMWare on
WinXP (as host OS).  Automounting works very nicely.

The slowness is true of several USB sticks. 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] flash drive mounting is very slow
  2011-02-20 17:44 ` Neil Bothwick
  2011-02-20 18:03   ` Mick
@ 2011-02-21  4:10   ` David Relson
  2011-02-21 10:55     ` Neil Bothwick
  1 sibling, 1 reply; 9+ messages in thread
From: David Relson @ 2011-02-21  4:10 UTC (permalink / raw
  To: gentoo-user

On Sun, 20 Feb 2011 17:44:58 +0000
Neil Bothwick wrote:

> On Sun, 20 Feb 2011 10:33:52 -0500, David Relson wrote:
> 
> > As  background information, in /etc/udev/rules.d/10-local.rules is: 
> > 
> >     KERNEL=="sd*1", ATTRS{manufacturer}=="PNY", SYMLINK+="PNY",
> > RUN+="/bin/mount -a"
> > 
> > and in /etc/fstab is:
> > 
> >     /dev/PNY /mnt/pny vfat rw,nosuid,auto 0 0
> 
> Could the delay be caused by something else is fstab trying to mount
> and failing? Try with mount /dev/PNY instead of mount -a.
> 
> Even better use pmount /dev/PNY.
> 
> Either way, you should run the command with & because udev blocks
> while running commands.

You're suggesting that the RUN clause be

   RUN+="pmount /dev/PNY &"

right?




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] flash drive mounting is very slow
  2011-02-21  4:10   ` David Relson
@ 2011-02-21 10:55     ` Neil Bothwick
  0 siblings, 0 replies; 9+ messages in thread
From: Neil Bothwick @ 2011-02-21 10:55 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 301 bytes --]

On Sun, 20 Feb 2011 23:10:18 -0500, David Relson wrote:

> You're suggesting that the RUN clause be
> 
>    RUN+="pmount /dev/PNY &"
> 
> right?

Right. Most importantly, stop using mount -a.


-- 
Neil Bothwick

If you think that there is good in everybody, you haven't met everybody.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-02-21 10:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-20 15:33 [gentoo-user] flash drive mounting is very slow David Relson
2011-02-20 16:50 ` [gentoo-user] " walt
2011-02-20 17:08 ` [gentoo-user] " Dale
2011-02-20 17:44 ` Neil Bothwick
2011-02-20 18:03   ` Mick
2011-02-21  4:09     ` David Relson
2011-02-21  4:10   ` David Relson
2011-02-21 10:55     ` Neil Bothwick
2011-02-20 23:18 ` William Kenworthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox