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?


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

  • Experience says that any external drive inconsistencies are down to power. This is a good description of what the error means
    – Jivings
    Nov 18, 2012 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, 2012 at 20:09
  • Also the external HD has it's own power which plugs into the wall.
    – ndmweb
    Nov 21, 2012 at 20:18

2 Answers 2


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 )


# /etc/init.d/mountmedia

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


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

I experience a similar problem: The external ext4 harddrive is mounted fine initially with the rw flag, the device location being /dev/sda1. After some time of inactivity, the hdd goes to sleep, an then, it is sometimes not accessible any more. mount shows it as ro, and the directory is completely empty.

If I do an umount / mount, the drive works again as expected, but is now located at /dev/sdb1 (which is possible because I mount by UUID). So I assume that the workaround suggested earlier will work for me, but it's a bit ugly.

The cronjob can be done without a shell script by just one line:

*/5 * * * * [ `ls /media/data/ | wc -1` -lt 1 ] && { umount /media/data; mount /media/data }

Here http://forum.xbian.org/thread-1276-post-14699.html they seem to discuss the same problem, but it seems not to be solved yet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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