Separating logs on its own HDD

I might be missing something but I’m not getting the behavior I’ve expected.

Based on an advice. I separated storage and logs into separate hard drives. At least that’s what I thought I did, but FDB is reporting something else and that means I didn’t do it well.

From my foundationdb.conf

datadir = /var/lib/foundationdb/data/$ID
logdir = /var/log/foundationdb
logsize = 50MiB
$ lsblk
sda       8:0    0   30G  0 disk
└─sda1    8:1    0   30G  0 part  /
nvme0n1 259:0    0  375G  0 disk
└─md0     9:0    0  1.1T  0 raid0 /var/lib/foundationdb/data
nvme0n2 259:1    0  375G  0 disk
└─md0     9:0    0  1.1T  0 raid0 /var/lib/foundationdb/data
nvme0n3 259:2    0  375G  0 disk
└─md0     9:0    0  1.1T  0 raid0 /var/lib/foundationdb/data
nvme0n4 259:3    0  375G  0 disk  /var/log/foundationdb

However when looking at the stats

Operating space:
  Storage server         - 939.9 GB free on most full server
  Log server             - 939.9 GB free on most full server

Somehow the log server is still pointing to the same disk. That also means the /var/log/ is most likely just an output log not the log I’m looking for.

So is there a way to separate the log into a separate HDD?

With log being on a different disk, the advise refers to the fdbserver processes running the tlog role. The logdir option in foundationdb.conf however is for trace files. Naming is hard and our naming is not always great (and tlog, log, trace, logging etc are kind of confusing).

What you want to do is to have a second process, add a datadir argument to this process that is on a different disk and assign it the log class.

I figured It has to be that.

So how does this is exactly looks like? Is this correct?

datadir = /var/lib/foundationdb/tlog

I think this is correct. You ned at least two processes though (otherwise fdb will run a storage there).

I actually have four


Just was curious about the setting

Ok, just wanted to be sure. This looks correct to me

1 Like