Moving BOINC directory to /home under Linux and systemd

Message boards : Documentation : Moving BOINC directory to /home under Linux and systemd
Message board moderation

To post messages, you must log in.

Graeme Hewson

Send message
Joined: 6 Jun 06
Posts: 12
United Kingdom
Message 100356 - Posted: 20 Aug 2020, 8:51:40 UTC

I run an Ubuntu derivative, and my machine has two partitions, / and /home. BOINC is installed from a package which sets its working directory to be /var/lib/boinc-client. However, there wasn't enough space here to run a particular BOINC project, so I wanted to set up a new directory under /home as BOINC's working directory.

I found these instructions, but unfortunately they're now out of date as my Linux distribution uses systemd (as indeed do most Linux distributions), which ignores /etc/default.

Mentioned in the above thread is also the possibility of installing BOINC from the Berkeley download instead of using a package. However, I wanted to continue with the package, and that's what the BOINC project recommends, too (as well as a couple of other methods).

I also found instructions which involve creating a symbolic link from /var/lib to the new directory.

In the end I decided to embrace systemd, and modify the default configuration. Here's what I did, based on the first set of instructions above.

  1. Stop the boinc client
    sudo systemctl stop boinc-client

  2. Copy the existing data to the new location
    sudo cp --archive --recursive --interactive /var/lib/boinc-client/. /home/boinc-client

  3. Change boinc's home directory
    sudo usermod --home /home/boinc-client boinc

  4. Modify the package's settings (see below)
    sudo systemctl edit boinc-client

  5. Start the boinc client
    sudo systemctl start boinc-client

Modifying the boinc-client unit

The systemctl edit command invokes an editor on a new file, a drop-in snippet which overrides part of the existing systemd unit file. Enter the following lines and save the file:


When you save the snippet, systemd reloads the unit. You can see the whole unit thus:
systemctl cat boinc-client.service

(There's no need to run the command with sudo.) Note that the changes are shown below the original configuration.
ID: 100356 · Report as offensive
Help desk expert

Send message
Joined: 28 Jun 10
Posts: 2590
United Kingdom
Message 100357 - Posted: 20 Aug 2020, 10:32:01 UTC - in response to Message 100356.  


Another alternative is to have /var/lib/boinc-client as its own partition.
ID: 100357 · Report as offensive
ProfileKeith Myers
Volunteer tester
Help desk expert

Send message
Joined: 17 Nov 16
Posts: 878
United States
Message 100363 - Posted: 20 Aug 2020, 19:05:13 UTC

Very nice! The old move directions are very outdated and don't work. Will be nice to point people to this post when the question arises on how to move BOINC which is a very regular post.
ID: 100363 · Report as offensive

Send message
Joined: 15 Nov 20
Posts: 1
Message 101586 - Posted: 15 Nov 2020, 23:51:46 UTC

Thank you very much!
ID: 101586 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5095
United Kingdom
Message 101591 - Posted: 16 Nov 2020, 9:52:34 UTC

Thanks, Graeme. I missed this the first time round, but my eye was caught by the new post.

That certainly sounds like a worthwhile contribution to the documentation and BOINC's arsenal of tools.

I have two slight worries, though.

1) The instructions are to 'copy' the data directory. That's wise while you're in the process of upgrading, but omce the new version is settled and running, you'll still have the old copy lying around, using space and waiting to trip up the unwary. BOINC data is ever-changing, and not amenable to incremental or transactional backup. A backup data directory is very little use unless very recent - so it might be better to delete it and recover the space soon after performing this move, after verifying that it's working, and before you forget what you did.

2) What happens when a new version is released through your distro? Does systemd preserve local edits like this, or will an upgrade force a hard reset to /var/lib/boinc-client? That would be confusing, to say the least.

As it happens, we're having a very hard look at various systemd issues in, with several of the main Linux players participating. I'll cross reference this thread for them, and ask the same questions: if we can get confirmation from the package maintainers, I'll see if we can get official documentation for this.
ID: 101591 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5095
United Kingdom
Message 101606 - Posted: 17 Nov 2020, 15:17:30 UTC

Relayed upstream to, and drawn the attention of the main distro maintainers.
ID: 101606 · Report as offensive

Message boards : Documentation : Moving BOINC directory to /home under Linux and systemd

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.