I got a little problem here with a USB attached hard drive ...
Raspberry Pi in question is a Rev.B (512MB) board, latest Raspbian image (on a 32GB Transcend Class 10 SD), up-to-date Linux / Firmware / Bootloader (runs with the firmware/loader from Sep. 10th) powered through a 1.2A USB power adapter - and nothing is overclocked.
For now I connected a Seagate ST3500630AS (500GB, SATA) sitting in a Sharkoon SATA Quick Port XT (the "dock" has its own power supply and I tested it being stable using a dummy load and a bench multimeter) and is directly connected to the Raspberry. The only other USB device attached is a Logitech Unifying Receiver. The plan actually is to connect a USB Hub and attach two hard drives (same HDD / USB Dock).
The problem I have here is that while copying data to the hard drive, over the network from my desktop computer, the kernel bombs out with a "hung task" - see below:
Code: Select all
Sep 13 10:35:19 raspberrypi kernel: [69243.554745] INFO: task jbd2/sda1-8:445 blocked for more than 120 seconds.
Sep 13 10:35:19 raspberrypi kernel: [69243.554767] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Sep 13 10:35:19 raspberrypi kernel: [69243.554781] jbd2/sda1-8 D c03a0214 0 445 2 0x00000000
Sep 13 10:35:19 raspberrypi kernel: [69243.554874] [<c03a0214>] (__schedule+0x2b0/0x5a0) from [<c016878c>] (jbd2_journal_commit_transaction+0x1b8/0x18bc)
Sep 13 10:35:19 raspberrypi kernel: [69243.554912] [<c016878c>] (jbd2_journal_commit_transaction+0x1b8/0x18bc) from [<c016cf0c>] (kjournald2+0xbc/0x298)
Sep 13 10:35:19 raspberrypi kernel: [69243.554956] [<c016cf0c>] (kjournald2+0xbc/0x298) from [<c003aa0c>] (kthread+0x88/0x94)
Sep 13 10:35:19 raspberrypi kernel: [69243.555042] [<c003aa0c>] (kthread+0x88/0x94) from [<c000e9fc>] (kernel_thread_exit+0x0/0x8)
Sep 13 10:35:19 raspberrypi kernel: [69243.555113] INFO: task flush-8:0:2900 blocked for more than 120 seconds.
Sep 13 10:35:19 raspberrypi kernel: [69243.555124] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Sep 13 10:35:19 raspberrypi kernel: [69243.555133] flush-8:0 D c03a0214 0 2900 2 0x00000000
Sep 13 10:35:19 raspberrypi kernel: [69243.555181] [<c03a0214>] (__schedule+0x2b0/0x5a0) from [<c03a0aa0>] (io_schedule+0x88/0xe4)
Sep 13 10:35:19 raspberrypi kernel: [69243.555225] [<c03a0aa0>] (io_schedule+0x88/0xe4) from [<c008edc8>] (sleep_on_page+0x8/0x10)
Sep 13 10:35:19 raspberrypi kernel: [69243.555255] [<c008edc8>] (sleep_on_page+0x8/0x10) from [<c039f1e4>] (__wait_on_bit_lock+0x7c/0xa8)
Sep 13 10:35:19 raspberrypi kernel: [69243.555284] [<c039f1e4>] (__wait_on_bit_lock+0x7c/0xa8) from [<c008eda8>] (__lock_page+0x84/0x9c)
Sep 13 10:35:19 raspberrypi kernel: [69243.555314] [<c008eda8>] (__lock_page+0x84/0x9c) from [<c0137528>] (ext4_num_dirty_pages+0x1a8/0x1ac)
Sep 13 10:35:19 raspberrypi kernel: [69243.555344] [<c0137528>] (ext4_num_dirty_pages+0x1a8/0x1ac) from [<c013cb6c>] (ext4_da_writepages+0x3cc/0x43c)
Sep 13 10:35:19 raspberrypi kernel: [69243.555378] [<c013cb6c>] (ext4_da_writepages+0x3cc/0x43c) from [<c00987d0>] (do_writepages+0x24/0x38)
Sep 13 10:35:19 raspberrypi kernel: [69243.555412] [<c00987d0>] (do_writepages+0x24/0x38) from [<c00e8654>] (__writeback_single_inode.isra.23+0x28/0x11c)
Sep 13 10:35:19 raspberrypi kernel: [69243.555437] [<c00e8654>] (__writeback_single_inode.isra.23+0x28/0x11c) from [<c00e897c>] (writeback_sb_inodes+0x234/0x40c)
Sep 13 10:35:19 raspberrypi kernel: [69243.555464] [<c00e897c>] (writeback_sb_inodes+0x234/0x40c) from [<c00e8bc4>] (__writeback_inodes_wb+0x70/0xac)
Sep 13 10:35:19 raspberrypi kernel: [69243.555525] [<c00e8bc4>] (__writeback_inodes_wb+0x70/0xac) from [<c00e8ddc>] (wb_writeback+0x1dc/0x204)
Sep 13 10:35:19 raspberrypi kernel: [69243.555557] [<c00e8ddc>] (wb_writeback+0x1dc/0x204) from [<c00e9858>] (wb_do_writeback+0x1e8/0x1fc)
Sep 13 10:35:19 raspberrypi kernel: [69243.555583] [<c00e9858>] (wb_do_writeback+0x1e8/0x1fc) from [<c00e98e8>] (bdi_writeback_thread+0x7c/0x150)
Sep 13 10:35:19 raspberrypi kernel: [69243.555613] [<c00e98e8>] (bdi_writeback_thread+0x7c/0x150) from [<c003aa0c>] (kthread+0x88/0x94)
Sep 13 10:35:19 raspberrypi kernel: [69243.555645] [<c003aa0c>] (kthread+0x88/0x94) from [<c000e9fc>] (kernel_thread_exit+0x0/0x8)
Once the copying stalls (desktop system just sits there and stalls till timeout, the hard drive on the Raspi just spins and keeps on flashing the "transfer" LED on the dock not doing anything) the Pi won't properly shut-down anymore ("sudo halt" hangs right after showing the "System is going down" message - only way out is to pull power).
I know the Sharkoon dock is a USB 3.0 device (believe it or not, but the dealerships around my place don't have USB 2.0 enclosures/docks anymore) - but they should be backwards compatible to USB 2.0 (at least it works flawlessly when I connect it to an USB 2.0 port on my desktop / laptop).
EDIT: I use "usbmount" to auto-mount the hard drive upon system boot, just to add this piece of information though I don't think it's the root of the problem. /EDIT
Now, the question is ... any chance the Raspberry has a problem with USB 3.0 devices on its USB 2.0 port, or could this be a kernel related problem, or would I need to issue some weird kernel parameter?
Any good ideas to try and resolve the problem are greatly appreciated.