Feb 082013
 

The news is swamped at the moment with the story about horse meat being found in various cheap meat products that were labelled as containing beef. Interestingly this has crowded out the news that pork has also been found in Halal meat products – which could be more of a concern to a certain segment of the British population than unexpected horses turning up.

To summarise :-

  1. If you’ve been tucking into cheap meat-based meals then you have probably had a bit of horse. That’s not good, but don’t get too excited – a horse isn’t too much cuter than a cow. Besides, did you really believe that the ultra-cheap products you were buying only contained premium quality beef? It’s a surprise that the contaminant wasn’t found to be rat!
  2. It isn’t just horse meat. Those who don’t eat it may be surprised, but horse meat is eaten quite widely in Europe. European regulation very carefully distinguishes between horse meat intended for human consumption, and horses carcases originating from pets or race horses who have received certain drugs as pain killers.
  3. Horses can be given bute (a pain killer), but only if they are not intended for human consumption. Bute was previously approved for use by people as a pain killer, but approval was withdrawn after it was shown after prolonged use to have certain adverse health effects. Europe goes a long way to avoid allowing human consumption of horse meat contaminated with bute, so it is unlikely in the extreme that any food in the UK contained any. Even if it did contain bute, it is still unlikely to have a significant adverse effect.
  4. If you’ve been eating meat products contaminated with pork, it is worth remembering that god (if he or she exists) is likely to point the blame for that squarely where it belongs – with those who labelled the product incorrectly.

There is a serious issue here. Food products should only contain what is listed on the ingredients list, and companies who cheat should be punished in some form. It’s a curious coincidence that we happen to have a government packed full of Tories who insist that government regulation is a bad thing, when government regulation is the only thing that protects us :-

  1. It’s government regulation enforcers who found this stuff out.
  2. It’s only government regulation that makes the sellers feel guilty rather than shrugging and asking “What did you expect for a pound?”.
  3. It’s only European regulation that means that the horse meat you’ve mistakenly eaten is almost certainly safe to eat.

But it isn’t necessarily Findus or Tesco at fault here. And when you come down to it, that horse meat in the freezer was pretty tasty yesterday before you knew, so shouldn’t it be just as tasty today?

And if you object to eating horses, please remember that whilst being ground up and sold as a beef burger is hardly the end we would want, being ground up, sold as a beef burger and then being thrown away is even worse!

Feb 062013
 

If you have previously used Linux’s volume manager (LVM) to set up disk storage, you may want to know about how to grow a filesystem safely.

Which is probably the big feature of any decent volume manager because accurately predicting the size of filesystems is a black art, and the only alternative – to make the root filesystem contain all of the storage is a dumb idea.

It’s actually really easy and can be done non-disruptively. It is done in two parts – effectively growing the “disk” device and then growing the filesystem itself.

Extending The Volume

First identify the volume you need to extend. You can of course simply run lvscan which will show a list of the volumes, and if you have named them sensibly will allow you to pick out the volume to extend. But the simplest way is simply to run df to look at the filesystem you want to extend :-

/dev/mapper/ssd-opt         7.9G  5.5G  2.1G  73% /opt

The device (in the first column) is what we extend. Now to decide how much to grow the volume by; just for the case of this example, we’ll assume that 2Gbytes is a sensible amount to grow the volume by. The command needed is :-

lvextend --size +2G /dev/mapper/ssd-opt

And that’s it. No need to shut down the server, dismount the filesystem, etc. Of course we haven’t quite finished yet.

Growing The Filesystem

What we have done at this point is the equivalent of making the disk bigger. We also need to tell the filesystem it is sitting on a bigger disk, and to do so we need to know the type of the filesystem. The canonical place for checking that is the file /etc/fstab (actually it’s the filesystem itself but that is going too far) :-

# grep opt /etc/fstab
/dev/mapper/ssd-opt	/opt		ext4	noatime		0 3

It is probable that you are looking at growing an ext3, ext4, or xfs filesystem. If not you will have to look up the details yourself.

Growing ext3, or ext4 Filesystems

This is done with the resize2fs command :-

resize2fs /dev/mapper/ssd-opt

Several points :-

  1. Yes it can be done “online” whilst the filesystem is mounted (and applications are busy using it).
  2. You need to specify the device containing the filesystem to grow and not the mount point.
  3. There is no need to specify the size … the size will be determined from the size of the device underneath the filesystem.

Growing xfs Filesystems

This is done with the xfs_growfs command :-

# xfs_growfs /opt

Several points :-

  1. Yes, it can be done “online”. In fact you have to do it with the filesystem mounted.
  2. You need to specify the mountpoint of the filesystem and not the device. Irritatingly different from the above!
  3. There is no need to specify the size.

How Reliable Is This?

Very.

There is always the chance that something could go wrong especially if you are operating “at the edge” (say you have a filesystem that is unusually large – several petabytes). But I’ve done online filesystem resizing for years in countless circumstances without an issue.

I’ll quite happily do it on the most important systems during working hours without losing a moment’s thought. However I do work in a place that takes backups seriously!

Feb 052013
 

So we’ve seen in the last few minutes that as expected a whole bunch of Tories have voted against the proposal to legalise gay marriage. Frankly nobody expected the “hang ’em high and whip ’em” branch of the Tories to vote for gay marriage.

Of course the media and the anti-Tories are gleefully announcing that the Tories are split down the middle and that this might just be the beginning of the end. Of what I’m not sure.

Much as I would like to see the Tories self-destruct, it is very unlikely to happen. This was a free vote – where MPs were encouraged to vote with the conscience rather than according to the party whip. Whilst it is entirely possible that a party who wants to get something through that will be unpopular with their own members, will resort to a free vote, it is a move to be encouraged.

After all, it would be nice to see MPs always voting with their conscience!

Feb 032013
 

It is all too easy to just condemn those vile dregs of humanity who work for the gutter press, and pander to the lowest tastes of people in the name of “news”. They are, after all responsible for the low opinion everyone has of journalists which must be galling to those who actually deserve the title “journalist”.

But we must also remember that despite how unlikely it seems, these dregs actually believe that they are real journalists. This makes them dangerously deluded.

In a less enlightened society, we could amuse ourselves by watching the antics of such creatures – as indeed was done in the past with those poor unfortunates who populated places such as Bedlam, but whether we do that or try to treat them, we do need to keep society safe from their destructive activities.

By all means provide them with a safe community where they can carry on with their “journalistic” activities without harming the real world. And eventually once they have been cured of the delusion that they are real journalists, they can be released into the communities as hack writers of romantic fiction and the like.

Feb 032013
 

For years people have been talking about how a European-like café society would be a good thing to change the English drinking culture.

Perhaps. But have you noticed just how many bars, coffee shops, and restaurants are already sticking tables and chairs outside ? Which is all very well, except when they don’t use their own property but start blocking the public thorough-fair.

Now I don’t object to tables and chairs outside – I’m very partial to sitting down in a shady spot outside with a good book and watching the world walk past; if that shady spot happens to have waitress service with endless refills of coffee, so much the better. But there’s a right way and a wrong way to do this.

And the wrong way is to put the tables and chairs right outside the shop door and so force pedestrians walking past to make a detour. This is annoying enough on it’s own, but gets a whole lot more annoying when you are forced into the street and dodge the traffic, or forced into the centre of a pedestrian precinct out of the shelter of the shops – and so get drenched.

Do it properly, or not at all!