Aug 022014
 

One of the questions I always ask myself when setting up a resilient server, is just how well will it cope with a disk failure? Ultimately you cannot answer that without trying it out.

But as practice (and to determine whether it mostly works), it’s perfectly sensible to try it out on a virtual machine.

Debian Installation

If you are looking for full instructions on installing Debian, this is not the place to look. I configured the virtual machine with 2GBytes of memory, an LsiLogic SAS controller with two attached disks each of 64GBytes.

The installation process was much as per normal (I unselected “Desktop” to save time), but the storage was somewhat different :-

  • Manual partitioning method
  • Create an empty partition on both disks
  • Select Software RAID
  • Create an MD device
  • RAID1
  • And put both disks into the RAID
  • Configure LVM
  • Create a Volume Group (“sys”)
  • Select md0 for the volume group device
  • Create logical volumes (boot: 512MB, root: 16GB, var: 8GB, home: 512M (it’s a server))
  • In the partitioning manager select each Logical Volume in turn and specify the file system parameters.

You will notice that no swap was created – this was a mistake that I’m in the unfortunate habit of making! However for a test, it wasn’t a problem and with LVM it is possible to create swap after the installation.

Post Installation

After the server has booted, it is possible to check the second hard disk for the presence of grub in the MBR (dd if=/dev/sdb of=/var/tmp/sdb.boot bs=1M count=1, and then run strings on the result). It turns out that nothing is installed in the MBR of the second disk by default. Which would make booting in a degraded environment an interesting challenge (i.e. you’ll have to find a rescue CD and boot off the relevant hard disk).

However this can be fixed by installing grub onto the second hard disk: grub-install /dev/sdb

Testing Resilience

But what happens when you lose a disk? Now is the time to test. Shut down the virtual machine and remove the second hard disk – leaving the first hard disk in place does not provide a full test.

If your first attempt at booting afterwards results in a failure to acquire a grub menu, then either you have failed to run grub-install as detailed above (guess what mistake I made?), or your BIOS settings don’t permit the computer to boot off anything other than the first hard disk.

However, in my second attempt, the server booted normally with the addition of a few messages that indicate that there is just one disk making up the mirrored pair.

Summary

  1. Yes, you can put /boot onto an LVM file system that sits on mirrored disks. That hasn’t always been the case.
  2. It is still necessary to run grub-install to put Grub onto the MBR of the second hard disk.
  3. It works.
Jul 202014
 

Last week we have seen two “incidents” where two rogue states attempted to pursue a political end via direct action, or action via a proxy. I’m going to concentrate on the deaths of children because then certain apologists won’t be able to say: “But they could have been terrorists” … or at least won’t have much in the way of credibility if they do.

In the first case, we have what appears to be a Russian-backed independence movement firing off a missile to bring down a commercial airliner (MH17) killing 80 children.

In the second case, we have the Israeli military trying to stomp on Hamas, and as a result of disproportionate military force and an inability to target accurately, have killed over 50 children.

It is interesting to compare the two to see what similarities and differences there are.

In terms of how accidental those deaths were, it’s fairly obvious that the downing of MH17 was an accident given that it appears that the Russian-backed separatists were boasting about shooting down a Ukrainian military transport plane at the time the airliner was downed. It’s also self-evidently not in the interests of Russia or the separatists to shoot down that plane.

In the case of Israel’s thugs (oops! I mean their military of course), it is probable that the children were not deliberately targeted, but you do have to wonder given Israel’s past and present behaviour (according to the Jewish Virtual Library, the total number of Israeli deaths since 1860 is 20,000 and the total number of Palestinian dead is nearly 100,000) whether Israelis regard Palestinians as sub-humans whose deaths don’t really count.

In terms of an individual, anyone who shoots at a legitimate target and misses, and “accidentally” kills a child instead is guilty of manslaughter. I see no reason why nation states, governments, and the military should not be held to the same standard.

If you cannot shoot without risking civilian casualties, then do not shoot.

The most interesting aspect of these two incidents has been the reactions to them. In the case of the deaths caused by the Israeli indiscriminate military action, it seems to be more or less: “Oh no, Not again!” whereas the reaction to the deaths of the aircraft passengers has been quite justified outrage at the actions of the Russian-backed separatists, and the denials from the Russian government.

Where is the condemnation of Israel’s military action? And where is the condemnation of the USA for backing a bunch of thugs?

It is true that Hamas are also a bunch of thugs who continue to target Israel with poorly targeted missiles, but these are in no way comparable to what Israel is doing – recall those earlier figures of 100,000 Palestinian dead and 20,000 Israeli dead. And yes, it is quite possible that Hamas is using human shields to “embarrass” Israel with civilian casualties.

Yet in all the time I’ve been watching this unending conflict I have yet to see Israel embarrassed by any Palestinian dead.

Even ignoring the morality of indiscriminate killing of civilians, it is about time Israel realised that this sort of thing doesn’t work as demonstrated by the fact that it is still happening today. Perhaps they could try something else more radical – like talking to Hamas.

Without any real expectation of something like this happen I would like to see :-

  • Israel admonished and sanctioned for indiscriminate killing of civilians.
  • USA admonished and sanctioned for it’s military support of a rogue nation state (yes that does mean Israel).
  • Russia admonished and sanctioned for thinking us foolish enough to believe it’s denial of involvement in the shooting down of MH17.