The maybes;
It maybe that you don't have the drivers installed on your RPi for the partition style that your hard drive uses. I had this issue with a Windows formatted hard drive but once I installed the ntfs
drivers and beguan using UUIDs instead of relotive paths everything cleared up.
It maybe that your hard drive is not supplying enough power but that should only be the case if your hard drive is not externally powered. The advice you found at the link in your OP is only applicable if the drive is USB powered only & your RPi's ower supply is capible of enough current to handle both powering itself and prifferals. If you follow thos direction without proper power then you risk bad read/writes to the attached hard drives as well as damaging your RPi's OS because cutting power during writes to it's system files (like running apt-get upgrade
) can corupt vital data.
The solutions I use on my RPi;
I searched for the missing drivers by using apt-cache search ntfs
(ntfs
because that was the format giving me the most issues) and then installed the missing drivers with apt-get install <packages>
. By using the bellow blkid
command with a little grep
ing magic you can list a hard drive's partition format before attempting to mount. Hint awk '{print $3}'
just after the grep -E 'UUID'
will just print the verias partition formats that are plugged in.
The command I use to put the UUID into the /etc/fstab
file shoud be tested and when it is outputting the info for your hard drive add | sudo tee -a /etc/fstab
to the end of the bellow command to have it place the output (commented) into your fstab file. Then sudo nano /etc/fstab
and remove the leading #
to uncomment and reload with sudo mount -a
to have changes take effect. I use this command and then nano
because placing uncommented lines into fstab is just asking for some roge task (or car/branch knocking into power lines) to reboot my RPi before I have a chance to ensure that is error free.
: ${USER?} && blkid | grep -E "/dev/s" | grep -E "UUID" | awk '{print $3,$2,$4" uid=USER,gid=USER,umask=0022,sync,auto,nosuid,rw,nousr, 0 0"}' | sed -e 's/UUID=/#UUID=/' -e 's/LABEL=/\/media\//' -e 's/"//g' -e 's/=\([^" >][^ >]*\)/="\1"/' -e 's/TYPE=/ /' -e "s/USER/$USER/g"
- Before scedualled reboots or power dows I'll also re-modify the fstab file to re-comment out external hard drives. This saves me lots of time when powering back up and reduces the chances of something within the RPi's boot processes from barfing from loss of power (due to reading the external drives) or from something on the drives causing errors.
By using the UUIDs I now no longer have issues with other drive formats becoming un-responcive either. However, if not used for a day or two the drives that are slow/old will take a second or two to become responcive to ls -hal /media/<drive_name>
and other read commands. But once accessed once and spun up further commands to read and write run smoothly. Based off this I can say that there is more than likely some kind of power drop to the USB ports that hasn't been active for a while but when mounted such that it'll always mount to the correct directory it should wake back up when re-accessed.