Saturday, 12 October 2013

ownCloud - your in house cloud file service

As usual, a client of mine requires something out to of the ordinary - they love Dropbox and Drive, using them extensively at home, and now want something for themselves at work. The catch is - the work they do requires their data to be housed in Australia. Some legal requirement I gather for their funding. After searching through the archives in the mailing lists for SAGE-AU (www.sage-au.org.au) for wisdom and nuggets of gold I stumbled across ownCloud. Several of their members expressed an admiration for this software so I thought I'd check it out.

You can find out a lot more about ownCloud on their website - www.owncloud.org but here is a brief overview of my experiences using this application.

Firstly I installed it on a spare PC I had, after first putting Ubuntu 12.04 LTS on there. Installation was straightforward, securing it a bit less so - there's a bit of work to be done there but it's reasonably well documented and then I installed the application on my Windows 7 laptop. It all just worked and worked quite well. The application on my Windows 7 box works almost exactly like Drive/Dropbox - copy files into there and they sync up to my ownCloud server. They are then available from the web page - secured with SSL - and available anywhere. I've punched a hole through the firewall for testing purposes to get this available. My clients love it.

The configuration options are quite straightforward and although I did get rid of a lot of the helpful folder customisations, I can see why these would be useful to others.

In terms of load on the server it's been quite minimal so far. The PC is running quite happily, only a low end dual core box with 2GB of RAM and a 160GB hard disk drive.

The production box with be either a Dell PowerEdge T110 II or a HP N54L - depending on funding. Requirements are quite low and depending on the volume of data to be stored, either of these servers will do a great job. Cloud in the office for under a $1000!

