Menu

#16 noflushd tries to spindown USB drive

open
None
5
2005-07-28
2005-06-29
frazw
No

If noflushd is started while a USB drive is present, it
will try to spin down the USB drive (/dev/sda) instead
of /dev/hda.

On these occations when it is started
(/etc/init.d/noflushd start) it says:
Starting No Flush Daemon: pdflush wakeup interval 0
suspiciously low, overriding to 5 seconds

And when it comes time to spin down /dev/hda it doesn't
and xconsole says:
Jun 29 17:07:10 capra noflushd[5926]: Spinning down
/dev/sda.

Strange. My noflushd file has: PARAMS="-v -n 33,1
/dev/hda" No mention on /dev/sda. This happens for both
USB flash drives, and USB hard drive enclosures.

Thanks.

Discussion

  • Daniel Kobras

    Daniel Kobras - 2005-07-28

    Logged In: YES
    user_id=7832

    Thanks for the report. Can you please provide additional
    information to aid my debugging:

    * The versions of noflushd and the kernel you're running.
    * The output of "noflushd -d -v -n 1 /dev/hda" with a USB
    drive connected.
    * The contents of /proc/partitions and /proc/diskstat (or
    /proc/stat on 2.4 kernels).
    * If this is on a 2.6 kernel, are you using udev?

     
  • Daniel Kobras

    Daniel Kobras - 2005-07-28
    • assigned_to: nobody --> nold
     
  • frazw

    frazw - 2005-07-29

    Logged In: YES
    user_id=1304594

    I'm using a 2.6.10 Kernel compiled from source using make-kpkg:
    capra:/# uname -a
    Linux capra 2.6.10-kinetic #1 Fri Mar 25 07:40:21 EST 2005
    i686 GNU/Linux

    Running an up to date Testing (Etch) distribution of Debian.

    capra:/# noflushd -V
    noflushd - idle disk daemon. Version 2.7.5.
    Error: Don't know how to spindown /dev/sda
    Error: No valid timeout found for /dev/hda

    ~~~~~~~~
    capra:/# /etc/init.d/noflushd stop
    Stopping No Flush Daemon: noflushd.

    Starting directly from command line like this seems to work
    as expected:
    capra:/# noflushd -d -v -n 1 /dev/hda
    Kernel talks oldstyle dev
    Probing for valid blkdev at /dev/hda
    Detected oldstyle dev at /dev/hda
    Kernel talks oldstyle dev
    Added entry for /dev/hda (3, 0)
    Added entry for /dev/sda (8, 0)
    Added disk /dev/hda, current timeout 60, state 2
    Controlling pdflush daemon
    Kernel talks linux 2.5-style stat
    pdflush stopped
    Check interval 5
    Allocated stat entry for (3, 0)
    Allocated stat entry for (22, 0)
    Allocated stat entry for (7, 0)
    Allocated stat entry for (7, 1)
    Allocated stat entry for (7, 2)
    Allocated stat entry for (7, 3)
    Allocated stat entry for (7, 4)
    Allocated stat entry for (7, 5)
    Allocated stat entry for (7, 6)
    Allocated stat entry for (7, 6)
    Allocated stat entry for (7, 7)
    Allocated stat entry for (8, 0)
    rw disks: 0 stopped, 2 spinning
    pdflush restarted with interval 500.
    State 1, sleeping 1 seconds
    pdflush stopped
    Check interval 6
    Disk /dev/hda, Time left 54.

    [SNIP]

    Disk /dev/hda, Time left 0.
    Spinning down /dev/hda.
    Syncing /dev/hda
    Syncing /dev/hda1
    Syncing /dev/hda2
    Syncing /dev/hda3
    Syncing /dev/hda4
    Syncing /dev/hda5
    Syncing /dev/hda6
    Syncing /dev/loop0
    Syncing /dev/hda
    Syncing /dev/hda1
    Syncing /dev/hda2
    Syncing /dev/hda3
    Syncing /dev/hda4
    Syncing /dev/hda5
    Syncing /dev/hda6
    Syncing /dev/loop0
    Sending spindown command to /dev/hda.
    Disk was up and running
    rw disks: 1 stopped, 1 spinning
    Syncing /dev/sda
    Syncing /dev/sda1
    State 2, sleeping 1 seconds
    Check interval 2
    rw disks: 1 stopped, 1 spinning
    State 2, sleeping 1 seconds
    Check interval 1
    rw disks: 1 stopped, 1 spinning
    State 2, sleeping 1 seconds
    Check interval 1
    rw disks: 1 stopped, 1 spinning
    State 2, sleeping 1 seconds
    Check interval 1
    rw disks: 1 stopped, 1 spinning
    ~~~~~~~~~~~

    That seems to work properly! Hmm. Yet starting via
    /etc/init.d/noflushd script causes the bug.
    So I tried running my machines command with -d:

    capra:/# /etc/init.d/noflushd stop
    Stopping No Flush Daemon: noflushd.
    capra:/# noflushd -d -v -n 33,1 /dev/hda
    Kernel talks oldstyle dev
    Probing for valid blkdev at /dev/hda
    Detected oldstyle dev at /dev/hda
    Kernel talks oldstyle dev
    Added entry for /dev/hda (3, 0)
    Added entry for /dev/sda (8, 0)
    Added disk /dev/hda, current timeout 1980, state 2
    pdflush wakeup interval 0 suspiciously low, overriding to 5
    seconds

    Controlling pdflush daemon
    Kernel talks linux 2.5-style stat
    pdflush stopped
    Check interval 5
    Allocated stat entry for (3, 0)
    Allocated stat entry for (22, 0)
    Allocated stat entry for (7, 0)
    Allocated stat entry for (7, 1)
    Allocated stat entry for (7, 2)
    Allocated stat entry for (7, 3)
    Allocated stat entry for (7, 4)
    Allocated stat entry for (7, 5)
    Allocated stat entry for (7, 6)
    Allocated stat entry for (7, 7)
    Allocated stat entry for (8, 0)
    rw disks: 0 stopped, 2 spinning
    pdflush restarted with interval 500.
    State 1, sleeping 33 seconds

    [ISSUED sudo /usr/bin/killall -s HUP noflushd FROM ICEWM MENU]

    Switching to next timeout set.
    Timeout update. Disk /dev/sda, timeout 60, left -1208102648
    Timeout update. Disk /dev/hda, timeout 60, left 60
    pdflush stopped
    Check interval 12
    Disk /dev/sda, Time left -1208102648.
    Spinning down /dev/sda.
    Syncing /dev/sda
    Syncing /dev/sda1
    Syncing /dev/sda
    Syncing /dev/sda1
    Sending spindown command to /dev/sda.
    Segmentation fault

    capra:/# cat /proc/partitions
    major minor #blocks name

    3 0 19535040 hda
    3 1 12892131 hda1
    3 2 1951897 hda2
    3 3 1 hda3
    3 4 3389715 hda4
    3 5 795186 hda5
    3 6 506016 hda6
    7 0 1536000 loop0
    8 0 128000 sda
    8 1 127984 sda1

    capra:/# cat /proc/diskstats
    3 0 hda 8196 818 411919 276580 5910 10285 125620
    886140 0 181080 1162990
    3 1 hda1 235 235 8395 8395
    3 2 hda2 152 152 9 9
    3 3 hda3 0 0 0 0
    3 4 hda4 7393 385114 3590 29024
    3 5 hda5 994 24466 3685 83736
    3 6 hda6 224 1792 557 4456
    22 0 hdc 0 0 0 0 0 0 0 0 0 0 0
    7 0 loop0 0 0 0 0 0 0 0 0 0 0 0
    7 1 loop1 0 0 0 0 0 0 0 0 0 0 0
    7 2 loop2 0 0 0 0 0 0 0 0 0 0 0
    7 3 loop3 0 0 0 0 0 0 0 0 0 0 0
    7 4 loop4 0 0 0 0 0 0 0 0 0 0 0
    7 5 loop5 0 0 0 0 0 0 0 0 0 0 0
    7 6 loop6 0 0 0 0 0 0 0 0 0 0 0
    7 7 loop7 0 0 0 0 0 0 0 0 0 0 0
    8 0 sda 1 0 8 10 0 0 0 0 0 10 10
    8 1 sda1 0 0 0 0

    It seems using two timeouts triggers the bug.

    I don't think i am using udev. Been compiling my own kernels
    since 2.4 and remember not selecting the new dev system when
    going to 2.6. How can I check?

    Thanks.

     

Log in to post a comment.

MongoDB Logo MongoDB