FoundationDB

How to blow away a DB and recreate it?


(Caleb Spare) #1

I’m using FDB for a proof of concept. Right now I have a cluster running on a single machine. I was having trouble getting the throughput I wanted and after reading some forum posts I thought that perhaps I should reduce the number of storage workers from 8 (number of cores) to something smaller, like 2.

To do this I commented out 6 of the [fdbserver] entries in my foundationdb.conf:

[fdbserver.4500]
[fdbserver.4501]
#[fdbserver.4502]
#[fdbserver.4503]
#[fdbserver.4504]
#[fdbserver.4505]
#[fdbserver.4506]
#[fdbserver.4507]

This caused fdbmonitor to kill 6 of the processes and now the cluster is stuck in a bad state:

fdb> status

Using cluster file `fdb.cluster'.

Locking old transaction servers. Verify that at least one transaction server
from the previous generation is running.

Need one or more of the following log servers:
64347ec1e1b00d781e870366e50de902, 00280ca8019dd6b2f27d8a307961a97a

So I have two questions:

  1. How do I delete and recreate the DB? I don’t care about any of the data; I’m just trying to experiment with stuff quickly. It’s not clear from any of the admin or configuration documentation that I’ve read.
  2. What would the correct procedure have been for adjusting the number of storage workers in a safe way?

(Caleb Spare) #2

I got it working by stopping the foundationdb service, deleting everything in datadir and logdir, starting the foundationdb service, and then running configure new single ssd.


(A.J. Beamon) #3

The steps you took are an effective way to do this, particularly when everything is on one machine.

See https://apple.github.io/foundationdb/administration.html#removing-machines-from-a-cluster for a description of this procedure.

EDIT: I should add that the procedure above is for removing machines, but the steps are roughly the same. In place of disabling the service, you would disable the specific processes (e.g. by modifying foundationdb.conf).


(Caleb Spare) #4

Thanks @ajbeamon; that was helpful.