Can I have 1 Volume attached to two Linodes?

Linode Staff

I have a question regarding Volumes. I have created a volume and added it to my Linode. There are files on that volume that I want to share with another Linode. Is there any way that both Linodes can be attached to this Volume so I don`t have to copy images across Volumes and have them in one place?

2 Replies

With Block Storage, you can only have it attached to one Linode at a time. At anytime you can freely detach the Volume and attach it to another Linode that's in the same data center as the Volume, but that doesn't answer your question.

The best way to utilize Block Storage across two Linodes would be to clone the Volume, attach it the other Linode, and then have rsync keep both Volumes synced together. If you decide to do this, here is what you should know:

Since you pay per GB for your Block Storage, you might consider resizing your Volume to make sure it's exactly the right size you want it to be. Afterwards, in your Cloud Manager, you then click on the ellipsis of that Volume to clone it.

Now that you have a cloned Volume, you can go ahead and attach it to the other Linode. Afterwards, you will need to set up rsync on both Linodes to automatically sync the files together. It is important that you set up a cron job to automatically run these backups. Cron jobs are awesome because you get to schedule the tasks to execute exactly when you want them to - every day, every hour, or every 6 minutes if you want.

I also have the need to attach a volume to multiple Linodes and the multiple volumes scheme would be cost prohibitive.

Wouldn't a good solution be to setup Node 1 which is attached to the volume as an NFS server and have nodes 2-N mount the NFS served volume? This avoids the cost of extra volumes and the problem of keeping volumes sync'd.

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