Message boards : Documentation : Moving BOINC directory to /home under Linux and systemd
Message board moderation
Author | Message |
---|---|
Send message Joined: 6 Jun 06 Posts: 12 |
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.
[Service] ProtectHome=tmpfs BindPaths=/home/boinc-client ReadWritePaths=-/etc/boinc-client WorkingDirectory=/home/boinc-client 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. |
Send message Joined: 28 Jun 10 Posts: 2707 |
Nice! Another alternative is to have /var/lib/boinc-client as its own partition. |
Send message Joined: 17 Nov 16 Posts: 890 |
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. |
Send message Joined: 15 Nov 20 Posts: 1 |
Perfect! Thank you very much! |
Send message Joined: 5 Oct 06 Posts: 5129 |
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 https://github.com/BOINC/boinc/pull/4071, 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. |
Send message Joined: 5 Oct 06 Posts: 5129 |
Relayed upstream to https://github.com/BOINC/boinc/issues/4104, and drawn the attention of the main distro maintainers. |
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.