Page 1 of 1

Linux BTRFS - Possible to change FAH directories?

Posted: Tue Apr 02, 2024 12:17 am
by pcwolf
Greetings

I installed Manjaro Linux on a purpose built folding machine.
Perhaps foolishly, I formatted /root with BTRFS

"One disadvantage of Btrfs is that it can cause high level of data fragmentation due to the use of “copy-on-write” technology. This is most often observed when overwriting a large number of small data blocks."

Will a working F@H installation continue to run if under the "Expert" configuration I change the log files to a different partition?

My 64GB root partition is being crushed by /var/ growth with F@H writes.

-Phil

Re: Linux BTRFS - Possible to change FAH directories?

Posted: Tue Apr 02, 2024 12:42 am
by bikeaddict
Fragmentation isn't really a problem on SSDs. On hard drives, BTRFS can be defragmented with a command such as

Code: Select all

btrfs filesystem defragment -r /
My log.txt file is currently only 600K and the logs directory is only 8MB. Are you sure it's the logs taking up all the space? My work dir is 98MB and cores dir is 564MB.

You might be able to set up logrotate to zip up or delete old logs. You might be able to symlink some of the bigger directories to another partition or mount another partition under a /var/lib/fahclient/ directory.

Re: Linux BTRFS - Possible to change FAH directories?

Posted: Tue Apr 02, 2024 1:55 am
by calxalot
On Linux, I believe the log directories are set on the command line by the service file. Such may override anything in config.xml or the Expert tab. If you want logs elsewhere, you should edit the service file or use symlinks.

Re: Linux BTRFS - Possible to change FAH directories?

Posted: Tue Apr 02, 2024 12:19 pm
by pcwolf
Thanks for your quick responses.

There is a great deal I do not understand about BTRFS clearly; I formatted /root with it so I could take extremely efficient system snapshots with Timeshift, which requires writes to /root. As I understand it, this is not a traditional fragmentation, but rather artifacts remaining after numerous small file writes, shadows left behind the numerous frequent repetitive log entries. I did pick up 15GB space on a 64GB /root partition, but I had to mount a USB to temporarily expand it in order to "defragment". This is after about six months of 24x7 folding at a rate of 15,000,000/day

calxalot: seems to me the F@H Control options write the systemd unit file, not the other way around

Screenshot to show the options I would like to alter.

Image

Re: Linux BTRFS - Possible to change FAH directories?

Posted: Tue Apr 02, 2024 5:46 pm
by calxalot
FAHControl sends changes to the client, which writes those changes to config.xml after a short delay.

Re: Linux BTRFS - Possible to change FAH directories?

Posted: Tue Apr 02, 2024 5:49 pm
by calxalot
FAHControl will display options that appear from the command line. I’m just saying you can’t change the command line options from FAHControl. And my memory is that command line options override what is in config.xml

Re: Linux BTRFS - Possible to change FAH directories?

Posted: Tue Apr 02, 2024 10:05 pm
by Marcos FRM
Set the nocow (chattr +C foo) attribute on /var/lib/fah-client and/or /var/log/fah-client (v8 paths)? Or make the client set from C++ code on each directory created (all files and subdirectories will inherit it). To be effective, it has to be set before creating stuff inside the directory.

https://man7.org/linux/man-pages/man1/chattr.1.html
https://man7.org/linux/man-pages/man2/i ... ags.2.html (FS_NOCOW_FL)