Message boards : Questions and problems : Failed to move data directory in Ubuntu
Message board moderation
Author | Message |
---|---|
Send message Joined: 24 Jun 17 Posts: 1 ![]() |
I am running Ubuntu 16.04 and I hope to move data directory from /var/lib/boinc-client, which is on my SSD, to somewhere on my HDD. I created a dir on HDD and copied everything from /var/lib/boinc-client. I then changed BOINC_DIR=/var/lib/boinc-clientin both /etc/init.d/boinc-client and /etc/default/boinc-client. However, BOINC log still shows data directory is /var/lib/boinc-client. What am I missing? Is there something else that needs to be changed? |
Send message Joined: 20 Nov 12 Posts: 801 ![]() |
I'm not sure how things were in 16.04 but currently BOINC_DIR or the whole config file for that matter is not used. Instead of trying to tell BOINC to use some other data directory just make /var/lib/boinc-client a symlink to the real directory. Remember that the HDD must be mounted at boot time before BOINC starts and you must have permissions set so that 'boinc' user can access the new location. |
Send message Joined: 4 Jul 12 Posts: 321 ![]() |
Ubuntu 16.04 is using systemd not initv so you might have more luck changing the directory in /lib/systemd/system/boinc-client.service. You need to reload the systemd config (systemctl daemon-reload) and restart boinc-client (systemctl restart boinc-client.service) after that. Be aware that any package update will overwrite your changes again. If you don't want this please open a bug report with Ubuntu so the package maintainer may make this configurable. A symlink as Juha described is also possible but you then need to make sure all filesystems are mounted before systemd starts BOINC. |
Send message Joined: 20 Nov 12 Posts: 801 ![]() |
I think it would be necessary to make sure the filesystem is mounted in systemd service option as well. Looking at the systemd.unit manual page I think the correct option to use is RequiresMountsFor. Example 2 in the manual page also describes how to override unit files. What I don't like about changing the directory via config file is that the change is not made everywhere. /var/lib/boinc-client will still be boinc user's home directory and at least NVIDIA's drivers like to write some cache data in users' home directories. The directory is also in Manager's .desktop file and changing the directory may complicate launching the Manager. |
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.