Message boards : Questions and problems : Move data dir on Ubuntu ?
Message board moderation
Author | Message |
---|---|
Send message Joined: 25 Nov 19 Posts: 1 ![]() |
Hi all, I've been searching for a solution, with no success so far. On an Ubuntu 18.04 server with boinc-client 7.9.3+dfsg-5ubuntu2 installed, I do not want the boinc data dir to be on /var/lib/boinc-client but somewhere else, on another partition, say /home/boinc-client where there's far more free space. There's no installation menu, like in Windows from what I could read, no easy way to specify where this expanding directory should be stored. Changing the BOINC_DIR value in /etc/default/boinc-client is not enough, even with a symlink in /var/lib to the new location. Changing the WorkingDirectory variable in /lib/systemd/system/boinc-client.service neither (yes, with systemctl daemon-reload...) Replacing the home dir in /etc/passwd for boinc from /var/lib/boinc-client to /home/boinc-client ? Not working better... Whatever I've been trying so far, I get this sort of logs in syslog: Nov 23 11:46:54 sd-157532 systemd[1]: Started Berkeley Open Infrastructure Network Computing Client. Nov 23 11:46:54 sd-157532 systemd[15221]: boinc-client.service: Changing to the requested working directory failed: No such file or directory Nov 23 11:46:54 sd-157532 systemd[15221]: boinc-client.service: Failed at step CHDIR spawning /usr/bin/boinc: No such file or directory Nov 23 11:46:54 sd-157532 systemd[1]: boinc-client.service: Main process exited, code=exited, status=200/CHDIR Nov 23 11:46:54 sd-157532 systemd[15229]: boinc-client.service: Changing to the requested working directory failed: No such file or directory Nov 23 11:46:54 sd-157532 systemd[15229]: boinc-client.service: Failed at step CHDIR spawning /bin/rm: No such file or directory Nov 23 11:46:54 sd-157532 systemd[1]: boinc-client.service: Control process exited, code=exited status=200 Nov 23 11:46:54 sd-157532 systemd[1]: boinc-client.service: Failed with result 'exit-code'. Has anyone ever been able to move this boinc-client directory somewhere else /var/lib on a Ubuntu's installation? And how? Thanks for reading. manu |
![]() Send message Joined: 28 Jun 10 Posts: 2842 ![]() |
The easiest way to do this is prior to installing BOINC set up a partition just for BOINC. So long as it is only not wanting it on the same partition as the OS giving it it's own partition and labelling it as /var/lib/boinc-client lets you put it on whichever disk you want without any of the security issues I have been told about (but not looked into so I don't know how valid they are) of using your home directory. |
Send message Joined: 23 Apr 12 Posts: 77 |
Disclaimer: I haven't done this myself and I'm writing this as a Debian user. Ubuntu is very similar I suppose. On an Ubuntu 18.04 server with boinc-client 7.9.3+dfsg-5ubuntu2 installed, I do not want the boinc data dir to be on /var/lib/boinc-client but somewhere else, on another partition, say /home/boinc-client where there's far more free space.Note /home/boinc-client. Changing the BOINC_DIR value in /etc/default/boinc-client is not enough, even with a symlink in /var/lib to the new location./etc/default/boinc-client is only for the sysvinit startup script. Creating the symlink(s) is a good idea in case the path is hard-coded somewhere. Changing the WorkingDirectory variable in /lib/systemd/system/boinc-client.service neither (yes, with systemctl daemon-reload...)That looks like the way to go. Let's check the service file: [Unit] Description=Berkeley Open Infrastructure Network Computing Client Documentation=man:boinc(1) After=network-online.target [Service] ProtectHome=true Type=simple Nice=10 User=boinc WorkingDirectory=/var/lib/boinc ExecStart=/usr/bin/boinc ExecStop=/usr/bin/boinccmd --quit ExecReload=/usr/bin/boinccmd --read_cc_config ExecStopPost=/bin/rm -f lockfile IOSchedulingClass=idle [Install] WantedBy=multi-user.target And now man 5 systemd.exec: [...] ProtectHome= Takes a boolean argument or the special values "read-only" or "tmpfs". If true, the directories /home, /root and /run/user are made inaccessible and empty for processes invoked by this unit. [...] Hm, have you tried any other place? |
![]() ![]() Send message Joined: 17 Nov 16 Posts: 906 ![]() |
I have moved my BOINC distro version on my Jetson Nano to /home for simplicity but it was a lot of work. If I could have used the much simpler TBar AIO BOINC installer I would have. But that is for x86 platform only. Since you just have Ubuntu, I would highly recommend using the TBar AIO installer which is a pre-packaged version of BOINC 7.14.2 for Ubuntu 14.04 - 19.04. You just unpack it somewhere in your /home folder. No permissions issues since you own /home. It has the Nvidia special gpu app and the optimized apps for Seti with the Seti project already installed. But you can just use the BOINC part of it and delete the Seti directory if you don't run Seti. Then add whatever your projects are using the normal method via the Manager. http://www.arkayn.us/lunatics/BOINC.7z |
Send message Joined: 14 Jan 20 Posts: 1 ![]() |
Right there with you Manu... seems like a rather obvious oversight to not be able to assign a data location of our own choosing. I've been working on this for a couple weeks now with no success. |
![]() Send message Joined: 29 Aug 05 Posts: 15632 ![]() |
BOINC has the option to assign a data directory of your own choosing. To do so, start the client with <code>boinc --dir path-to-home-directory</code>, e.g. boinc --dir ./home/boinc I'm about sure this was an option in cc_config.xml as well, but I can't find it there any longer. Of course make sure that there is a directory there where you point. Copy everything over from the original directory. |
![]() Send message Joined: 28 Jun 10 Posts: 2842 ![]() |
Is there any reason you can't just make a partition /var/lib/boinc/ and then it will instal there? Assuming it works you can put the partition on any physical disk you like. |
![]() ![]() Send message Joined: 27 Jun 08 Posts: 642 ![]() |
You might want to add the "ReadWritePath" and also the "EnvironmentFile" as shown below. Change the paths "/var/lib/boinc" to what you want and move the filles there. After editing "/lib/systemd/system/boinc-client.service" you will have to run "systemctl daemon-reload" A discussion of systemctl is here https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units if something goes wrong use this for debugging journalctl -xe I have not moved my files but I have used the environment file at "etc/default/boinc-client" to pass parameters to boinc. Post if problems and also confirm if you got it working. [Unit] Description=Berkeley Open Infrastructure Network Computing Client Documentation=man:boinc(1) After=network-online.target [Service] Type=simple ProtectHome=true PrivateTmp=true ProtectSystem=strict ProtectControlGroups=true ReadWritePaths=-/var/lib/boinc -/etc/boinc-client Nice=10 User=boinc WorkingDirectory=/var/lib/boinc ExecStart=/usr/bin/boinc EnvironmentFile=/etc/default/boinc-client ExecStop=/usr/bin/boinccmd --quit ExecReload=/usr/bin/boinccmd --read_cc_config ExecStopPost=/bin/rm -f lockfile IOSchedulingClass=idle |
Copyright © 2025 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.