How do I implement fail-over for block storage

We would like to consider methods for providing a cluster of application servers access to the linode block storage service. At the outset, we understand that only one host can be connected to a block storage device at a time. However, if the host connected to that block storage should go offline, how can we configure the application server cluster to connect to the block storage through another 'host'.

It seems that use of NFS Ganesha may come into play here but wondering if anybody else has already tested a fail-over solution for Linode block storage using it or other solutions.

1 Reply

Hey there,

I haven't heard of anyone configuring something like this personally, however I believe to configure this what you will want to do is have a Linode monitoring the Linode that has the volume mounted. With that you could create a script to use the Linode API to power down Linode 1 (the one with the volume), detach the volume, and attach the volume to Linode 2. From there the monitor Linode should also run a script to SSH to Linode 2 and run the commands to mount the block storage volume.

That being said, considering the cost of a third Linode to monitor, it might actually be easier and possibly more cost effective to have a second volume already mounted to Linode 2 that is a clone of the volume on Linode 1. Both Linodes and volumes would effectively be the same, and what you could do is configure IP failover at the Linode level. This may also be faster as it wouldn't require the first Linode to shut down to properly detach the volume without risk of corruption. You can also read more at our guide for a high availability setup.

I hope this helps get you pointed in the right direction!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct