Hey Daniel Persson instaed of hearbeat you can use keepalived to do failover, moreover it will assign virtual IP itself. I also used keepalived with drbd to do complete failover.
Hi Rupesh. Great suggestion. We use virtual IPs as well and switch over when Heartbeat switches machine. So both solutions work, but our implementation is something we used for a while and is stable. But I guess there are many other great solutions for this problem that you can try out. Thank you for watching my videos. Best regards Daniel
Finally, I found a RUclipsr in my field. thank you so much for this video. I have few questions. I think it is better to use the pacemaker cluster. what is your opinion? How can sync 3 servers or more for free (drbd9 is not free)? Is that possible to mount a different folder to drbd? for that, should I make different resources in drbd conf file? Thank you again
Hi John. Thank you for watching my videos. I'm sorry, but I might not have the answers you seek. I've never used pacemaker, so I don't have any opinion there. Using more than 2 servers in this kind of setup might not be the best solution. I would switch over to a Ceph cluster at that point. DRBD doesn't really map directories, to my knowledge. They work on devices, or at least that is the most efficient way to use them. But using multiple virtual devices in different directories would probably work just fine. And in that case, that would be multiple resources. I hope this helps. Best regards Daniel
I managed to run heartbeat actively, but when I switch it off on the vm1, it does not send sharefs contents to vm2 but it can see that vm1 is down and it says "foreign resources acquired - take over complete for node vm1"
Hi Preston. Thank you for watching my videos. To get the switch over for DRBD, you need to configure the interface to change the server to primary when the other goes down. So if you check your DRBD status on VM2, it should be secondary when VM1 is running. When you turn off VM1 or stop heartbeat, VM2 should notice it and switch the DBRD instance to primary and handling reads and writes. If it stays in the secondary mode, you can't modify the drive. I hope this helps. Best regards Daniel
Hi Daniel. Just like to clarify. Can DrDb Cluster help to avoid a split brain or jeopardy scenario which often is fixed or handled with the use of fencing or a quorum disk ? Thanks
Hi David. Well, I'm not sure of all the ways of using DRBD. But our use-case is using one Primary and then a Secondary and both should never be writeable at the same time. I know that we have had both active at the same time and gotten problems but our solution have mostly been to choose one of the copies and replace with the other. So not a great situation. Might be more advanced routes for handling the split brain scenario. I hope this helps. Thank you for watching my videos. Best regards Daniel
hi daniel, i trying to configuration the drbd, and i will create the meta data block, use drbdadm create-md resource, and the device or resource are busy, i dont know how to solve this :((
Hi Achmad. The device being busy usually means that it's in use by another process. Perhaps you have mounted it or maybe the system is doing some other job against the drive. My suggestion would be to reboot the computer to see if you can rectify the problem. There is also tooling like lsof or similar that can see what program or process is currently using the resource. I hope this helps. Thank you for watching my videos. Best regards Daniel
@@DanielPerssonsorry if my question make u dont understand, i mean when i stop the heartbeat service's at the node 1, status of node 2 is not change to primary, how can i solve this daniel
Hi Preston I don't know if heartbeat is open source, I only used the packages that came with debian. So looking for an executable solution you should be able to install it with your package manager. If you need source then Slackware might have the code for the package. I hope this helps. Thank you for watching my videos. Best regards Daniel
Hi Praveen. Thank you for watching my videos. To my knowledge, you can't have multiple active filesystems. It would make the model much more complex and harder to manage. Perhaps a system could handle that for you, but if you need a solution for an always-on disk that could expand, I will look into a Ceph solution. I have videos about that as well on my channel. I hope this helps. Best regards Daniel
Hi bveh Sharing between two VMs is no problem, it's what I do in the video. Same setup as I describe in the video. But using more than two VMs are not supported by DRBD as it's a mirror solution between two drives. I hope this helps. Best regards Daniel
doing this with centos but cannot find heartbeat to install it... is there a repo for this im not aware of? thank you for this video... now i cannot live quiet anymore knowing it is possible to do this without any issues. or rocket science... ;)
Hi Jose. Thank you for watching my videos. I think you have to Google that, I'm afraid. Have not worked a lot with Centos. Most distros have Heartbeat as a package, but there might be a transition, so they only have Pacemaker as a package now as Heartbeat, for some reason, is thought of as old and deprecated even though it's easy and solves the problem. I hope this helps Best regards Daniel
thanks a lot Daniel Persson.i have a question:i want use from drbd for 10 T storage thats can work for me?Does Drbd Service have a block storage limit?
Hi, Iraj. DRBD is multi write over multiple instances, usually between two hosts, and I don't think that the block storage size has a limit, but then again, I've not read up on the subject. I know that we have instances with a couple of terabytes using DRBD and that works just fine. If you are looking to create a fallback system with huge data loads, then perhaps a solution like Ceph could be better suited for it. I have a couple of videos about that as well. ruclips.net/video/Uvbp3mtOltw/видео.html ruclips.net/video/XtfjYp8ikaU/видео.html I hope this helps. Best regards Daniel
Hi Daniel, i really want to learn what youre doing, what course should i take to learn creating configuratuon and to understand the languages you use, please it is a big matter for me.TIA
Hi Dennis. Thank you for watching my videos. Most of the things I know I figure out by doing. But if you are looking for solid courses or more material then I could point you to www.itpro.tv/ I have not used them myself but I listen to twit.tv and they recommend them as an authority when it comes to devops so you should probably be able to find good material over there. Best regards Daniel
Hi 王策 I would not recommend that setup. DRBD is more suitable for getting live sync between different hard drives to have a live copy. So you easily could switch over, but writing an entire system could be a hazard. Best regards Daniel
Hi Maxime Thank you for watching my videos. Sadly, the DRBD disk is configured in a primary/secondary setup where the secondary mirrored disk is read only and in our case not even mounted. So to switch over you need to change the primary to secondary and then mount the drive on the secondary machine. This is fast so switching over don't give any down time and is good for fail over. But if you want a high availability you should have 3-4 servers at least with load balancer and shared storage. Perhaps using Ceph. I hope this helps Best regards Daniel
@@DanielPersson Yeah thx, I thought DRBD could allow me to have 2 servers running at the same time, with a load balancing. Think it's possible ? And.. I'm afraid DRBD allows only the sharing of a partition, not the whole system ? Maybe I need Gluster (3 machines but one only is front). I'd like 2 clones working 2gether in fact it's 4 a commercial website. THX v3ry much
Hi Maxime. I don't think it's possible, but you might prove me wrong :) Gluster could be a good solution. We use Ceph and then multiple web frontends using the same backend data. However, there are so many solutions out there to load balance and handle your data that you should probably find a solution that fits your need. In our case, we have a production environment where the load is not that high, and we need redundancy to do maintenance, and if a machine goes down, there should be another takeover, then DRBD is a good choice. But for a more significant website, you should probably have a bunch of frontends handling the delivery of pages and then have the backbone to deliver data. I hope this helps. Best regards Daniel
Hi Daniel. Your explanation is great and very clear, this situation is exactly what I need for a share nfs resource with an extra redundant optons in case of a failover. I've folowed the vide step by step but there is something that is not working in my case. When I turn of one of the nodes (with for example init 0 comand), the secondary server gets control of he drbd, but if I tur on the primary server again, it is not mounting correctly the drbd resource.
Hi Fran. That is strange. Usually, it takes over when heartbeat finds that the resource is available again. The message log usually gives you some indication of the status of your services. Perhaps it will yield an error that could help you progress. I hope this helps. Thank you for watching my videos. Best regards Daniel
Hi Kirubhakaran I'm not really sure what you are asking. But you could use Heartbeat to set a static IP that is shared in-between the servers. I hope this helps. Thank you for watching my videos. Best regards Daniel
You just saved our discipline work. Thank you very much for this tutorial.
A man, a legend, a world treasure
love that blade runner style background music
I fought this for 4 days until i found your video. Thank you so much!
HI, Daniel great video, Thank a lot for sharing 🙏
Outstanding video, thank you!
Thanks lot Daniel...It is very good
Hey Daniel Persson instaed of hearbeat you can use keepalived to do failover, moreover it will assign virtual IP itself. I also used keepalived with drbd to do complete failover.
Hi Rupesh.
Great suggestion. We use virtual IPs as well and switch over when Heartbeat switches machine. So both solutions work, but our implementation is something we used for a while and is stable. But I guess there are many other great solutions for this problem that you can try out.
Thank you for watching my videos.
Best regards
Daniel
Finally, I found a RUclipsr in my field. thank you so much for this video. I have few questions.
I think it is better to use the pacemaker cluster. what is your opinion?
How can sync 3 servers or more for free (drbd9 is not free)?
Is that possible to mount a different folder to drbd? for that, should I make different resources in drbd conf file?
Thank you again
Hi John.
Thank you for watching my videos. I'm sorry, but I might not have the answers you seek.
I've never used pacemaker, so I don't have any opinion there. Using more than 2 servers in this kind of setup might not be the best solution. I would switch over to a Ceph cluster at that point.
DRBD doesn't really map directories, to my knowledge. They work on devices, or at least that is the most efficient way to use them. But using multiple virtual devices in different directories would probably work just fine. And in that case, that would be multiple resources.
I hope this helps.
Best regards
Daniel
I managed to run heartbeat actively, but when I switch it off on the vm1, it does not send sharefs contents to vm2 but it can see that vm1 is down and it says "foreign resources acquired - take over complete for node vm1"
actually everything seems to be running accordingly, but it is not writting to the sharefs
Hi Preston.
Thank you for watching my videos.
To get the switch over for DRBD, you need to configure the interface to change the server to primary when the other goes down.
So if you check your DRBD status on VM2, it should be secondary when VM1 is running. When you turn off VM1 or stop heartbeat, VM2 should notice it and switch the DBRD instance to primary and handling reads and writes. If it stays in the secondary mode, you can't modify the drive.
I hope this helps.
Best regards
Daniel
Hi Daniel. Just like to clarify. Can DrDb Cluster help to avoid a split brain or jeopardy scenario which often is fixed or handled with the use of fencing or a quorum disk ? Thanks
Hi David.
Well, I'm not sure of all the ways of using DRBD. But our use-case is using one Primary and then a Secondary and both should never be writeable at the same time. I know that we have had both active at the same time and gotten problems but our solution have mostly been to choose one of the copies and replace with the other. So not a great situation. Might be more advanced routes for handling the split brain scenario.
I hope this helps. Thank you for watching my videos.
Best regards
Daniel
@@DanielPersson Thanks Daniel. I see what I can do to explore this whole contraption :)
hi daniel, i trying to configuration the drbd, and i will create the meta data block, use drbdadm create-md resource, and the device or resource are busy, i dont know how to solve this :((
Hi Achmad.
The device being busy usually means that it's in use by another process. Perhaps you have mounted it or maybe the system is doing some other job against the drive. My suggestion would be to reboot the computer to see if you can rectify the problem. There is also tooling like lsof or similar that can see what program or process is currently using the resource.
I hope this helps. Thank you for watching my videos.
Best regards
Daniel
@@DanielPersson thanks for respons my comment, i can solve this problem, but i wanna ask, how to create an account linbit danielss :(
Hi Achmad
I'm sorry, but I don't understand the question.
Best regards
Daniel
@@DanielPerssonsorry if my question make u dont understand, i mean when i stop the heartbeat service's at the node 1, status of node 2 is not change to primary, how can i solve this daniel
the error code like this,
0: State change failed: (-12) Device is held open by someone
Command 'drbdsetup-84 secondary 0' terminated with exit code 11
hello @Daniel, can you share a source to which I can get heartbeat. I can't seem to locate a source file.
Hi Preston
I don't know if heartbeat is open source, I only used the packages that came with debian. So looking for an executable solution you should be able to install it with your package manager.
If you need source then Slackware might have the code for the package.
I hope this helps.
Thank you for watching my videos.
Best regards
Daniel
@@DanielPersson I managed to find heartbeat. It was just a matter of fetching it using wget.
Hi Daniel, can i do Active/Active with GFS2 Filesytsem on this setup?
can i avoid pacemaker, corosync (it just becoming complex)
thanks for the video!
Hi Praveen.
Thank you for watching my videos. To my knowledge, you can't have multiple active filesystems. It would make the model much more complex and harder to manage. Perhaps a system could handle that for you, but if you need a solution for an always-on disk that could expand, I will look into a Ceph solution. I have videos about that as well on my channel.
I hope this helps.
Best regards
Daniel
HI how to share drbd0 resources between two ore more VM
Hi bveh
Sharing between two VMs is no problem, it's what I do in the video. Same setup as I describe in the video. But using more than two VMs are not supported by DRBD as it's a mirror solution between two drives.
I hope this helps.
Best regards
Daniel
doing this with centos but cannot find heartbeat to install it... is there a repo for this im not aware of? thank you for this video... now i cannot live quiet anymore knowing it is possible to do this without any issues. or rocket science... ;)
Hi Jose.
Thank you for watching my videos.
I think you have to Google that, I'm afraid. Have not worked a lot with Centos. Most distros have Heartbeat as a package, but there might be a transition, so they only have Pacemaker as a package now as Heartbeat, for some reason, is thought of as old and deprecated even though it's easy and solves the problem.
I hope this helps
Best regards
Daniel
thanks a lot Daniel Persson.i have a question:i want use from drbd for 10 T storage thats can work for me?Does Drbd Service have a block storage limit?
Hi, Iraj.
DRBD is multi write over multiple instances, usually between two hosts, and I don't think that the block storage size has a limit, but then again, I've not read up on the subject. I know that we have instances with a couple of terabytes using DRBD and that works just fine.
If you are looking to create a fallback system with huge data loads, then perhaps a solution like Ceph could be better suited for it. I have a couple of videos about that as well.
ruclips.net/video/Uvbp3mtOltw/видео.html
ruclips.net/video/XtfjYp8ikaU/видео.html
I hope this helps.
Best regards
Daniel
@@DanielPersson thank you so much freind.
Hi Daniel, i really want to learn what youre doing, what course should i take to learn creating configuratuon and to understand the languages you use, please it is a big matter for me.TIA
Hi Dennis.
Thank you for watching my videos.
Most of the things I know I figure out by doing. But if you are looking for solid courses or more material then I could point you to www.itpro.tv/
I have not used them myself but I listen to twit.tv and they recommend them as an authority when it comes to devops so you should probably be able to find good material over there.
Best regards
Daniel
Hi. Could I replicate the entire machine by drbd ?
Hi 王策
I would not recommend that setup. DRBD is more suitable for getting live sync between different hard drives to have a live copy. So you easily could switch over, but writing an entire system could be a hazard.
Best regards
Daniel
Hi DP, and thx much 4 that vdo.
Why not make loadbalancing, since the servers are exactly the same thx 2 DRBD ?
Hi Maxime
Thank you for watching my videos.
Sadly, the DRBD disk is configured in a primary/secondary setup where the secondary mirrored disk is read only and in our case not even mounted.
So to switch over you need to change the primary to secondary and then mount the drive on the secondary machine.
This is fast so switching over don't give any down time and is good for fail over. But if you want a high availability you should have 3-4 servers at least with load balancer and shared storage. Perhaps using Ceph.
I hope this helps
Best regards
Daniel
@@DanielPersson Yeah thx, I thought DRBD could allow me to have 2 servers running at the same time, with a load balancing. Think it's possible ?
And.. I'm afraid DRBD allows only the sharing of a partition, not the whole system ? Maybe I need Gluster (3 machines but one only is front).
I'd like 2 clones working 2gether in fact it's 4 a commercial website.
THX v3ry much
Hi Maxime.
I don't think it's possible, but you might prove me wrong :)
Gluster could be a good solution. We use Ceph and then multiple web frontends using the same backend data. However, there are so many solutions out there to load balance and handle your data that you should probably find a solution that fits your need.
In our case, we have a production environment where the load is not that high, and we need redundancy to do maintenance, and if a machine goes down, there should be another takeover, then DRBD is a good choice.
But for a more significant website, you should probably have a bunch of frontends handling the delivery of pages and then have the backbone to deliver data.
I hope this helps.
Best regards
Daniel
Hi Daniel. Your explanation is great and very clear, this situation is exactly what I need for a share nfs resource with an extra redundant optons in case of a failover. I've folowed the vide step by step but there is something that is not working in my case. When I turn of one of the nodes (with for example init 0 comand), the secondary server gets control of he drbd, but if I tur on the primary server again, it is not mounting correctly the drbd resource.
Hi Fran.
That is strange. Usually, it takes over when heartbeat finds that the resource is available again. The message log usually gives you some indication of the status of your services. Perhaps it will yield an error that could help you progress.
I hope this helps. Thank you for watching my videos.
Best regards
Daniel
@@DanielPersson I will check the logs, it is something that I must mount.
Is there any floating IP like that?
Hi Kirubhakaran
I'm not really sure what you are asking. But you could use Heartbeat to set a static IP that is shared in-between the servers.
I hope this helps. Thank you for watching my videos.
Best regards
Daniel