Use HDD for BOINC work files instead of SSD

Message boards : Questions and problems : Use HDD for BOINC work files instead of SSD
Message board moderation

To post messages, you must log in.

1 · 2 · Next

AuthorMessage
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 52042 - Posted: 20 Jan 2014, 0:09:35 UTC

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
ID: 52042 · Report as offensive
Profile Gundolf Jahn

Send message
Joined: 20 Dec 07
Posts: 1069
Germany
Message 52045 - Posted: 20 Jan 2014, 9:49:13 UTC - in response to Message 52042.  

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)
ID: 52045 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 52046 - Posted: 20 Jan 2014, 10:38:45 UTC - in response to Message 52045.  

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

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,
ID: 52046 · Report as offensive
Profile Gundolf Jahn

Send message
Joined: 20 Dec 07
Posts: 1069
Germany
Message 52047 - Posted: 20 Jan 2014, 12:25:09 UTC - in response to Message 52046.  

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
ID: 52047 · Report as offensive
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 52058 - Posted: 21 Jan 2014, 6:31:27 UTC - in response to Message 52046.  

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.


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?
ID: 52058 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 52059 - Posted: 21 Jan 2014, 13:39:51 UTC - in response to Message 52058.  

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.
ID: 52059 · Report as offensive
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 52099 - Posted: 23 Jan 2014, 0:47:29 UTC - in response to Message 52059.  

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.
ID: 52099 · Report as offensive
BobCat13

Send message
Joined: 6 Dec 06
Posts: 118
United States
Message 52100 - Posted: 23 Jan 2014, 2:43:52 UTC - in response to Message 52099.  
Last modified: 23 Jan 2014, 2:45:27 UTC

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.
ID: 52100 · Report as offensive
noderaser
Avatar

Send message
Joined: 2 Jan 14
Posts: 276
United States
Message 52103 - Posted: 23 Jan 2014, 4:32:01 UTC

Could you use symlinks to direct the working directory to your regular HDD?
My Detailed BOINC Stats
ID: 52103 · Report as offensive
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 52118 - Posted: 24 Jan 2014, 4:37:15 UTC - in response to Message 52100.  

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.
ID: 52118 · Report as offensive
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 52119 - Posted: 24 Jan 2014, 7:18:06 UTC - in response to Message 52103.  

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.
ID: 52119 · Report as offensive
Dylan Young

Send message
Joined: 26 Feb 14
Posts: 1
Canada
Message 52792 - Posted: 26 Feb 2014, 6:58:57 UTC

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).
ID: 52792 · Report as offensive
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 53609 - Posted: 13 Apr 2014, 2:03:36 UTC
Last modified: 13 Apr 2014, 2:58:51 UTC

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.
ID: 53609 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 53626 - Posted: 14 Apr 2014, 16:28:55 UTC - in response to Message 53609.  

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.
ID: 53626 · Report as offensive
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 53630 - Posted: 15 Apr 2014, 2:05:04 UTC - in response to Message 53626.  

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!
ID: 53630 · Report as offensive
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 53714 - Posted: 19 Apr 2014, 6:36:30 UTC
Last modified: 19 Apr 2014, 6:49:10 UTC

The message that I originally wrote here belongs against another thread.

I think this thread has reached its end.
ID: 53714 · Report as offensive
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 53798 - Posted: 26 Apr 2014, 5:08:01 UTC - in response to Message 53714.  

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 stop
in 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-client
in a terminal, and then edit the file in gedit such that
# This is the data directory of the BOINC core client.
BOINC_DIR="/media/el_gallo_azul/Storage/var-lib-boinc-client/boinc-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 start
in 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.
ID: 53798 · Report as offensive
whynot

Send message
Joined: 8 May 10
Posts: 89
Ukraine
Message 53805 - Posted: 26 Apr 2014, 16:03:42 UTC - in response to Message 53798.  


CPU usage is about 1%, so boinc-client is not working on any tasks.


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.
ID: 53805 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 53807 - Posted: 26 Apr 2014, 18:15:53 UTC - in response to Message 53798.  

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' .
ID: 53807 · Report as offensive
Profile el_gallo_azul

Send message
Joined: 19 Jan 14
Posts: 79
Message 53810 - Posted: 27 Apr 2014, 1:40:00 UTC - in response to Message 53807.  

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.
ID: 53810 · Report as offensive
1 · 2 · Next

Message boards : Questions and problems : Use HDD for BOINC work files instead of SSD

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.