|Will on 21 Dec 2015 10:24:44 -0800|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PLUG] Raspberry Pi NAS question, cont'd|
With the Pi... I can't stress enough that ensuring your power supply is up to snuff and the memory card are in proper running order is of top priority. I have seen some weird issues and the power supply that comes with the kits is usually insufficient. Since changing power supplies I have not lost memory cards and I have not seen weird lock up issues.
On Mon, 21 Dec 2015 11:16:18 -0500
Adam Zion <email@example.com> wrote:
> Since it occurred to me that the disconnects apparently happen during
> times of no activity- they don't happen, for instance, while I'm
> accessing the drive- I decided to create 2 new lines in the crontab:
> 0 0-23 * * * ls /media/drive1
> 5 0-23 * * * ls /media/drive2
> Unless I got the formatting wrong, this should run a quick ls of both
> drives hourly, drive1 on the hour and drive2 after. Thoughts?
That's exactly what I'd do. I'd either make it a daemon (because I init
with Runit, making such a daemon is trivial) or I'd make whatever
command mounts the USB drive spawn off the ls loop.
Personally, I'd do it much more often than an hour: even once a minute
would hardly affect your computer's overall performance. And I'd
personally perform a touch command to a file on the USB drive, just in
case a write is necessary to maintain the USB connection.
We all know that root causes should be solved rather than symptoms
coathangered. That being said, when it would take 15 minutes to write a
new daemon, as opposed to a day to find the root cause or $40 to
replace the maybe flaky hardware, I'll often make the daemon.
Back when I had Kmail, which regularly caused dbus-daemon instances to
use over 95% of CPU, I wrote a daemon to check all dbus-daemon
instances, and if any of them was greater or equal to 95% for two five
second intervals, my daemon killed it. Pretty? Of course not. But my
daemon allowed me to use Kmail for three additional years, and in a
world where all email clients suck, that was a big benefit.
Three years later Kmail changed to Kmail2, I switched to Claws-Mail,
and retired my daemon.
Kludge? Certainly. Am I glad I kludged? You bet!
November 2015 featured book: Troubleshooting Techniques
of the Successful Technologist
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug