Menu Close

Linux how to move BOINC data directory to network share

We use Raspberry Pi devices as little drive wiping stations. Getting BOINC installed on them was fairly straightforward using DietPi 64-bit version, but to reduce wear on the SD cards, we wanted BOINC to use a data directory located on a network share. Configuring this ended up being pretty frustrating, so the steps are copied here, hopefully you can get some use out of it. All of these commands should be run with sudo/as root.

      1. Install BOINC with a sudo apt install boinc
      2. If you are using an account manager, attach the boinc client with boinccmd –acct_mgr attach “https://bam.boincstats.com” username password followed by boinccmd –acct_mgr sync to sync it up
      3. Stop the BOINC service with service boinc-client stop
      4. mkdir /media/boincstorage/ #make your BOINC storage location
      5. mount -t cifs -o username=yourusername,password=”yourpassword”,uid=boinc //192.168.X.X/boincstorage /media/boincstorage & #mount your network share. Add this to /etc/rc.local to make it run at startup. You may need to do an apt install samba-tools for this to work
      6. nano /etc/default/boinc-client and make BOINC_DIR point to your new storage location (not entirely sure this step is needed)
      7. sudo cp -RL /var/lib/boinc-client/* /media/boincstorage/ #copy any existing BOINC data, WUs, etc to new network share
      8. rn /var/lib/boinc-client/* #delete old data to be sure BOINC isn’t using it
      9. do a systemctl edit boinc-client and add the following lines. This tells systemd to keep restarting the BOINC service every ten seconds, we do this because the network share may take a few seconds to mount at startup. This will keep trying to restart BOINC forever so just keep that in mind.
        [Service]
        Restart=always
        RestartSec=10
        StartLimitInterval=0
        ExecStart=
        ExecStart=/usr/bin/boinc –dir /media/boincstorage/
      10. Do a systemctl daemon-reload to tell systemd about your changes followed by a systemctl start boinc-client
      11. systemctl status boinc-client to verify that it’s running
Don't wait until it's too late, call us for a free quote!Get started
+