Category Archives: unix

Quick and simple version control

While I’m a big fan of version control change tracking in general, I regularly find that the main version control systems don’t do quite what I, in the role of system administrator, want.

Sometimes all I want to do is copy any individual file or set of files to somewhere permanent, and make a note of why I made that copy (e.g. making a text configuration change or updating a CSS file). Whether the file is in /etc, /usr/local/bin/ or /var/log shouldn’t matter, and whether it’s text or binary again shouldn’t make a difference.

I’ve asked and looked around, and the closest thing would be a backup script, but obviously they are more likely to mark a backup by time and date, not a reason for the backup, plus they need on-going management and installation on any server you’re using.

To come up with a solution, I’ve written a quick and simple Bash shell script (which should work on AIX, Solaris, etc, with Bash installed), which:

  • Asks for the reason for the copy
  • Copies all files specifed on the command line to /var/echange/ with a time and date appended to the name
  • Creates a text file named after the new copy of the file with .echange added which contains the original name and location of the file, and the reason for the change.

To make a copy I just run

ec index.html test.css

And I’ll be asked for my reason, simply end the input by pressing return, and the files will be copied.

If I want to find an old copy of the file, this way I can just run

find /var/echange -name “originalfilename.*”

and find all versions of the original file that I’ve copied, and the reason why I made the copy.

I don’t know if anyone else will find this of use, but since I want it to be available for me on various systems, I’ve uploaded the file to http://www.ewanleith.com/files/ec.txt – Simply download the file to your Linux server, copy it to /usr/local/bin/ec and mark it as executable, then create /var/echange and you’re good to go.

It can also work with any other directory than /var/echange/, simple change the line at the top of the bash script to wherever you want.

Linux Is On Parity With AIX Unix?

On the AIXchange blog I came across a link to an article stating that Linux is now on parity with AIX Unix, something people have been saying for at least 5 years now – each time, AIX proponents have been able to clearly show that AIX still had a clear advantage over Linux, though each time the advantage has been lessened.

This time, though AIXchange have given a number of reasons why AIX still leads over Linux, this time I don’t believe it’s true for the vast majority of users.

Firstly I’d like to say AIX I’ve used AIX ever since I left university, my first job was as an AIX sysadmin, and I don’t believe AIX is going anywhere fast – it’s a very stable, secure, high performance environment for people who need it.

Given that, I think after reading the article, I’d pretty much agree with it entirely. Sure, AIX has all the technology bits and pieces that Linux doesn’t have to the same level of maturity, but what business benefits do they provide over and above Linux?

In terms of IBM hardware and software support, IBM support Linux to the same level of AIX, on IBM system P (POWER), and system X (x86 hardware), you can go to IBM.com/linux and sign up for IBM’s Support Line for Linux, and get excellent quality support from IBM for your Red Hat and Novell Linux systems.

For the technical benefits around the excellent AIX LVM and other disk management tools like mksysb, NIM, savevg, and alt_disk_install, these are all fantastic but have largely been made irrelevant in the x86 world by the advanced virtualisation options available. Whether you use the commercial VMware vSphere, or the open source KVM option, you can do online snapshots, rollback, clone, and backup your entire Linux systems in ways above and beyond what AIX can do with PowerVM.

Mentioning virtualisation, yes PowerVM is rock-solid and can scale to great heights, it’s currently falling behing vSphere when it comes to both features and management tools, and the only outstanding feature it has over vSphere is the ability to scale from a machine from a fraction of a processor through to 32 processors without downtime or significant performance overhead (vSphere has a maximum of 8 vCPUs at the moment).

And that to me is the only area where AIX currently beats Linux – if you need a machine with more than 8 processors (not cores), and more than 255GB of RAM, then I would pick AIX every time, but other than that I would strongly recommend a Linux server running on top of VMware vSphere.

OpenStack – The future of private and public clouds?

This week, Rackspace and NASA (a cloud computing pioneer), annouced a major contribution of source code to the open-source community, with the launch of OpenStack – a project to develop the software needed to deploy and operate a fully operational cloud computing solution.

Combining work from Rackspace, who run a large public cloud system, and NASA who were among the first to develop private cloud systems, the new OpenStack system currently consists of “OpenStack Object Store”, a cloud-scale storage solution based on Rackspace Cloud Storage, and the newly developed “OpenStack Compute”, the basis for an Amazon EC2 competitor providing computing infrastructure on demand.

So what do Rackspace get out of this? Well, if things go to plan for Rackspace, then in 5 years you’ll be running your applications on an OpenStack cloud, which Rackspace will manage either in their own data centre as part of the Rackspace public cloud or as a dedicated set of machines in a private cloud they host for you, or even as a hybrid cloud with a baseline cloud computing capacity in an enterprise’s own data centre, with extra capacity available on demand in the Rackspace cloud. Of course, you could choose to work with someone else on OpenStack, but Rackspace will be hoping you choose to stick with a company that obviously knows the code well and has been running it successfully for several years. There’s a video interview with one of the Rackspace Cloud founders on Redmonk where this subject comes up.

While these contributions from Rackspace and NASA are significant pieces of the cloud puzzle, the real work of OpenStack is still to come – they have signed up 25 partner organisations, and are now working hard on completing the development and testing of the systems, and adding functionality.

The possibilities for “OpenStart Compute” in particular are significant, with cooperation from across the industry, we could see the rapid inclusion of technologies like CloudAudit, which helps companies verify the security capabilites of a cloud computing platform, and “Open vSwitch”, a network switch that operates inside the cloud, providing the management and security capabilities of a physical network switch but without many of the limitatioons that go with physical cabling.

Assuming OpenStack develops positively, it’s likely that there will be rapid additions of new systems like an “OpenStack Message Queue”, and “OpenStack Block Storage”, though much of the development will depend on the willingness of contributors to either hand over code that is currently closed source, or to start again with a clean slate and re-develop solutions based on the lessons they’ve previously learnt.

The other possibility is that Amazon continues to take the majority share of the cloud computing market, continues to grow their economies of scale and overall cost leadership, adds functionality to match any new additions to OpenStack (currently Amazon S3 and EC2 more than match OpenStack’s capabilities), and people learn to live with the limitations of a public cloud secutiy model.

Either way, the future of computing is significantly different from the way it operates today for most organisations.