Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[PROBLEM] Xbian hangs when writing to USB hard drive
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Problem: Xbian hangs when writing to USB hard drive
2nd Mar, 2015, 10:29 PM
Post: #1
Slab Offline
Registered
Posts: 4
Joined: Mar 2015
Reputation: 0
Xbian hangs when writing to USB hard drive
Software
XBian version: Xbian 1.0 (knockout) (linux: kernel 3.18.8+)
XBMC/Kodi version: Kodi 14.2-BETA2 Git:2015-02-25-c4ce8e3-dirty
Overclock settings: default and high

Hardware
Device type and model: Raspberry Pi Model B 512 MB
Power supply rating: 5V 1A
SD card size and make/type: Kingston SDHC 8GB class 10 and Lexar SDHC 8GB class 10
Network (Ethernet or wireless): Ethernet
Connected devices: USB hard drive with its own power supply (Seagate Expansion 2TB), TV (HDMI)

Log files
Link to logfile(s):

Problem description:
Every time that any process writes to the USB hard drive the pi hangs, or it is unreachable via network at least (SSH, samba, deluge thinclient or web). All lights on the board are on. It happened for the first time while downloading torrents with deluge and it always happens while doing a live backup with a cronjob ("dd if=/dev/mmcblk0 of=/somefolderinthehd/image.img"). I realized that the pi doesn't hang if I limit the downloading speed in deluge (1MB/s) or if I run "dd if=/dev/mmcblk0 of=/somefolderinthehd/image.img" manually via SSH.

I would like to provide a log file, but I have to unplug the power cord when it happens and dmesg is overwritten on the next boot. I've tried to read the SD card from a live CD (Ubuntu), but it is not able to mount the btrfs partition. Is there any way to rotate dmesg logs?

I've changed "sync" to "async" in /etc/usbmount/usbmount.conf because writing rates were too low. I've also tried to mount the hard drive using "mount /dev/sda1 /somemountpoint". Mount options that I've tried:

usbmount: /dev/sda1 on /media/RaspberryPi type ext4 (rw,nodev,noexec,noatime,data=ordered)
mount command: /dev/sda1 on /media/RaspberryPi type ext4 (rw,relatime,data=ordered)

How to reproduce:
I have had the same result with several Xbian installations (two different SD cards). Xbian fresh install (default or high overclock), plug the USB hard drive and try to run the live backup described above as a cronjob.

I will try to reproduce the problem using other hard drive and other file system.

Workaround:
This workaround was posted by Fabio72 in this thread: http://forum.xbian.org/thread-2785-post-27555.html#pid27555

Verify the output of these commands:
Terminal
root@xbian:~# cat /sys/devices/platform/bcm2708_usb/regoffset
0xffffffff
root@xbian:~# cat /sys/devices/platform/bcm2708_usb/regvalue
invalid offset

Run:
Terminal
root@xbian:~# echo 08 > /sys/devices/platform/bcm2708_usb/regoffset
root@xbian:~# echo 0x31 > /sys/devices/platform/bcm2708_usb/regvalue

New output:
Terminal
root@xbian:~# cat /sys/devices/platform/bcm2708_usb/regoffset
0x00000008
root@xbian:~# cat /sys/devices/platform/bcm2708_usb/regvalue
Reg@0x000008 = 0x00000031
Find all posts by this user
Quote this message in a reply
2nd Mar, 2015, 11:21 PM
Post: #2
Fabio72 Offline
Registered
Posts: 96
Joined: Feb 2014
Reputation: 5
RE: Xbian hangs when writing to USB hard drive
take a look at this
http://forum.xbian.org/thread-2785-post-27555.html#pid27555
Find all posts by this user
Quote this message in a reply
3rd Mar, 2015, 05:36 AM
Post: #3
Slab Offline
Registered
Posts: 4
Joined: Mar 2015
Reputation: 0
RE: Xbian hangs when writing to USB hard drive
It seems to be working! Thank you so much, I've done what you say in your post, run "dd if=/dev/mmcblk0 of=/somefolderinthehd/image.img" as a cronjob and the pi is still working fine. I will keep testing it.

I still want to know if there is a way to rotate logs, so they are not overwritten on reboot (dmesg in particular).
Find all posts by this user
Quote this message in a reply
3rd Mar, 2015, 09:01 PM
Post: #4
Slab Offline
Registered
Posts: 4
Joined: Mar 2015
Reputation: 0
RE: Xbian hangs when writing to USB hard drive
Added the workaround to the first post.
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  USB hard drive no longer mounting cliverlong 9 30,871 17th Jul, 2014 09:23 PM
Last Post: cliverlong
  Can't add hard drive folder video sources mp3ireland2 17 51,668 16th Jan, 2014 12:05 PM
Last Post: mk01
  Hard Drive Mounting Grooveattack 15 47,929 11th Apr, 2013 05:35 AM
Last Post: Skywatch

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 12th May, 2025, 12:44 AM Powered By MyBB, © 2002-2025 MyBB Group.