Message boards : Questions and problems : Use HDD for BOINC work files instead of SSD
Message board moderation
Author | Message |
---|---|
Send message Joined: 19 Jan 14 Posts: 79 |
My computer has an SSD (sda1) and a HDD (sdb1) built into it. It has the OS installed on the SSD (for speed), it has BOINC installed on the SSD (by choice), and I would like to use the HDD for everything involving frequent writing (and deleting) of data, in order to optimise the use of the SSD, by minimising the write cycles to the SSD. I have tried to configure BOINC in this way, but I cannot find any way to do it. Is it possible? I have recently started to see BOINC Notices such as "Test4Theory vboxwrapper needs 7629.39MB more disk space. You currently have 0.00MB available and it needs 7629.39MB." I have received notices very similar to this for several of my 8 BOINC projects. I have also received 'Low Disk Space' warnings from Ubuntu. Output from 'df -h': Filesystem Size Used Avail Use% Mounted on /dev/sda1 204G 48G 146G 25% / none 4.0K 0 4.0K 0% /sys/fs/cgroup udev 16G 4.0K 16G 1% /dev tmpfs 3.2G 1.2M 3.2G 1% /run none 5.0M 0 5.0M 0% /run/lock none 16G 264K 16G 1% /run/shm none 100M 36K 100M 1% /run/user /dev/sdb1 917G 350G 521G 41% /media/sdb1 The number of bad sectors on the SSD has been increasing noticeably in the last week, and I strongly suspect this to be due to the number of write operations being sent to the SSD every day, the vast majority of which result from running BOINC. Ubuntu 13.04 (64 bit) boinc 7.0.27+dfsg-5ubuntu0.12.04.1 boinc-manager 7.0.27+dfsg-5ubuntu0.12.04.1 |
Send message Joined: 20 Dec 07 Posts: 1069 |
You can leave the BOINC program directory on the SSD and place the BOINC data directory on your HDD. However, that's no configuration item but you'll have to uninstall BOINC, move (copy) the data directory to the desired path and reinstall BOINC pointing the installer at the new location via the admin option (third screen?). Gruß Gundolf Computer sind nicht alles im Leben. (Kleiner Scherz) |
Send message Joined: 5 Oct 06 Posts: 5130 |
You can leave the BOINC program directory on the SSD and place the BOINC data directory on your HDD. However, that's no configuration item but you'll have to uninstall BOINC, move (copy) the data directory to the desired path and reinstall BOINC pointing the installer at the new location via the admin option (third screen?). Sorry Gundolf - Linux doesn't have the same installer screens as the Windows version. But the principle is right. BOINC keeps all its files in a single 'DATA' directory (plus subdirectories), and in principle that directory can be placed on any drive. The current location should be reported in the startup messages in the BOINC event log. You should be able to move it from there to your HDD - make sure you set write and execute permissions as needed: 'data' in this context includes project application files. Then, you need to tell BOINC where to find the files you've moved. I *think* you should find BOINC configurations in a hidden .BOINC file in your home directory, but you may need further help from a Linux specialist to find that - I think the location may vary from distro to distro, |
Send message Joined: 20 Dec 07 Posts: 1069 |
Sorry Gundolf - Linux doesn't have the same installer screens as the Windows version. Yeah, my fault; didn't read the OP until the end Gruß Gundolf |
Send message Joined: 19 Jan 14 Posts: 79 |
BOINC keeps all its files in a single 'DATA' directory (plus subdirectories), and in principle that directory can be placed on any drive. That's what I expected. Then, you need to tell BOINC where to find the files you've moved. I *think* you should find BOINC configurations in a hidden .BOINC file in your home directory, but you may need further help from a Linux specialist to find that - I think the location may vary from distro to distro, That's what I haven't been able to find. Anyone got any ideas? |
Send message Joined: 29 Aug 05 Posts: 15569 |
Since you're using the version from repository, see http://boinc.berkeley.edu/wiki/Installing_BOINC_on_Ubuntu on where this version puts everything now. You'll want to change the working directory in /var/lib/boinc-client/ for BOINC data files and the slots and projects directories. You may want to check in /etc/init.d/boinc-client and /etc/default/boinc-client for configuration option files. |
Send message Joined: 19 Jan 14 Posts: 79 |
Thanks. I can relocate /var/lib/boinc-client/ but I won't do that until I am sure that I know how to change BOINC settings so that it is able to find it. I just stopped BOINC, and won't run it again until I know: (a) whether 226 bad sectors (in my SSD this morning) is significant; and (b) how I can get BOINC to use my HDD instead of my SSD for its working data directory. |
Send message Joined: 6 Dec 06 Posts: 118 |
Create a directory for the boinc data on the HDD, then copy the contents of /var/lib/boinc-client to that new directory. Make sure all of the files and subdirectories have owner:group set to boinc:boinc and edit the /etc/default/boinc-client file to point to the new data directory. The /etc/default/boinc-client file should have some lines like the following: # This is the data directory of the BOINC core client. BOINC_DIR="/var/lib/boinc-client" Just change /var/lib/boinc-client to your new data directory, save the file, then start the boinc client and check the Event log to see if the new directory is being used. |
Send message Joined: 2 Jan 14 Posts: 276 |
|
Send message Joined: 19 Jan 14 Posts: 79 |
Thanks. I found out yesterday via this question on AskUbuntu that there are a total of 250059095 blocks, which I understand also means sectors. I started the day today with 230 bad sectors (according to the Disks utility). I just checked and right now there are 232 bad sectors. 232/250059095=0.000000928, so I started BOINC running again. I used command sudo badblocks -v /dev/sda and got Checking blocks 0 to 250059095 Checking for bad blocks (read-only test): done Pass completed, 0 bad blocks found. (0/0/0 errors) which hopefully is a good thing. So I'll wait until the current tasks are finished and BOINC is not running before editing the /etc/default/boinc-client file to point to the new data directory. |
Send message Joined: 19 Jan 14 Posts: 79 |
I've thought that as well, and it would be ideal, but I'm not really in a position to do anything by trial and error at the moment. |
Send message Joined: 26 Feb 14 Posts: 1 |
Just pause the boinc client, copy the files from /var/lib/boinc-client to a new partition (or bind mount to a seperate folder) on your HDD (rsync -aAxX <source> <dest> should do it) and mount it to /var/lib/boinc-client. If you are really concerned about the life of your SSD I recommend you just move the entire /var directory to your HDD, as it is just as the name sounds (variable data --> many writes). Though if you do the whole folder then I recommend doing it when it is unmounted (i.e. from a live system or alternate OS). No need to mess with boinc settings or disrupt the filesystem hierarchy. While you're at it you could move /tmp as well (either to HDD or to tmpfs). |
Send message Joined: 19 Jan 14 Posts: 79 |
OK thanks. My computer broke shortly after my last message. The motherboard has been replaced, and I just got it back 6 days ago. I upgraded from Ubuntu 13.04 to Ubuntu 13.10 yesterday. I checked that BOINC Manager started OK, and it did. Today, I: 1. sudo mv /var/lib/boinc-client/ /media/sdb1/var-lib-boinc-client/ 2. Edited the /etc/default/boinc-client file to # This is the data directory of the BOINC core client. BOINC_DIR="/media/sdb1/var-lib-boinc-client/boinc-client" 3. Clicked the BOINC Manager icon in the Launcher. The icon flashes 6 times, and then stops flashing, but the BOINC Manager window doesn't appear. What the devil's going on now? Edit: PS If I revert the changes in steps 1 and 2, the BOINC Manager launches OK in step 3. |
Send message Joined: 20 Nov 12 Posts: 801 |
The icon tries to start the Manager in /var/lib/boinc-client. Either edit the icon or make a symlink from old dir to new dir. |
Send message Joined: 19 Jan 14 Posts: 79 |
Thanks. I've done that, and repeated my previous steps, and now the BOINC Manager starts. Hooray. With this sort of progress, one of these days I'll be able to add some projects again, and actually start using BOINC again! |
Send message Joined: 19 Jan 14 Posts: 79 |
The message that I originally wrote here belongs against another thread. I think this thread has reached its end. |
Send message Joined: 19 Jan 14 Posts: 79 |
No the thread hasn't reached its end just yet. I reinstalled Ubuntu 14.04 yesterday (as per this thread). Later, I: 1. Installed BOINC from the Ubuntu repository, which has version 7.2.42 of boinc-manager and boinc-client. 2. Added a project to test that BOINC works again, downloaded tasks (approximately 40 or 50 of them), and then Suspended the tasks shortly after they started calculating. 3. BOINC Manager>Menu>File>Exit BOINC Manager>Stop running tasks when exiting the BOINC Manager 4. sudo /etc/init.d/boinc-client stopin a terminal. 5. sudo mv /var/lib/boinc-client/ /media/el_gallo_azul/Storage/var-lib-boinc-client/in a terminal - Storage is my HDD. 6. cd /var/lib/in a terminal 7. sudo ln -s /media/el_gallo_azul/Storage/var-lib-boinc-client/boinc-client/in a terminal 8. sudo gedit /etc/default/boinc-clientin a terminal, and then edit the file in gedit such that # This is the data directory of the BOINC core client. 9. Had another look at the previous steps to make sure that everything looked ready to go. 10. Rebooted the computer. 11. Started boinc-manager - No tasks appeared. 12. sudo /etc/init.d/boinc-client startin a terminal - No tasks appeared CPU usage is about 1%, so boinc-client is not working on any tasks. My understanding was that the steps that I've shown in bold (steps 5, 7 and 8) would enable me to use my HDD for BOINC work files instead of my SSD, but they haven't. What am I missing? The only thing that I can think of is something to with users and their permissions, but I have no idea what the problem would be. |
Send message Joined: 8 May 10 Posts: 90 |
You don't judge by load. You look in logs. Second, #8 provided then #5, #6, #7 are completely unnecessary. I'm counting for science, points just make me sick. |
Send message Joined: 20 Nov 12 Posts: 801 |
Permissions are easy to check. Point your file manager to /media/el_gallo_azul/Storage/var-lib-boinc-client/boinc-client/ and check that the directory and all files are owned by user boinc. Doesn't hurt to check that user boinc has read and write permissions to each file. (That double boinc-client is confusing.) If the owner isn't correct run the following command to fix it: sudo chown -R boinc:boinc /media/el_gallo_azul/Storage/var-lib-boinc-client/boinc-client/ If it still doesn't work run the following: cd /media/el_gallo_azul/Storage/var-lib-boinc-client/boinc-client/ && sudo -u boinc boinc That starts BOINC as user boinc. All the messages go to your terminal instead of the various files. Copy-paste the messages here, maybe there's something useful in them. If the client doesn't crash but keeps running you can stop it by pressing Ctrl-C (it may take a few seconds to respond.) And whynot is right. If you need to know that BOINC is/isn't running either check the service status, look in System Monitor or run 'ps -A|grep boinc' . |
Send message Joined: 19 Jan 14 Posts: 79 |
Permissions are easy to check. Point your file manager to /media/el_gallo_azul/Storage/var-lib-boinc-client/boinc-client/ and check that the directory and all files are owned by user boinc. Doesn't hurt to check that user boinc has read and write permissions to each file. Yes I did that yesterday. The folder boinc-client and its subfolders have: Owner: BOINC core client Access: Create and delete files Group: boinc Access: Access files And whynot is right. If you need to know that BOINC is/isn't running either check the service status, look in System Monitor or run 'ps -A|grep boinc' . el_gallo_azul@W2600CR:~$ ps -A|grep boinc 7372 ? 00:00:10 boincmgr I'm afraid that I don't know what that question mark means. |
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.