Trying to move boinc-client folder to a USB flash drive

Questions and Answers : Unix/Linux : Trying to move boinc-client folder to a USB flash drive
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile Sean
Volunteer tester

Send message
Joined: 10 Aug 00
Posts: 19
Credit: 54,831,333
RAC: 61,756
United States
Message 1839214 - Posted: 31 Dec 2016, 20:22:42 UTC

I've recently assembled a new system (i7-6700T, 32GB ram, M.2 SSD, Ubuntu 16.04 LTS) and I'm trying to relocate the boinc-client folder to a USB flash drive to reduce write activity on the SSD (I'd rather let it chew on an $8 flash drive than a $200 SSD).

I have successfully moved the boinc-client folder to my home directory via the following:
    sudo mv /var/lib/boinc-client /home/me/boinc-client
    sudo ln -s /home/me/boinc-client /var/lib/boinc-client


And that is what I have running at the moment.

However, when I try (from a fresh install):

    sudo mv /var/lib/boinc-client /media/me/usbdrive/boinc-client
    sudo ln -s /media/me/usbdrive/boinc-client /var/lib/boinc-client


Boinc manager is unable to connect to the client. The manager screen will sit on "Connecting to client" for minute or so before popping up an error along the lines of "The client has closed unexpectedly several times in the last several minutes, try again?"
The USB drive is formatted to EXT4 and it does appear that the move command and link command are working correctly. Permissions also appear to be correct for the client folder on the flash drive.

At the risk of making this more complicated, I do have BOINC running on two other older Ubuntu systems. On the older machines, I just downloaded the .sh file and then extracted it and ran BOINC out of my home folder. I tried this on the new system, but unfortunately it looks like version 7.4 wants libraries that are not present in Ubuntu 16 and I could not find anywhere to download a version 7.6 .sh directly (had to install thru Ubuntu software center).

ID: 1839214 · Report as offensive
Profile Sean
Volunteer tester

Send message
Joined: 10 Aug 00
Posts: 19
Credit: 54,831,333
RAC: 61,756
United States
Message 1839299 - Posted: 1 Jan 2017, 2:07:51 UTC - in response to Message 1839214.  

So I've tried a different approach:
    1. Stop the boinc client = sudo service boinc-client stop
    2. Copy the existing data to the new location = sudo cp -R /var/lib/boinc-client /media/me/usbdrive/boinc-client
    3. Make sure permissions are set correctly = sudo chown boinc:boinc -R /media/me/usbdrive/boinc-client/*
    4. Edit the /etc/default/boinc-client file to point to the new data directory = sudo gedit /etc/default/boinc-client and look for the entry that starts with # This is the data directory of the BOINC core client. Add an # in front of the BOINC_DIR="/var/lib/boinc-client" line and then add the following below that line BOINC_DIR="/media/me/usbdrive/boinc-client" and save the file then exit the text editor.
    5. Start the boinc client = sudo service boinc-client start



I also edited the init.d file similar to what was done in step 4.
BOINC manager starts up fine now and appears to be working, but the event log is still saying "Data directory: /var/lib/boinc-client"

Is there something else I'm missing?

ID: 1839299 · Report as offensive
Profile Sean
Volunteer tester

Send message
Joined: 10 Aug 00
Posts: 19
Credit: 54,831,333
RAC: 61,756
United States
Message 1839650 - Posted: 2 Jan 2017, 18:21:07 UTC - in response to Message 1839299.  
Last modified: 2 Jan 2017, 19:03:29 UTC

Perhaps making a little progress figuring this out, but I'm still not sure why it isn't working the way I think it should...

I went back to trying the symlink method:
    boinc-client folder moved to the flash drive
    symlink created pointing /var/lib/boinc-client to the boinc-client directory on the flash drive
    restart the boinc service and launch the manager
    result = boinc manager stuck on trying to connect to the client



Now I discovered a bit by accident running "boinc" from the command line (with or without sudo) gives me some useful information about the data directory:

    02-Jan-2017 10:53:07 [---] Data directory: /home/me
    Why is it trying to use my home directory? (edit: figured out it's just going with the current active directory)



OK, so now if I run "sudo boinc --dir /media/me/usbdrive/boinc-client" I get:

    02-Jan-2017 11:13:05 [---] Data directory: /media/me/usbdrive/boinc-client
    Looking good so far...
    Launch the manager and success!



Maybe I can just change the command line for the launcher icon to force the directory?

ID: 1839650 · Report as offensive
Profile Sean
Volunteer tester

Send message
Joined: 10 Aug 00
Posts: 19
Credit: 54,831,333
RAC: 61,756
United States
Message 1839678 - Posted: 2 Jan 2017, 19:39:15 UTC - in response to Message 1839650.  

It's working now! For anyone who might be wondering:
    sudo gedit /usr/share/applications/boinc-manager.desktop
    Changed the Exec= line to "Exec=boincmgr -d /media/me/usbdrive/boinc-client"
    Made sure the boinc-client folder permissions were set "sudo chown -R boinc:boinc /media/me/usbdrive/boinc-client"
    Start the boinc service, launch the manager, and it's working with the data directory on the usb drive


For whatever reason, I still have to manually restart the boinc-client service after rebooting, but I can live with that. I should only be rebooting for updates and power outages.

ID: 1839678 · Report as offensive

Questions and Answers : Unix/Linux : Trying to move boinc-client folder to a USB flash drive


 
©2017 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.