Migrating My Proxmox Containers to My New Proxmox Cluster (LVM to ZFS)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys in our last video we took a look at getting a high availability proxbox cluster set up on three zema board 832s and I kind of alluded in that video that my next goal was to migrate my panda procs based by my proxboxover on a latte Panda all of the applications that I've got facing or for public facing for you guys I wanted to get those migrated over to this new cluster and then I ran into a bit of a snag um I I connected my backup server to both things and tried to migrate from Panda prox over to the cluster and then realized there's no direct migration path from lvm which is what I use for my storage on Panda prox my single node setup uh to ZFS there's just no direct path to do that so I'm gonna have to do things the hard way and I want to share that process with you so that if you run into a situation where you're migrating from lvm to ZFS you'll have a better idea of how to do that but before we jump into all of that a quick message from today's video sponsor this video is sponsored by rise rise is a smart time tracking app designed to help you maximize your productivity now I'm someone who can look at the clock on my desktop and see what time it is and then just a moment later check the time again and realize that three hours have passed and I have no idea where my time has gone prize uses desktop and browser apps to help you track and categorize your time in a way that makes the most sense for you customizing tracking categories and rules for apps and websites and one of the things that I love most about ryze is it will automatically tell me when I should get up and take a break to help prevent fatigue and burnout try rise for free and help maximize your productivity the first thousand people to check out the link in the description or use my code dbtech will get 25 percent off their first three months with rise okay so here we are on my panda procs I'm just calling it that because that way we'll have some kind of reference between the two servers we'll have Panda procs and we'll have our cluster just we've got some names there and here if we take a look at the data center tab up here and we come over to storage down here your storage type lvm if we jump over to our cluster and do the same thing storage here is ZFS and those are not compatible so because these two file systems don't have a direct path of migration we're going to go ahead and do it kind of the hard way the the manual way to make sure that everything gets transferred properly so what we're going to do is we're actually going to start over here on our cluster setup I've got a template created that I built that's based on Debian 11. it's got Docker and Docker compose installed on it I've also got portaner installed on it as well as this part's optional but I've also got a cloudflare tunnel container installed on it so that's kind of what we're starting with now there's one other thing that I had to do to make this work that I'm going to show you and then I'm going to give you a little bit of information about this what I want to do is actually start this up I'll give this a second to do its thing but in order to do a remote connect from one container to another on two separate servers on two separate IP addresses I had to modify the uh the SSH setup just a little bit so let's go ahead and get log in as root and then what I want to do is edit um this sshd config setup here and if we scroll down we've got this one line right here that's in white that said permit root login yes it didn't used to say that in fact yours has probably commented out with something else written there in order to make the connection we need to make sure that permit permit root login is set to yes and then you can do control o and enter and X like so and then you'll want to do a service sshd restart like so just to make sure that that change takes effect now once you've got your migration complete you'll want to come back into this file and and comment out permit root login and restart the service so that you're not allowing root connections from the outside of the container it's just one of those things I had to do for the purpose of migration at least that's how I figure out how to do it there may be other ways there may be better ways I don't know but this is how I did it if there are other ways please let me know in the comments um I allowing root access isn't ideal but it's what I did so let me know if there's a better way to do that now once we've got this part set up now what we want to do is actually shut down this container and then duplicate it because I want to keep this container as my template so I just I can just keep reduplicating this for all of the different migrations that I'm going to have to go through now while this container is shutting down let's jump over to Panda prox so that we can take a look we're going to migrate dbtech.com here that's actually the website that I have up and running for for resources for uh for video and that sort of thing this is what we're going to to move from Panda prox over to the cluster so what we're going to do is we're going to come into here so here we are on Panda procs we're in the home directory and if I do uh an LS oops like so I've got a Docker folder in there if I change directories into Docker you can see I've got applications and databases and in there is where I've got all of my data stored for uh for DB Tech both the application container as well as the database containers so that's kind of what we've got going on here but what I want to do is actually go back a directory and I want you to zip recursively so Dash r I'm going to Docker dot zip yeah and then I'll do um Docker like so and I'll hit enter basically what it's going to do is take all of the files and folders in that Docker folder and compress them into a single zip file okay so now that that's done what I want to do is actually come back over to here I want to right click this template and I want to clone it the container ID you can give your containers whatever IDs you'd like to I'm just going to go with 101 because it's the next in line after the bit Warden that I already copied so 101 is fine for my for my host name I'm going to call it dbtag like so I'm going to click on clone we'll give this a couple of minutes to clone the template over to the DB Tech and then once it's done we'll go ahead and start moving things around a little bit so here we are several minutes later and we can see that this 101 that we just cloned from 999 is done it is ready to go so what we're going to do is actually come over here to uh to resources uh and we've got a gig of memory a get a gig of swap two cores and 16 gigs of storage I want to up that a little bit so I'm going to do a volume action and resize and I'm going to add 48 gigs to that oops 48 not 487. uh so it'll have a total of 64 gigs of storage available for this uh for this website if you want a container whatever they're they're synonymous for what we're doing here so I'm going to resize the disk task okay 64 gigs cool so now what we want to do is uh get the IP address of this container so what we're going to do is start the container so okay so now that this container is started what we're going to do is go to console we're going to get logged in and then we'll do us an ipadvr so we get the IP address and here that is uh 192.168.0.41 you can see it right there so what I want to do is do a CD space slash home and an LS so there's nothing in the home directory right now let's also do a Docker Docker PS just so we can see we've got cloudflare we've got poor tainer those are the two containers that we have up and running so with that said let's go over to our IP address on Port 9000 so that we can get log in to this pertainer instance because that's how we're going to initially deploy the containers so that we can override them and I'll show you what that means here in a minute so we're going to go to 192 41 49 000 all right so now we're going to get logged in and again if we come in here look at the containers we just have portaner and our cloudflare uh containers there that's good what we want to do though is go to Stacks we want to add a stack and we're going to call this dbtag like so now what we're going to do is take the the docker compose that we originally deployed with over on Panda prox and copy and paste it into here so here is a panda products we're on a different IP address or is that dot 15. we're going to open this up and we can see uh that we've got a couple of different containers in here we've got the wiki and the database so bookstack and the Maria database to make the containers work so what we're going to do is come over to the editor so this is the docker compose stack whatever that I use to deploy our book stack our DB Tech website using bookstack and a Maria database I'm going to change a couple of things in here for permissions issues but you're just gonna have to trust because this is all going to be blurred that this is what I'm copying so I'm just going to copy oops I'm just going to copy this over okay so this has been copied over so we've got a name we've got our Docker compose what I want to do now is click on deploy the stack and we're just going to hang out and wait a few minutes for this to deploy okay so that has deployed if we come over here and take a look at DB Tech we can actually see that that Docker compose that stack whatever also had a PHP my admin container in there so I'm just going to remove that we don't need it uh it was for something else that I was doing when I first deployed the container on Panda prox we're going to remove that from the from the cluster here okay and so now that this is up and running let's actually go back to the terminal in our cluster so that we can do an LS and there's Docker so let's let's actually throw a screen Let's do an LS there there's Docker we do a CD into Docker we've got apps and d and DBS just like we had over here on Panda procs right so there's Docker with Docker zip so you can see that where we've got a couple of different things going on here right so let's go back oops to our home directory to an LS okay so now we're kind of where we want to be so our next step will be to go back over to portainer where we just deployed uh the the blank book stack over on the the cluster right so I'm going to go ahead and just stop these two containers okay so they're both stopped now so what I want to do is go back to the terminal that I know we're doing a lot of back and forth here but this is kind of the process I'm going through I'm gonna go back to the cluster again I'm doing LS there's that Docker folder I want to do an uh an RM space Dash RF docker okay those folders are gone but the containers are still registered with Docker so now what we can do is overwrite or kind of transfer over the the files and folders and everything from Panda prox to this location and here's how we're going to do that we're gonna go back to Panda prox when LS just to make sure we're still there and then we're going to do um SCP uh docker.zip and then we're going to do a root at 192.168.0.41 colon forward slash home and that's how we're going to transfer the file we're going to use SCP to transfer the file the docker.zip file from here from Panda prox over to the cluster node so we're going to hit enter it's going to ask us for a password like so and just that fast it transferred the file over it was only about 45 Megs or so now we can come back to the cluster and we can do an LS and this time we should see a docker.zip file and there it is so now we can do unzip foreign and now it's extracting that zip file into the docker folder that we had just deleted we're recreating that folder uh with all of our information there so we're going to do LS like so there's Docker and docker.zip and if I do a CD anti-docker we've got apps and databases so now that we've transferred our data from Panda procs over to the over to the node over on our cluster we can go back to the portaner where our cluster is again on on 41 on uh you know dot 41 for the IP address we can start these like so and now they're both up and running and that's good to go okay so this is the DB Tech Wiki over on the panda prox server and what I want to do is just kind of modify something here so that we can kind of distinguish between the two once I change the DNS over um so let's go let's go into affiliate links um and then let's click on edit um we're gonna call this I'm just gonna I'm gonna call this uh on and uh rocks right I'm going to click save the Shelf and here it is right there there is on Panda prox right we agree that that's there so we're going to come back over to my cloud floor tunnels where I manage the DNS for uh this setup here is dot 15 I'm going to change this to 41. okay so that notice says 41 and if I come over to here let's go back to there and if we go into affiliate links it's not there right that that Panda prox isn't there so let's just verify that let's come back over to here let's click edit let's change this back to 15. and click save host name then we're going to come back over here and refresh and there's on Panda proxy so just to make sure one last time we're going to change this to 41 again save hostname and refresh and panda prox is gone so so one thing I almost forgot is we need to go back and change that permit root login setting from yes to no so let's do that just real quick before we forget so we're going to do uh Nano etc etc slash Sage slash SSH HD like that and then we want to come down to here we want to uh do that or we could explicitly say no either way is fine we're going to do that we're going to do control o and enter and control X and then we're going to do a system sshd restart oh service sshd restart like so and now we don't have the ability to remote into that server from outside of proxmox so just make sure that you do that to just add a little extra security back into your configuration now I get to repeat that process for all of the different containers that I've got over here on Bandit prox which is DB tech.fans file run lend paste lean time and maybe ad guard I haven't decided yet but that's the process that I'm going to go through to migrate my LV my my containers that are on an lvm setup on on a single node over to a cluster node with ZFS so hopefully that makes sense hopefully I did at least a a a decent job of explaining kind of the process that I went through there if you found this video helpful do me a favor give the video a thumbs up uh this one was quite the the the mental Journey for me to figure out this morning and I wanted to share it with you just as soon as I could so that if you're ever in a situation where you're trying to migrate from a a single lvm node over to a cluster of ZFS hopefully this video will be helpful for you so uh again thank you so much for spending a few minutes of your day with me today I really do appreciate your time and I will talk to you in the next video
Info
Channel: DB Tech
Views: 6,540
Rating: undefined out of 5
Keywords: proxmox, proxmox cluster, proxmox ve cluster, proxmox ve, proxmox tutorial, proxmox cluster setup step by step, cluster, proxmox cluster setup, cluster proxmox, proxmox cluster zfs, proxmox cluster 3 nodes, proxmox cluster network, proxmox cluster tutorial, proxmox cluster shared storage, proxmox ve cluster setup, proxmox virtual environment, proxmox getting started, migrate proxmox, proxmox cluster delete, proxmox ha, proxmox install, configurar cluster proxmox
Id: kQAuN65omiY
Channel Id: undefined
Length: 15min 13sec (913 seconds)
Published: Tue Nov 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.