Attaching VM with existing volume

(Kulvinder) #1

I am a new to FoundationDB. Trying it out to see if that suits the need of SaaS application. I created the digitalocean droplet and installed it over there with a volume attached with datadir path and logpath.

I was testing to destroy the droplet (vm) and creating it again but am not able to use the attached volume in the new instance. it gives the following error.

Using cluster file `/etc/foundationdb/fdb.cluster’.

The database is unavailable; type `status’ for more information.

Welcome to the fdbcli. For help, type `help’.
fdb> status

Using cluster file `/etc/foundationdb/fdb.cluster’.

The coordinator(s) have no record of this database. Either the coordinator
addresses are incorrect, the coordination state on those machines is missing, or
no database has been created. (reachable)

I tried defining the “configure new single ssd” but it overwrites the existing database. how can I use the existing database in fdbcli

(Alex Miller) #2

We’ll probably need more information on how you set up FDB and how you’re creating your droplet.

I will make a guess though that re-creating the droplet means reinstalling the foundationdb-server package, and then changing fdbmonitor.conf to point to the right datadir. When doing this, you’ll lose the previous instance’s cluster file, and generate a new one instead, which would result in the error that you’re seeing. Save the cluster file on your attached volume as well, and configure fdbserver and fdbcli to use that cluster file.

(Kulvinder) #3

You guessed right, I created the entire VM again with new installation of foundationdb. I moved the fdb.cluster after I created a new database and then changed the paths in foundationdb.confg and stored it also in attached volume.

after this it was smooth after the reinstall & restoring the foundationdb.conf from volume to /etc/foundationdb

thereafter fdbcli -C volume/fdb.cluster and it was all working with existing database

Thank you very much…hope to learn and contribute here