Feed test, please ignore.
Picture the scene,
I run a kvm host with 5 machines, it’s Ubuntu LTS. The 5 vms constist of minecraft servers, a shell server so myself and a few friends can access IRC, and a webserver which I host all of my websites. My main worry was that if the server goes down for what ever reason, I’ve lost everything on there, that’ll take down all my vms and I’m basically stuffed. What does one do in this situation, I’m not overly rich so I can’t host elsewhere, I do however have a spare server that’s not doing a lot apart from gathering dust. I know, I’ll setup a gluster system so that everything is mirrored, the vms, when updated are copied to the second server so I can just bring that online in the event of a failure. It’s not the perfect solution but it’s ok for a little home setup.
edit the hosts files on both machines so that they are able to ping each other
xxx.xxx.xxx.xxx rmcvirt01.paulmellors.local rmcvirt01
xxx.xxx.xxx.xxx rmcvirt02.paulmellors.local rmcvirt02
Install the gluster software
apt-get install glusterfs-server
add the second server to the gluster
gluster peer probe rmcvirt02
check it’s status
gluster peer status
Create the gluster volume
gluster volume create vol_replica transport tcp rmvcirt01:/home/glustervms rmcvirt02:/home/glustervms
*note* I had to add force at the end of the volume create line as my folders were part of / which apparently it doesn’t like.
Start the volume
gluster volume start vol_replica
If you want to check it, then use
gluster volume info or gluster volume status
Create a folder that you want to mount as the gluster drive
Mount the volume to a folder
mount -t glusterfs rmcvirt01:/vol_replica /home/glustervmsmnt/
I can’t remember if I did all this on the second server so it knows about the first server, you’ll just have to play.
To test I had it working, I touched a file on server1 in the /home/glustermnt folder, and then the same folder on server2, if it’s working then you should see the file replicated, and in my case I did.
I then had to shutdown all my virtual machines one by one, move the qcow2 file to the glustermnt folder, and change the vms config to point to the new hdd file location and start up the machine.
Seems to be working fine, I don’t really know much about glusterfs, so if you had a question, I’ll more than likely just say don’t know and have a look on the internet, but I’ll get there.
I currently use a small desktop running Windows 7 home edition as a backup/storage server, it’s only got a single 1tb drive in it, but it did the job fine. Over the last couple of days it’s been crashing like crazy, every time I’ve come to use the machine, it’s got the dreaded BSOD. Yay. I can fix it, but it means I’ll have to move the machine from where it is currently, which is a pain in the bum. It’s actually made me think of an alternative, and for that, I’ve decided to get 2 new WD RED drives and add them to one of my spare 1u servers, I’ll use that instead. It’ll also force me to install Linux instead of using windows, which is always a good thing. It’s quite easy to install Ubuntu onto the box, then setup samba shares so I can mount the drives on my laptop just as before.
Pain in the neck, but not all technology is infallible…..
** Update 14/03/15 **
I went with Debian in the end, this rarely gets updated, only really for security updates, so I went with that instead.
I’m currently turning one of my servers into a storage server, I’ll be using CentOS 7, but not sure if I want to just use samba/glusterfs or have isci running on it so I can use the space as drives on my main servers. I will report back when I have played a little. Trouble is i’m never satisfied with one solution so might have to reinstall the server numerous times until I like something. I’m going to have to redo it at some point any way as I’m getting some WD Red drives to put in it. The drives I have in there at the moment are sloooooooooow, most likely because their old.
sigh, that’s the problem with me having servers, I just want to play constantly, I suppose it’s a good way of learning though. I’ll get to work for RedHat one day
Yes the title is correct, I’m waiting to fail, but it’s not quite as straight forward as you might think. I personally don’t want to fail, I’m wanting my hardware to fail so I can test it. I’m working on Failover clustering within Windows Server 2012, at the moment, I’m just using Hyper-v and replication, but soon, ie in the next day or so, I hope to have my Ubuntu Server configured as a iSCSI target so I can start to play with Fail Over Clustering. I went with using a Ubuntu Server as it’s cheaper than buying a specific NAS that supports iscsi. I had the hardware lying about and for my test lab, it’ll do the job fine. I’ll write a more indepth post later with settings I’ve used etc, I just wanted to do a quite update for people that read my blog, er is anyone actually reading this?
I’m quite lucky that I have all the equipment to test this all on, it’s really fun to play about with this kind of think and is certainly helping me gain knowledge that i’ll need when doing my MCSE exams.
A lot of my friends will read this and think WHY are you using MS products and my answer to that is, well I like it, it works for me. I can see myself in a few months time, doing the same project again but this time using Opensource tools, but for the moment, I want to stick to Microsoft so there.
/me waits for the backlash that I always get…..#sosad
I have 2 usb ports on the front of my Dell 1950 server, as the internal cd-rom drive on it doesn’t work, I’m having to use an external one, that leaves the other port for the keyboard. That means that unless I have a really long cable and reach round to the back of the server, which let me tell you is a pain in the ass, I have to use the mouse in the front usb port.
It’s not so much a problem, just awkward when I use the graphical install mode. I have to press tab a lot, so I wondered if there was a way to just use a text mode installer, well actually there is and it’s simple.
Boot of the install media, and when you see “install centos” press the tab to get the command line arguments for the actual boot settings. Add the following to the end of the line text then press return, that’s it. All you’re doing is telling the installer to use a text mode install.
Seems to work ok, the only issue I saw when I’ve just used it, is that when you select the software to install, in my case, “server with gui”, unlike the graphical install, you don’t get the option to add any additional software [unless i’m missing something], it’s not a problem as I can add them later, but it would have been nice to added the virtualisation tools at the same time.
I love linux
Just a bit of advice passed onto me by a friend, who knows his stuff. Don’t use the same password for all your online activity. If it’s guessed, then it’s easy enough to check internet history to find the sites you’ve been accessing and try the password for them as well. If you’re scared at the thought of remembering multiple confusing passwords, then let me recomment lastpass.com.
With this site, you have a master password, that enables you to access your own personal vault. You can then add websites to this vault and have a plugin on your laptop/pc which connects you to the lastpass service. You can then log into all your sites, with your new complicated passwords, without having to remember them. Due to certain prank events today, I’ve started using this service and so far it seems ok. I’ve changed most of my online sites to use this service, with some of the passwords being over 20 chars in length, with capitals and chars such as !”£$£%£%
Just remember folks, don’t use the same password on all sites you use. It’s a 1 min job to get your pc hacked and all this information found out.
If you know me, I’m a Fedora Ambassador and Mentor for the UK. One of my friends asked me what that involves, and so began a long story. To be honest, it wasn’t that long, but it allowed me to tell them all about Fedora, what it’s like not only to use the OS, but what it’s like to be part of the community. I participate in a lot of IRC channels and get to get to speak to a lot of people doing the same thing, and what’s that thing? Promoting Fedora. If someone asks what Fedora is, your promoting it. If, while I’m at a friends house, I boot their PC into a Fedora Live system from my USB stick that I’m always carrying, then I’m promoting Fedora.
Even if someone asks for a CD to try it them selves, or even if they borrow said USB stick for a bit, I’m promoting Fedora. Now this is a small part of a larger picture, but it’s somewhere to start, there isn’t a minimum you can do to promote Fedora, even if all you do is tell someone about this great alternative to Windows/Mac, you’re promoting Fedora.
If you’re liking what you’re hearing, or if you’re unsure what to do next, or where to go, then go visit – https://fedoraproject.org/wiki/Ambassadors
If you’re used to IRC and are on the irc.freenode.net network the come into #fedora-uk or #fedora-ambassadors and have a chat to people, if I’m about, then ask for MooDoo
If you didn’t know, and if you didn’t why not, then it’s FOSDEM this weekend, you can read more about it here – https://fosdem.org/2015/
To quote from the site
“FOSDEM is a free event that offers open source communities a place to meet, share ideas and collaborate.
It is renowned for being highly developer-oriented and brings together 5000+ geeks from all over the world.”
Unfortunately, if you’re like me, and you’re unable to go physically, then do not dispair, you can participate remotely.
I’m going to be in the irc channel on irc.freenode.net #fosdem, so if you’re about say hi, I’m MooDoo.
Other years the tracks were streamed but I can’t see any information on the site about this, so if you know more, please let me know so I can post it here.
And for all you going to the event, have fun, and maybe I’ll see you next year.