If you have half an hour (that's all it took for me to get it going) check out ownCloud :-)

Friday, 4 October 2013

Goodbye Cisco SRP527 and hello... what?

Recently I learned the SRP527 was being End Of Life'd. This is a sad moment - we started using the Netgear DG834's to provide a low cost VPN solution between two sites, then graduated to the double the price Cisco and now I'm on the hunt again.

The issue we have is so many of our clients only need a single VPN tunnel between ADSL enabled sites. Cisco 800 series routers are too expensive and provide far more bang than the client usually needs or wants.

Currently we are investigating the Draytek range of routers. I've ordered two and I'll review them in my next post.

The SRP527's have been quite a reasonable unit for us. I've found that the wireless connectivity, particularly to Apple devices is a bit hit and miss, but it's generally provided us with a stable connection that has been 1Mb/s faster than other ADSL2+ devices I've used.

Bring on the next challenger!

Sunday, 15 September 2013

A tale of survival - FreeNAS and ZFS - and four disks with failed sectors

Recently, one of the FreeNAS storage devices we have at the office started to generate failed sectors on two of the disks. While an eyebrow raising event in and of itself, I wasn't particularly concerned. Living in the virtual outback as we do, I ordered some more disks. About 8 days later, the third of the four disks in our NAS started to throw out errors! Uh oh, it appears that we were on a slippery slope towards Doom!

I called the supplier demanding my disks only to find out they'd ordered WD Green drives! Noooo. I amended the order to get WD Red drives (which are designed for a NAS) and was informed it would take a day or two. The next morning the final disk was generating errors. We were getting close to some serious error thresholds on two of the disks and the third and fourth were well on the way...

Impatiently waiting for the new disks to arrive, I kept a close eye on the NAS. FreeNAS emailed me with alarming frequency about disk failure, imminent apocalypse and the like. The next day the WD Red drives arrived and three of the four disks were now generating large numbers of errors. I shut the NAS down (not taking the pool offline like I should have!) and replaced the most error prone disk. Restarting the NAS I added it back to the pool, replacing one of the dead disks and let it rebuild. Gradually I replaced all the disks until the pool was degraded with a corrupted file. 

On this filesystem are all my virtual machines, so I was a bit concerned about which file was corrupt. Thankfully it was an old backup of my current Windows 7 workstation so I deleted it. Oddly, I was unable to remove two of the old disks - every time I tried it would add them back.

After a bit of head scratching I realised I needed to delete the snapshots and once I did that, I was able to remove the disks from the pool and it changed from Degraded to Online and services were all restored. I've checked over the disks and every single one has failed since. One file lost out of almost 3TB of data - thank you ZFS and FreeNAS! Note to self - sort the backups out!

Friday, 6 September 2013

How to update XenServer 6.2

Since XenServer 6.2 came out, things have changed for the Citrix developed virtualisation environment. Specifically, the free licence no longer applies - you get a fully featured system out of the box and licensing is applied per socket. What this means in a practical sense for keeping your server updated is that using XenCenter to update it is not an option unless you've licensed it.

If you're like me and running XenServer in a quasi test / virtual environment, you won't have paid for a licence (as much as you'd like to). Therefore updating your VM hosts is a bit different and you have to use the command line. Now, it's important to note a couple of things that the XenServer FAQs don't necessarily specify. You have to use the xe command line program to upload and apply the patches. Do this in the following way:

Open up a cmd process (Windows+r, then type cmd and hit enter).

Go to the correct directory: cd C:\Program Files (x86)\Citrix\XenCenter and hit enter.

In this folder is the xe.exe application we'll need. The next thing to do is download the patches from Citrix. Usually they'll land in your Downloads folder. Extract the files from within and note where you've put them - typically it ends up being c:\users\ryv\\Downloads\XS62E002\ for example

You have to use xe.exe to upload and apply these patches to your server - send it to the Pool Master using either it's IP or hostname (if you have DNS set up correctly).

The syntax is:

xe patch-upload -s <hostname / IP> -u root -pw <password> file-name=<path to file>\XS62E002.xsupdate

In real life this command might look like this:

xe patch-upload -s 10.0.0.100 -u root -pw s3cret123 file-name=c:\users\ryv\Downloads\XS62E002\XS62E002.xsupdate

Once the file is uploaded, it gives you a UUID of the hotfix. It might look like this: 59128f15-92cd-4dd9-8fbe-a0115d1b07b4

Make a note of this - we'll need it in a tick.

To apply the hotfix to your hosts in the pool, the syntax looks like this:

xe -s <hostname / IP> -u root -pw <password> patch-pool-apply uuid=<hotfix UUID> and then hit enter.

In real life it might look like this:

xe -s 10.0.0.100 -u root -pw s3cret123 patch-pool-apply uuid=59128f15-92cd-4dd9-8fbe-a0115d1b07b4

You'll really need to reboot the hosts after this. Verifying the application is easy - go to XenCentre and choose your Pool, then click the General Tab and expand Updates. Note that the update is "Fully Applied" and you're done!

Have fun!

Sunday, 1 September 2013

Further adventures of XenServer on the HP N40L Microserver - a follow up

If you've read my previous post on this matter you'll know how delighted I was to get the SBS2003 server running so well under XenServer. Well it's been about 300 days since I did this work. How do I know it's been 300 days? Easy - the SBS2003 server crashed for other reasons and I was compelled to reboot both - with an uptime of 281 days! Apparently it has been running flawlessly - indeed the logs from both servers would suggest this.

Backups to a NAS were set up shortly after the server was commissioned and these have been running like a freight train - for which I'm profoundly grateful. Fortunately in this instance the server simply needed a restart and it was up, running and doing it's job quite happily.

I should also note that I blew a tonne of dust and dirt out of it and the whole time the N40L was like the little train that could :-)

If you have a low usage server and you're looking for a simply solution and doing a P2V migration doesn't scare you, then this is a fine option.

I now have two N40L's at home - one running FreeNAS and the other running Mint - both are running very well. I note that the price for them has gone up to $300 from eBay now....

Tuesday, 25 June 2013

Who owns the data?

Firstly, let me make it clear I am not a lawyer - IANAL. So naturally I was left stressed and scratching my head at a recent and very difficult situation.

A client of mine was having a shake up at the top end of the company. I don't know why and I didn't ask. The boss was on leave, directed in some way by the Board of Directors and I was being given conflicted requirements - one boss saying "Don't do anything - stuff is happening in the background" while the boss appointed by the Board was asking me to do various things to essentially keep the business running.

The way I've dealt with it, and I think it's probably the way to remember for the future is to request, in writing and signed by a large number of the Board members a document to give you permission to do as requested by the Board appointed Boss. I asked for the Board chairman, two other board members and the CEO or Boss to sign the document - thus ensuring a majority of high level stakeholders were involved in this process.

The key thing about this to remember is that my organisation was working with their organisation not individuals working with other individuals. As much as I might have a relationship with a member of that organisation, the important thing is that it's a relationship between two businesses. The Board is the controlling entity of that other business and the document you get from them means that if they aren't behaving there is a limitation to liability for me - I have been directed in a manner that I can reasonably indicate was from a legitimate controlling entity.

At the highest level too, the business's data all belongs to that business - not to the people working there. This can be tricky of course if there is some intellectual property involved but that's what the courts are for. At any rate, in this particular instance, once I had that paper shield (as it were) I went ahead and performed the tasks as requested. If I'm ever challenged on that, I can simply say - here is the document signed and presented to me by the Board of Directors. There isn't a higher power in the organisation so as far as I'm concerned as an IT Professional then I have to do as they ask, or we lose a client. I think as long as what I'm asked to do isn't in contravention of any ethical or moral strictures then this can work well.

I hope you, gentle reader, don't get caught in the middle like this. It's very uncomfortable and must be handled with some care. Good luck and have a good lawyer - like I do (thanks AP!)

Saturday, 8 June 2013

Reducing the winsxs folder - why it won't happen until Microsoft change Windows Updates

Recently I, along with thousands of other system administrators, have been swearing more than usual. If you're one of these people, you know why - the winsxs folder starts to use huge amounts of space on your hard disk. If you've gone by Microsoft recommended practice and created a 50GB C drive, then you also know how quickly this screws you.

Is there a way to reduce this folder? If you apply a Service Pack and go through the mechanism to apply it without chance of uninstalling it then you'll grab a little space back, but as you apply more updates, patches and new drivers the winsxs (or Windows side by side folder) will continue to grow. Theoretically it allows you to roll back if something goes wrong with some component of the operating system. In real life though, this isn't really done - we can just reinstall the busted component or whatever.

The system that controls the winsxs folder is tied to Windows Updates - and as we all know in Windows Vista, 7, 8, Server 2008, 2008R2 and 2012 Windows Updates can be hit and miss. Updates failing to apply, updates taking forever to apply or the ever annoying "Shutdown and install updates" that drags on forever. Vastly different to Windows XP of course.

Most often the fix is to replace the disk, or expand your hard disk size but this is frustrating and annoying. It's also expensive for our clients. Unfortunately it seems to be the best way to solve this issue - there is no short term fix or even any hint from Microsoft this will be solved.

I recommend that for new servers, a 100GB C drive is configured to give you breathing time until Microsoft finally manage to solve this issue. If you know better - hit the comments.

AppleTV and Jellyfin

 I like the AppleTV - what a great little bit of kit. The sad thing is, the application that connects to my Jellyfin server has been very hi...