Tell me more ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I'm having issues keeping a 3TB USB 2.0 External Hard drive (self powered) mounted on my pi.

I'm using a 1.0 A wall charger to power the pi. I'm connecting the hard drive to a powered Belkin USB hub and then plugging that hub into a USB port on the pi.

Purchased the hard drive new and reformatted to ext3 using the pi.

The hard drive connects and mounts fine both manually using mount [device] [dir] and automagically using usbmount, and works fine for as long as im active on the device/drive. I'll come back to the pi a few hours or a day later and try and access the drive at the mount point and can't access the drive at the same (/dev/sda1) location. When I try to ls on the mount point, I get: ls: reading directory /media/usb0: Input/output error and this accross any connected sessions:

Message from syslogd@raspberrypi at Nov 16 10:46:40 ...
 kernel:[32781.214102] journal commit I/O error

Message from syslogd@raspberrypi at Nov 16 10:46:40 ...
 kernel:[32781.226121] journal commit I/O error

I then have to remount the drive. sometimes I'll notice the device path has changed from /dev/sda1 to /dev/sdb1. Sometimes I even need to un/re-plug the drive into the pi.

I'm now trying to figure out if this is a power issue (which im skeptical of), a disk issue (like the disk going into sleep mode or something) or a kernal/linux issue. Any one have any ideas?

UPDATE

/var/log/messages: http://bit.ly/TYDYZR

share|improve this question
Experience says that any external drive inconsistencies are down to power. This is a good description of what the error means – Jivings Nov 18 '12 at 9:52
That was what I thought at first also, but I'm supplying plenty of power to the pi, and also plugging the external hard drive into a powered USB hub and then into the pi, with no other USB deviced connected. After hours of inactivity when coming back to the pi the hard drive is not connected and I get I/O errors. – ndmweb Nov 21 '12 at 20:09
Also the external HD has it's own power which plugs into the wall. – ndmweb Nov 21 '12 at 20:18

2 Answers

I am having the same exact problem. The way i solved (worked-around) this issue is:

  1. i created a startup script named /etc/init.d/mountmedia that looks like the code below (more details read here http://www.debian-administration.org/articles/28 )

!/bin/sh

# /etc/init.d/mountmedia
#

# Carry out specific functions when asked to by the system
case "$1" in
  start)
    echo "Mounting external drive... "
    mount /dev/sd*1 /media/data
    ;;
  stop)
    echo "Un-mounting external drive..."
    umount /media/data
    ;;
  *)    
    echo "Usage: /etc/init.d/mountmedia {start|stop}"
    exit 1
    ;;
esac
exit 0
  1. then i created a cronjob to check if the mount is down, and remount it if necessary. Here's my script

!/bin/sh

filenumber=`ls /media/data/ | wc -l`
if [ "$filenumber" -lt 1 ]; then
    echo "mounting ..."
    sudo umount /media/data
    sudo mount /dev/sd*1 /media/data
fi
share|improve this answer

i'm having the same issue. But i'm using a power supplied hdd. Did you have any luck on solving this issue?

share|improve this answer
this isn't an answer if you have a similar problem, please start it in a new question and provide as much information/logs as possible. – kolin Jan 29 at 8:47
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. – Mark Booth Feb 7 at 0:58
Alternatively, you could have written this as a comment to the original question. – Blaisorblade Mar 2 at 2:09
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – Vincent P Mar 6 at 5:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.