Type your search keyword, and press enter

SSH known hosts verification failure one liner

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Those who regularly build and rebuild machines or virtual machines on a dhcp network will probably be faced with this quite often, this is due to the known fingerprint for the previous host being different to a new one which has aquired the same IP address.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
c5:ab:00:3c:88:7e:18:8f:46:49:1d:af:f1:8b:4e:98.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:66
ECDSA host key for 192.168.1.165 has changed and you have requested strict checking.
Host key verification failed.

There is an option to have SSH ignore these when connecting, however i find that cleaning out the old line before connecting far quicker and i do this with a Sed one liner.

The line in the known_hosts file we are interested in can be found at the end of the line:

Offending ECDSA key in /root/.ssh/known_hosts:66

66 in this case, so we can get sed to simply delete that line using:

sed -i '66d' ~/.ssh/known_hosts

An SSH session can now be opened without Host key verification failure.

Hope this helps someone.

Getting Fedora 21 on the Raspberry Pi 2

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

The recent release of the Raspberry Pi 2 uses a newer version of the ARM architecture spec, the ARM Cortex-A7 uses ARMv7 whereas the previous model ARM11 uses ARMv6. The great thing about this is the majority of Linux distros already provide an Image for this architecture. More importantly, Fedora already have images.

There is a slight caveat to the above statement however, that being they won’t just work with the Pi 2. The process isn’t that difficult either just a few steps:

  1. Download the image you require, for this we’ll go with the Fedora 21 minimal – http://dl.fedoraproject.org/pub/fedora/linux/releases/21/Images/armhfp/Fedora-Minimal-armhfp-21-5-sda.raw.xz
  2. Flash the image to an SD card xzcat Fedora-Minimal-armhfp-21-5-sda.raw.xz |dd of=/dev/mmcblk0 bs=1M
  3. Make sure the card is unmounted
  4. fdisk the card:
    1. remove partition 1
    2. add a new partition where the old partition 1 was, with type B (FAT32)
    3. write and exit
  5. mkfs.vfat /dev/mmcblk0p1
  6. Clone the Pi firmware repository – git clone https://github.com/raspberrypi/firmware.git
  7. Mount the card again
    1. mkdir /mnt/sdcard
    2. mount /dev/mmcblk0p3 /mnt/sdcard
    3. mount /dev/mmcblk0p1 /mnt/sdcard/boot
  8. Copy the contents of the boot directory from the repository you just cloned to the new boot directory and the kernel modules to the lib/modules directory on the main root partition
    1. cp -r firmware/boot/* /mnt/sdcard/boot/
    2. cp -r firmware/modules/3.18.7-v7+/* /mnt/sdcard/lib/modules/
  9. Edit the fstab file to reflect the new UUID of the partition and change from being an ext to a vfat type
    1. blkid /dev/mmcblk0p1 – this will give the UUID of the partition
    2. vi /mnt/sdcard/etc/fstab and edit the line which contains /boot to contain the above info
  10. Create a /mnt/sdcard/boot/cmdline.txt file containing the following:

    dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline rootwait

  11. Create a /mnt/sdcard/boot/config.txt file containing the following:
    #uncomment to overclock the arm. 700 MHz is the default.
    arm_freq=700# NOOBS Auto-generated Settings:
    hdmi_force_hotplug=1
    config_hdmi_boost=4
    overscan_left=24
    overscan_right=24
    overscan_top=16
    overscan_bottom=16
    disable_overscan=0
    core_freq=250
    sdram_freq=400
    over_voltage=0
  12. save and close any open files on the sd card then unmount and ensure all writes are complete
    1. umount /mnt/sdcard/boot
    2. umount /mnt/sdcard
    3. sync
  13. You should now be able to remove the SD card from your PC and boot it in your new shiny Raspberry Pi 2

I’m sure it won’t be long before dedicated images are available, but for now this seems to work for me. I haven’t tried any more than the minimal install, with these your mileage may vary.

Note: Please remember this will only work on the newer Raspberry Pi 2.

Update:

Extra steps suggested by Tim Bosse

14. Install rpi-update.
Install binutils and tar.

Download and setup rpi-update.

# curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update

15. Run rpi-update as root.

I find this is important to run any time you get kernel updates from Fedora repos.

I have a wireless USB dongle that I use.

16. Install NetworkManager-wifi and NetworkManager-tui (because I find nmcli not so much fun).

I’ve created an image based on steps 1-13 it’s fairly rough and ready so YMMV

https://jfarcher.fedorapeople.org/Fedora-Minimal-armhfp-rpi-21-5-sda.raw.xz

Monit – monitor your processes and services simply

Monit is an application I’ve been meaning to setup for a while, I was first made aware of it from a chap I had the pleasure of talking to at OggCamp this year, he seemed to use it to the n’th degree to monitor files and services within docker containers to ensure a development environment was as it should be. This was far more than I really needed, but the monitoring of services definitely caught my attention so I set about installing and configuring. I was pleasantly surprised with the result, and how simple the whole process was.

Scenario: small hosting server with low spec, occasionally gets hit with a large amount of traffic resulting in either apache or mysql dying.

Configuration: In this instance a CentOS 6 server with standard LAMP stack, but i’m sure this will work with other distributions such as Fedora or CentOS 7 just replacing the relevant commands for systemd based commands.

How?

First off lets install monit, this comes from the rpmforge (http://repoforge.org/) repositories so if you haven’t already got them installed do so

yum localinstall http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

It would be worth checking the website to ensure that rpm version is correct (http://repoforge.org/use/)

Once thats installed we can install the monit software

yum install monit

lets enable the service to start on boot, and also start it to ensure it works OK before configuring:

chkconfig monit on

service monit start

Note: if using a systemd based distro such as Fedora or CentOS 7 then systemctl commands will need to be used instead of the above (systemctl enable monit and systemctl start monit)

If all is good then we can now tailor the configuration to our needs, monit uses the common approach for config files by having a master config at /etc/monit.conf which also reads in files from /etc/monit.d/. The only directive I changed in the master config file was to uncomment the following line:

set logfile syslog facility log_daemon

Which turns on logging, whether this is needed further down the line is to be decided but for now its great to have during configuration.

Next we can create some config files in /etc/monit.d/ for our services (apache httpd and mysql in this case)

vi /etc/monit.d/mysqld.conf

check process mysqld with pidfile /var/run/mysqld/mysqld.pid
start program = "/sbin/service mysqld start"
stop program = "/sbin/service mysqld stop"
if failed host 127.0.0.1 port 3306 then restart
if 5 restarts within 5 cycles then timeout

vi /etc/monit.d/httpd.conf


check process httpd with pidfile /var/run/httpd/httpd.pid
start program = "/sbin/service httpd start"
stop program = "/sbin/service httpd stop"
if failed host 127.0.0.1 port 80 then restart
if 5 restarts within 5 cycles then timeout

These two config files will check the pid files for activity outside monit, namely if the process stops without monit stopping it, and take action based on the status. The also monitor the respective tcp ports for the particular applications, 3306 for mysqld and 80 for apache.

Note: these configurations should also work with Debian based distributions but check the location of the pid files, also the service names are slightly different (mysql and apache2 if memory serves correctly).

Lets restart Monit and run some tests, for this I will run a tail on the log file while stopping services and killing processes:

tailf /var/log/messages

service monit restart

[root@web1 monit.d]# service monit restart
Stopping monit: Dec 31 12:20:56 web1 monit[5338]: Shutting down monit HTTP server
Dec 31 12:20:56 web1 monit[5338]: monit HTTP server stopped
Dec 31 12:20:56 web1 monit[5338]: monit daemon with pid [5338] killed
Dec 31 12:20:56 web1 monit[5338]: 'web1' Monit stopped
[ OK ]
Starting monit: Starting monit daemon with http interface at [localhost:2812]
[ OK ]
Dec 31 12:20:57 web1 monit[6232]: Starting monit daemon with http interface at [localhost:2812]
[root@web1 monit.d]# Dec 31 12:20:57 web1 monit[6236]: Starting monit HTTP server at [localhost:2812]
Dec 31 12:20:57 web1 monit[6236]: monit HTTP server started
Dec 31 12:20:57 web1 monit[6236]: 'web1' Monit started

Lets stop mysqld

service mysqld stop

[root@web1 monit.d]# service mysqld stop
Stopping mysqld: [ OK ]

[root@web1 monit.d]# service mysqld stop
Stopping mysqld: [ OK ]

Within seconds an entry in the log file is presented:

Dec 31 12:22:57 web1 monit[6236]: 'mysqld' process is not running
Dec 31 12:22:57 web1 monit[6236]: 'mysqld' trying to restart
Dec 31 12:22:57 web1 monit[6236]: 'mysqld' start: /sbin/service

[root@web1 monit.d]# service mysqld status
mysqld (pid 6526) is running...

OK so that worked nicely, lets try something a little less clean

[root@web1 monit.d]# ps -ef|grep mysqld
root 6679 1 0 12:23 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql 6867 6679 1 12:23 ? 00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

[root@web1 monit.d]# kill 6867
[root@web1 monit.d]# service mysqld status
mysqld dead but subsys locked

And as if by magic:

Dec 31 12:25:59 web1 monit[6236]: 'mysqld' process is not running
Dec 31 12:25:59 web1 monit[6236]: 'mysqld' trying to restart
Dec 31 12:25:59 web1 monit[6236]: 'mysqld' start: /sbin/service

Brilliant, it seemed to perform exactly as expected. I wont bore you with the detail, but Apache restarted just the same.
And that is it, a really easy to configure monitoring solution. Here, however, I was just scratching the surface of the monitoring capabilities. Take a look at the Monit website and wiki for more details on the vast array of configurables. http://mmonit.com/monit/documentation/ http://mmonit.com/monit/

Barcamp Manchester

IMG_20141018_092931

I’ve been meaning to write this post for some time, but things have been a little hectic recently. That said I really wanted to write something, even if it is a little short, about Barcamp Manchester. The event took place over the weekend of 18th & 19th October and was just a fantastic weekend.

After a fairly decent break from the Barcamp scene, Manchester really came back and did it justice. Set in the fantastic SpacePort building on Lever street which is a meet and workspace, I arrived earlyish on the Saturday morning with fellow members of RossLUG. Carting in my bundle of swag I was shown my table in the main space and setup the Fedora table. As most will know I am a proud ambassador for the Fedora project and more proud of the fact we were able to sponsor the event.

 

The table looked great and we had plenty of swag and disks to give to the myriads of folks visiting the table throughout the day, there was great conversation with many people and the traditional barrage of questions from everyones friend Gino.

IMG_20141018_140632

IMG_20141018_105717

@tommybobbins and myself setup the timelapse cameras and live stream of the weekend, the timelapses can be viewed:

Saturday Main room:

Sunday Main room:

Other Room:

Werewolf:

Finally getting to meet fellow ambassador Dave ‘Kubblai’ McNulty who helped man the table and also give me the opportunity to attend a few talks. Plenty of great content in the talks I attended so if they are anything to go by there quality of the contect over the weekend was exceptionally high quality.

All in all a great weekend, seeing the regular attendees is always a highlight for me but also a high level of interest at the Fedora table in the Fedora project from people who have never heard of the project right up to those who are of an expert level. The organisers of the event need a huge pat on the back for this event and I will certainly look forward to next years!

2013 – A good year

I thought I’d finish off the year with a bit of reflection, overall it’s been a pretty good year in both camps of my life – the geek/tech and the family side. Obvious highs of the year include:

  • Birth of my second child, Alfie.
  • OggCamp 13
  • LinuxCon Europe
  • Barcamp Blackpool
  • RossLUGs 3rd year – some fantastic meetings this year.

It certainly has been a full on year.

It’s been a really tech filled year, as since moving house last September I’ve had my own space for all my tech which is a real bonus. It’s allowed me to really get back into electronics with Arduino building the home automation system, the electric meter monitor (still to be finished) and more recently bringing a snowman christmas decoration back to life:

As part of my job heavily entails virtualisation and storage I’ve been getting heavily into oVirt, GlusterFS and Openstack (more specifically RDO). Making commits upstream too, to both code and documentation.

One of my other highs of this year tech wise was establishing a presence on GitHub I’ve uploaded most, if not all, the code I’ve worked on this year and licensed it with GPL with great reward of folks actually looking at my code. I feel like I’ve really given something back there.

On the topic of giving back, I finally became a Fedora ambassador this year. I’ve thought about it in previous years as I’ve always used the distro and given back where I can. After an experiment of using Ubuntu solely for a while I reverted back to my much cherished comfort zone, but decided to go the whole hog and really get involved in what has turned out to be a great community. Attending the events I regularly and ones I don’t, on behalf of the project has been a rewarding experience so far.

So whats in store for 2014? Well hopefully I’ll continue on this track, more open virtualisation, more Arduino, Raspberry Pi, more Fedora. But also coming in 2014 will be another track, STEM. I recently became a STEM ambassador which will allow me to impart some of my knowlege and skills and help bring a better quality of education in the tech sector to children. I’m hoping to get involved with, and also run, Arduino, Raspberry Pi coding sessions throughout 2014 so watch this space.

All in all 2013 has been an excellent year, lets hope 2014 is as good, if not better. All the very best to you all.

 

OggCamp and LinuxCon Europe: Part 2 LinuxCon Europe 2013

Whoa I’m getting a bit slow here!

After the full on weekend of OggCamp my marathon continued up in Edinburgh for LinuxCon Europe 2013. Unfortunately my plan of heading up straight from OggCamp was scuppered, but I set off first thing on Monday morning. I decided to stick with driving after toying with the idea of getting the train. Glad I did, the Edinburgh park and ride system is brilliant! Parked up at Sheriffhall which allowed me to stay up to 7 days, perfect.

Managed to make it to the exhibition centre at around 2pm that afternoon, which I didn’t think was bad going. After meeting the team of Jiri, Keiran and Tony I quickly got the banner I had made erected. The booth was looking good already but I think that just added the finishing touch.

wpid-IMG_20131022_083134.jpg

I spent most of the rest of Monday chatting to the other team members and the various folks that passed by. It was interesting to see the other guys on the team interacting with attendees as this was the first event I have been to where the booth had more than just myself  running it. Having a bit of a wander around the exhibition floor reveals an interesting point around the Linux Foundation, with the likes of Intel, HP, Samsung and other massive names in the technology game being not only present but promoting open source just proves how prevalent Linux and the Open Source movement are.

Being the Cloud Open Expo as well as LinuxCon there was a massive cloud based presence in the exhibition hall and on the talk roster. Interestingly (or embarrasingly) Oracle also had a presence touting their wares(z) with their RHEL clone Unbreakable Linux – but we don’t need to say any more about them. One surprising thing that occurred to me was there wasn’t a booth from Canonical or Ubuntu, Kubuntu were there in all their glory. Nice to see a SUSE booth also, its always nice to see the cuddly chamaeleon.

wpid-1382561093610.jpg

Next I headed over to grab my complementary swag bag (more t-shirts to show off my allegiance!) while there I was swayed into purchasing a baby vest for the up and coming arrival of mini-geek number 2.

wpid-IMG_20131021_230220.jpgwpid-IMG_20131023_210421.jpg

Over the course of the event I got to know my fellow ambassadors quite well, enjoying a few beers in the evening was great although, thankfully, not as heavy as the OggCamp session. I spent a lot of time having some really interesting conversations with the likes of (name dropping time) Richard Morell of Red Hat, John Mark Walker also of Red Hat and the GlusterFS project, Dave Neary of Red Hat. Also recruiting a new ambassador to the project Elidh McAddam who was really keen to get on board.

Our booth was in a really cool position, right next to a sister project GlusterFS and oVirt both of which I am a really big fan of.

Over the course of the exhibition we were asked several times about the up coming Fedora 20, so I decided to completely rape the wifi and run an inplace upgrade on my laptop. Amazingly everything just worked, if there was a time or place where an upgrade failed it was bound to be there, but no all was good! Shame the same couldn’t be said for our attempts at running Wayland – No trackpad support caused a fail at the first hurdle.

wpid-1382517337514.jpg

I only attended 2 talks during the week, one being Linux Torvalds keynote and the follow up talk from Mikko Hypponen entitled “Living in a surveillance state”. I hadn’t intending going to the second talk, but it kind of followed on. I’m so glad I stayed as it was one of the most thought provoking talks I have seen. You can watch the full talk on Youtube as he repeated it as a TED talk:

After these talks I managed to bump into the man himself (photo credit Keiran Smith) notice also behind Linus is Greg Kroa-Hartman.

wpid-linustorvalds.jpg

All in all it was a fantastic week, plenty of Linuxy swag gained and experiences had. I was really proud to represent and be a part of the Fedora project, its a really good place to be with a lot of good work going on. Interestingly on the drive home a BMW X5 passed me with the registration 9TUX – wonder if they had been at the conference, and who it was.

wpid-IMG_20131024_175401.jpg

Highlights of the conference:

Being part of the Fedora Project.

Seeing Linus in the flesh (starstuck much).

Lennart Poettering reconfiguring Keirans Gnome desktop back to default “as that is how it should be”.

Amazing curry at the Bombay Bicycle Club.

Meeting fellow ambassadors and members of the community.

Mikko Hypponens talk.

Seeing a picture tweeted by Mikko and me being in it. (2 rows behind)

wpid-1382531483808.jpg

 

Lowlights:

Being late.

The drive home.

 

OggCamp and LinuxCon Europe: Part 1 OggCamp

Although it’s been over a week since I returned from both these events I thought I better put a little something up about them and the experiences I had there.

Unfortunately Oggcamp and LinuxCon followed each other directly this year, so it meant a lot of heaving about over the course of about a week. Here’s part 1 where I will detail my time at OggCamp.

wpid-IMG_20131019_085706.jpg

The event I look forward to all year, took a little longer to arrive this year due to it being moved to October (Oggtober?), happened over the weekend of the 19th & 20th October and much fun was to be had. As being part of the crew last year was so much fun (and hard work) I couldn’t resist doing the same this year, although I was a part timer this year due to also running a Fedora stand and a stand for our LUG (RossLUG). I arrived on the Friday evening to the guffaw of an unexpected art exhibition going off in the lobby of the John Lennon Art and Design building at John Moores University, I say unexpected as it was exactly that. The exhibition, although the building was booked for over 6 months, was arranged the week previous and we couldn’t gain access to setup much on the Friday. Even when that finished the caretaker decided enough was enough and it was home time. So off I went to find Rita’s B&B at the other side of town. Lovely place, a bit dated but very homely and Rita was lovely, I described her to various folks as looking like the oracle from the Matrix (the first one not the second). Proper tea, coffee and biscuits on the bedside table too!

wpid-IMG_20131018_192904.jpg

With the plan of an early night in mind, ready for crew duties early Saturday morning, I jumped in a cab down to Leaf on Bold street for a few (free it turned out) beers and a natter to a few familiar faces. It got to around 11:30 and I was wandering around saying bye to folks feeling good about heading home early when I (mistakenly?) approached Pete Cannon (@dick_turpin) to say good night. Pete: “Don’t go stay for another!”
Me: “I can’t I’ve got crew duties in the morning and I don’t want to be rough like I was last year, besides I’ve ran out of money”
Pete: “Ahh don’t worry about that, I’ll get you a beer”

Who am I to refuse a free beer? Anyway several beers later I managed to get in bed at around 3am!!! I think even Felim Whitely bought me a beer at some point.

7AM breakfast I said, urgh I hate the world! The bacon was actually drying whatever was left in my mouth and there wasn’t enough coffee in the world to make me wake up and enjoy anything!

Made it to the venue at around 7:45 and proceeded to get the Fedora and RossLUG tables setup for the day. The Fedora stand had the usual swag to be given away, stickers, badges DVDs. Where the RossLUG stand consisted of the various projects seen at the LUG mostly taken over by the home automation projects Tim (@tommybobbins) and myself have been working on. Oh and stickers!

wpid-1382174326116.jpg

wpid-1382174175899.jpg

After setup of the venue and tables folks started arriving, pleasingly when Pete arrived he was looking a similar colour to his Creative Commons T-Shirt, and not the black one 🙂

peterc

Breakfast butties arrived around 10:30 which complimented my full English nicely but unfortunately meant I couldn’t manage any of the pizza at lunch.

I wasn’t intending on going to many talks over the weekend as I prefer to chat to folks and manning the stands gave me a great opportunity to meet some fantastic people. But I did make it to Freaky Clowns (@__freakyclown__) talk which as always is brilliant but scares the shit out of me.

wpid-IMG_20131020_131334.jpg wpid-IMG_20131019_095437.jpg

The other session I made it to was the live podcast with the UUPC folks, Dan Lynch (@methoddan) from Linux Outlaws, and the Crew Chief and Full Circle Podcast host Les Pounder (@biglesp) which was entertaining, especially Dan not knowing the UUPC format… Avid listener then Dan?

wpid-IMG_20131019_162220.jpg

By evening time we were due to head to the Raquet Club near the docks for some food and more beers but I was just broken with tiredness by this point so drove up in the car, had a few measly portions of food (sat too far away from the kitchen) and headed to bed early. Yes I made it to bed before 11!

Sunday I really enjoyed breakfast, company of a Belgian doctor and a Dutch couple during the meal was nice too. Made it to the venue around 8:45 so nice and early to make sure the stands were setup for the day. Stu and Tim turned up nice and early too excited for the day ahead. Truggles not so excited and much too ill after a night at the “Crazy House”? hmmm best leaving that alone I think.

Another fab day which seemed to be a lot more chilled than the Saturday there also seemed to be a lot of different faces wandering around. I managed to head to the live recording of the Full Circle Podcast which was entertaining. The rafflecast ended up being quite entertaining for me as I had donated a Raspberry Pi as a prize, along with some caps and mugs from Fedora. The Pi got given away along with a mystery power supply but the caps and mugs were nowhere to be seen. Afterwards I headed to the cupboard where I put the prizes on the Friday to find them in the same place. Turned out that the Pi belonged to Les Pounder and was the digital signage/campfire manager terminal for downstairs. So instead of the expected noobs installer some lucky winner will be getting some nice digital signage.

So that topped off the day nicely, all that was left for me to do was help clear up and jump in the car for Edinburgh.

Highlights of the weekend:

  • Seeing the people I only see once or twice throughout the year, whom I regard probably more as friends than people I see more regularly.
  • Meeting people with similar interests, such as the chap (I really wish I caught his name) who took a real interest in the home automation projects Tim and myself are working on.
  • Freaky Clowns talk of course.
  • The amount of technical bods it took to not get a Pi working on the WiFi and brick a router.

Lowlights:

  • Missing the TDTRS recording, although I know I will catch the podcast.
  • Having to wait another year to do it all again.

Why I’m uninstalling Ubuntu

I wouldn’t normally write about this kind of move, but I’m in a position where I feel I have to. A little over a year ago I made a decision to move from Fedora to Ubuntu, it wasn’t a decision that was easy after all I have been using Fedora since its first release, and Red Hat since around version 5. Needless to say I was (and still am at heart) a die hard Red Hat fan. There seemed at the time to be a draw to Ubuntu, I was feeling a buzz around the community there that I wasn’t really seeing with Fedora (although I don’t think I was looking), a lot was going on around the Unity project – whether good or bad, it was still going on. So I jumped right in, installing the latest release 11.10 I think it was, joined the forums/wiki/launchpad etc and started filing bugs and generally making a nuisance of myself.

All was good, I really felt like I was a part of something, even went as far as installing the latest test release (as I still am) and it really is a great distro. Unity took me a bit of convincing, but how most things just integrated was brilliant. I even gave a small donation when they asked.

So what went wrong? Well around a year later, I’m still running the latest testing release and still like the distro as a whole. Unity has broken (something in my profile) so I’ve reverted back to Gnome 3 which I’m quite happy with, but thats not the issue. The issue can probably only be described as politics and game playing. Now the Amazon thing didn’t really bother me too much, I kind of understand the reasoning behind that (besides, I uninstalled it) the donations thing was probably an unfortunate mistake. What isn’t a mistake however is taking people for a ride, both community members and the gen-pop.

So lets look at the madness behind Mir, a while ago it was announced that Wayland was to be integrated into a future release of Ubuntu, yet recently it was announced that they would be using their own product MIR. Did the Ubuntu community know about this? It seems not, but yet they have been working on it for over 8 months. Not community spirited if you ask me. I can kind of understand where they are going with Mir, so they can use it across all the devices they want to take over, but still… I just dislike the fact they have done wonderful things for Linux in bringing it to the masses, then deviate from the whole ethos of open source.

Another thing which disappoints me is the whole hoohar around the devices thing, showing what can only be described as a skin for Android really at large conferences just really proves who/where they are trying to be. If only they would stop with the big WOW factor announcements which don’t really have any substance and push for better software in the community, perhaps adopting a business model similar to Red Hat as it seems to have done OK for them.

On a more positive note, I’m quite glad to go back to Fedora, things are looking fantastic there and upstream which is where my heart truely lies!

GlusterFS Quickstart Howto on Fedora

GlusterHere’s a (very) quick howto showing how to get GlusterFS up and running on Fedora. Its probably better situated on a distro like CentOS/RHEL, Ubuntu Server LTS or Debian stable but where’s the fun in knowing it won’t break? Most of these commands are transferrable to other distros though, its Fedora centric due to the use of yum, selinux and systemd (systemctl).

Pre-requisites:
2x (or more) servers running Fedora, I used 18 in this example but i’m sure it shouldn’t change a great deal for newer releases. If it does I’ll try update this doc. The idea behind this setup is to use 2 servers as hypervisors (KVM) and have local storage but reslience, I won’t be covering the virtualisation side, purely storage so VM’s will be adequate for this setup.

So at this point we should have 2 clean installs of Fedora on 2 servers fully updated.
For arguments sake we’ll all them host1 and host2. with IP addresses of 192.168.1.50 and 192.168.1.51 respectively.
(you will need to add hostnames and IPs to /etc/hosts if you don’t use DNS)

Lets disable selinux and iptables for now to make this process easier:
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
setenforce 0
systemctl stop firewalld.service
systemctl disable firewalld.service

yum install nfs-utils glusterfs-server
systemctl start glusterd.service
systemctl start rpcbind.service

OK so now we’re installed we’re ready to start setting up Gluster, lets create a directory on both servers

root@host1 ~ # mkdir /gluster
root@host2 ~ # mkdir /gluster

Now lets get a volume created:
Do this on only 1 host.

root@host1 ~ # gluster peer probe host2
root@host1 ~ # gluster volume create vol1 replica 2 host1:/gluster host2:/gluster

These commands told the 2 hosts to become “friends” then created a glusterfs volume called vol1 with 2 replicas (hosts), you will need to change this to the number of hosts you run, and the paths to the volume on each host.

When you run the last command above it will tell you that your volume creation has been successful and that it needs to be started to access data. Lets do this:

root@host1 ~ # gluster volume start vol1

So now we have a functioning gluster cluster we need to mount it somewhere.

root@host1 ~ # yum install glusterfs-fuse glusterfs

Installs the relevant software to allow us to mount the volume, lets create directories and mount:

root@host1 ~ # mkdir /store
root@host2 ~ # mkdir /store

root@host1 ~ # mount -t glusterfs host1:/vol1 /store
root@host2 ~ # mount -t glusterfs host2:/vol1 /store

You should now be able to create files in /store on host1 and them be visible to host2 /store. Notice how we mounted the volume on the same machine it is hosted, this way we are always writing to local storage and syncing out.

Update: the same instructions will work on CentOS/RHEL/Scientific Linux, you will just need to install the EPEL yum repositories first – http://fedoraproject.org/wiki/EPEL