Message boards : Questions and problems : Why isn't there a simple option in BOINC manager to change data directory.
Message board moderation
Author | Message |
---|---|
Send message Joined: 25 Sep 14 Posts: 4 |
I'm sure there are a lot of people who have SSDs and would want to move the working directory (without any hassle) to a location on an HDD. Why isn't there a simple option to do so? |
Send message Joined: 29 Aug 05 Posts: 15573 |
Windows: Uninstall BOINC. Move data directory. Install BOINC. In the third screen of the installer, click Advanced. Change path of Data directory to where you moved the data directory. Continue installation. Macintosh OSX: Moving BOINC Manager or BOINC Data Folder to a Different Drive (link) Linux: Really depends on if you got Berkeley BOINC, or that you have it from repository. If Berkeley BOINC, the archive unpacker will move everything to your home directory, but nothing that's in your way to move it to elsewhere after that. Installing BOINC: Berkeley installer writes: The BOINC working directory can be moved elsewhere as you like, and can even be renamed. One common choice is ~/.boinc, since files and directories with names that begin with "dot" do not show up by default in Unix directory listings. Whatever the name, everything related to the BOINC client is contained within that directory, and you should always run the client and the manager from that working directory. |
Send message Joined: 6 Dec 06 Posts: 118 |
I'm sure there are a lot of people who have SSDs and would want to move the working directory (without any hassle) to a location on an HDD. Why isn't there a simple option to do so? It's not really that difficult on Linux even with an install from the repository. First create a directory on the HDD where you want the data directory to be, i.e. /home/martianstorm/boinc_data (This example is using martianstorm as your username. If it is different, then substitute the username you actually use. Also, you don't need to use underscore like I did, as I just think it makes for easier reading.) Then from the terminal, 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/* /home/martianstorm/boinc_data/ 3. Make sure permissions are set correctly = sudo chown boinc:boinc -R /home/martianstorm/boinc_data/* 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="/home/martianstorm/boinc_data" and save the file then exit the text editor. 5. Start the boinc client = sudo service boinc-client start You can check the BOINC Manager's Event Log to see if the data directory being used changed to /home/martianstorm/boinc_data. |
Send message Joined: 25 Sep 14 Posts: 4 |
I read through all these before I posted the topic, and as you can see, there is no such "convenient" way of managing it in Linux as there is in Windows (kudos to the developers), even more so, there's not even a HOWTO as there is one for MacOS. I firmly believe it is not reasonable to expect users who voluntarily contribute to overcome such hurdles to accomplish something so basic. |
Send message Joined: 25 Sep 14 Posts: 4 |
Thank you, I really do appreciate your help. You saved me an awful lot of time. I'm not completely a beginner in Linux, I'm rather not familiar with the BOINC client for Linux. |
Send message Joined: 6 Jul 14 Posts: 94 |
Not to be rude Ageless, but I believe the question asked was "Why is there not a simple option to do this?" Yes you provided instructions on how to change it, but this requires a reinstallation of BOINC. There should be an option to change the data directory after installation. |
Send message Joined: 29 Aug 05 Posts: 15573 |
In Windows Vista/7/8/8.1/all the server versions you can't just move directories around as then you break read/write permissions on the directory. Hence the uninstall/move/reinstall sequence. In Linux you can move the data directory to wherever you want. Well, as long as you used the Berkeley version. The repository version may be a little more difficult to move around as depending on the Linux distribution, its files are written to multiple directories. For the question of how to move the data directory/directories there, best ask the package maintainer. The OP may have asked for "Why is there not a simple option to do this?", but at the same time neglected to state what operating system they have (posting it in another thread doesn't count), which is why I posted how to do it for every OS. And those are the simplest ways. As for the Wiki and it missing things, if you (general you) want to add things like this, ask David Anderson for an account and go write to your heart's content. It's always easy to blame others (or me) that they didn't add it to the Wiki, but then you (general you) didn't either. |
Send message Joined: 16 Sep 13 Posts: 82 |
So is there no Windows option to tell the client to look in a new directory either by changing an environment variable or command line parameter? I'm attempting to get a portable installation (per http://boinc.berkeley.edu/dev/forum_thread.php?id=8617) working and have succeeded with 6.10.60 just by copying over the exe/dll files over the earlier PortableApp.com version by Oluf. One of my machines is running 6.10.60 as a portable install now. Attempting to get this working for 7 without relying on registry entries has been a dismal failure so far. Version 7 is giving me a catch 22 when attempting this method (http://boincfaq.mundayweb.com/index.php?view=292&sessionID=c39e0187061d3b139caa097dc14f713c) as it is looking for a cc_config.xml in the data folder, instead of the home folder, and that file is where to store the new data directory path (if that still works). The --dir command doesn't redirect to a new data folder, just application home. The BOINC_DIR environment variable (seen on Unix and mentioned earlier in this thread) does not seem to be looked at in Windows. So SETing a value for it in a calling .bat file has no effect. Maybe there is a hidden Environment Variable it does look at? Attempted this method in the final post on this thread (http://boinc.berkeley.edu/dev/forum_thread.php?id=1351#6743) with no luck but perhaps I made a mistake in the command passing? The only way to succeed, that I can think of ATM, would be to merge a registry file (BoincConfig.reg) using a calling batch file to change the data directory path in the registry. If anyone knows of a hidden switch, proper environment variable name or other method to tell version 7 where it's data directory is on startup, without relying on the registry, please let me know as that would be a more elegant solution. EDIT: This is a solution I'm attempting but it's not reliable yet. BoincStart.bat ; @ECHO OFF ; CLS ; SET BoincClient=E:\BoincPortable\App\BOINC ; REGEDIT /s ".\BoincConfig.reg" ; PING -n 4 -w 1000 localhost >NUL 2>&1 ; REGEDIT /s ".\BoincConfig.reg" ; PING -n 4 -w 1000 localhost >NUL 2>&1 ; START "" "%BoincClient%\boincmgr.exe" ; REGEDIT /s ".\BoincErase.reg" ; EXIT I can generate some batch files that will create the BoincConfig.reg file if the user gives a data and client directory inputs, eventually: I'm attempting to get version 7 to work as a portable installation so that it can work even after booting from different OS'es or while installed on a USB stick. Only for use on machines that a person has permission to use. Like as a burn-in program for stress testing, over night, client machines a technician is repairing (my old profession). |
Send message Joined: 20 Nov 12 Posts: 801 |
BOINC/boinc --dir boincdata appears to be working just fine, at least on Linux. You'll also need to tell Manager where the data directory is: BOINC/boincmgr --datadir boincdata If you want Manager to start the client you need to tell the Manager where the client is and you need to tell the Manager to tell the client where the data directory is: BOINC/boincmgr --clientdir=BOINC --datadir=boincdata --boincargs="--dir boincdata --redirectio" On Windows (and Mac) you'll probably need to include '--insecure' in client's command line (or inside --boincargs). Maybe also in Manager's command line. Also, <data_dir> in cc_config.xml has been removed from 7.4.24 and newer. |
Send message Joined: 16 Sep 13 Posts: 82 |
(Assume Windows 7 for the entire discussion ahead.) BOINC/boinc --dir boincdata I'll repeat the attempt but it seemed to fail the two attempts I tried it while the registry entries were in.
That command isn't in the Boincmgr /?list. I need to lookup the online documentation. It maybe only a Linux distro implemented switch.
The Boincmgr.exe starts the client automatically in version 6.0.17 and beyond, that I have worked with, but I'll play around with those and see if it works in Windows 7. The ver 7 clients are using the registry information to find their data sets. If the registry is wiped of info then they default to current directory as the boincmgr.exe or boinc.exe is called. So in a batch file if you use CD /d %BOINCDATA% START "" "%BOINCCLIENT%\BOINCMGR.exe" Then it will search for the data sets in that directory. So my solution was to use a batch file to erase the registry of BOINC info then call from the data directory: Boincstart.bat REGEDIT4 ; @ECHO OFF ; CLS ; SET BoincClient=E:\BoincPortable\App\BOINC ; SET BoincData= E:\Boincportable\DATA ; CD /d %BoincData% ; REGEDIT /s "%~f0" ; START "" "%BoincClient%\boincmgr.exe" ; EXIT [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders] [-HKEY_LOCAL_MACHINE\SOFTWARE\Space Sciences Laboratory, U.C. Berkeley] [-HKEY_CURRENT_USER\Software\Space Sciences Laboratory, U.C. Berkeley] This was used after using boinc_installer.exe /v /a c:\temp\boinc xcopy c:\temp\boinc\app\boinc\*.* e:\portableapps\boincportable\app\boinc\ which, strangely enough, added registry information pointing to the temp directory. I copied over the appropriate exe/dll files to the Portable Apps BoincPortable directory and ran the batch file. Otherwise it tried to use the temp folder as a data directory, which was baffling, as I assumed a .msi unpack wouldn't modify the registry. Looking in the registry, which was clean before unpack, I found added information about install and data paths. Using the command parameters will be much easier if they work on Windows implementations.
Good move since it was useless as cc_config.xml is stored there. ================================== ;TLDR On Windows installs, version 7 uses registry information to find it's data and client install folders. If the registry is wiped of all information then it assumes the current directory when it is started. A batch file CD /d %boincdata% start "" "%boincclient%\boincmgr.exe" will work if you delete all registry entries and that can be accomplished with the earlier batch file. After installing a new OS, the registry will be empty already so the simple batch file will start BOINC fine. Not all compiled versions have the --datadir switch implemented. |
Send message Joined: 20 Nov 12 Posts: 801 |
You'll also need to tell Manager where the data directory is:BOINC/boincmgr --datadir boincdata Well well. Looks like someone got a great idea that Windows, Mac and Unix versions should each have different way to determine the data directory. BOINC/boinc --dir boincdata This time, after reading the code, I think adding --allow_multiple_clients to the command line should make the client ignore anything that's in the registry. Unfortunately I can't see any workarounds for the Manager. The Boincmgr.exe starts the client automatically in version 6.0.17 and beyond, that I have worked with, but I'll play around with those and see if it works in Windows 7. The ver 7 clients are using the registry information to find their data sets. If the registry is wiped of info then they default to current directory as the boincmgr.exe or boinc.exe is called. One catch with that, as far as I can tell. Both client and Manager try to get the directory from registry first. If the registry key isn't there, they will try the default directory %CSIDL_COMMON_APPDATA%\boinc (sorry, I forget what the actual environment variable is). Only if both steps fail then the current directory is used. And, 7.4+ Manager store its own logs into %APPDATA%\BOINC. And still more, Manager stores its preferences in registry. No way around those. This was used after usingboinc_installer.exe /v /a c:\temp\boinc xcopy c:\temp\boinc\app\boinc\*.* e:\portableapps\boincportable\app\boinc\ I can't really say anything about the installer other than there has been some changes done to it in 7.4 versions. Maybe the new versions behave better. |
Send message Joined: 23 Apr 12 Posts: 44 |
Not a good move at all. It was working perfectly on Windows when using multiple clients. |
Send message Joined: 16 Sep 13 Posts: 82 |
The newest registry snapshot shows a much larger footprint than say the 7.2.42 version. A lot of entries in the component section. I had to purge the registry of all BOINC entries before it would work from the portable apps directory on my Dell m6500 laptop. It worked on the HP after the second restart of my batch file deleting the main BOINC application registry entries (component, compatibility and uninstall registry sections are left alone by the batch file). |
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.