Post
Topic
Board Mining (Altcoins)
Re: Official FutureBit Apollo LTC Image and Support thread
by
psycodad
on 06/01/2020, 17:26:53 UTC
Regarding SD card lifespan: I started to use fstrim on the rootfs weekly from cron, but it is too early to judge if that has any beneficial effects on SD card reliability in the Apollo.
Will post again, once I have a record of 2-3 months using it.

Quoting myself...
From my limited testing with my 2 Apollos this definitely help to improve stability a lot. Didn't had to restart a single time since I have the below in /etc/crontab:
Code:
5  0 * * 0 root /usr/bin/ionice -c 3 /sbin/fstrim -v / | logger

This fstrims the SD card once a week and logs the outcome to syslog.

I need this...

My Apollo nº 4 hangs (stop mining) randomly every few days (sometimes 1 or 2 days, max it runs about a week). This also happen to my Apollo nº 3, but less frequentely. Good my Apollos nº 1 and nº 2 runs for weeks. I never need to reflash. To "restart" miner is enough to get it running again.

May you give me some instructions about to add fstrim? Sorry, here a Windows user  Sad

Sure, first get rid of Windows! (Nah, just kidding  Wink)

I don't claim this will solve your problems, but it has improved my situation a lot. It shouldn't do any harm but I still recommend you to try it first with only one of your Apollos to see if it works out for you.

If you have Windows 10, I believe ssh should be part of it already, otherwise get yourself Putty.

Open a CMD window and connect to your Apollo where you want to try it out:
Code:
ssh futurebit@192.168.1.101
(Replace 192.168.1.101 with the IP of your Apollo in question.

Login as user futurebit with password futurebit and then sudo to root (I didn't manage to get done in one line with sudo):
Code:
sudo su -

Now as root issue the following command (make sure to copy-paste it correctly!):
Code:
echo -e "\n# weekly fstrim\n5 0\t * * 0\troot\t/usr/bin/ionice -c 3 /sbin/fstrim -v / | logger" >> /etc/crontab

Then check if crontab looks like it should by
Code:
cat /etc/crontab

It should like:
Quote
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user   command
17 *   * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6   * * *   root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6   * * 7   root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6   1 * *   root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

# weekly fstrim
5 0      * * 0  root    /usr/bin/ionice -c 3 /sbin/fstrim -v / | logger

If all is fine, just logout - no reboot or anyhting needed, fstrim will run next sunday at 5min past midnight.

HTH