Archive for the ‘Linux System Administration’ Category

Expandable and fault tolerant filesystem

Tuesday, August 18th, 2009
No Gravatar

There are several problems with trying to create a large filesystem to store important data:

  • raid 5 isn’t expandable unless you find a harddrive that’s the same size as the others
  • LVM (Linux Volume Management) isn’t fault tolerant by itself, so if you lose one drive, your data is lost.

One of the best solutions I’ve found in dealing with these problems involves combining LVM with the Linux software RAID. You can cut up your collection of harddrives into common sized partitions, raid them together into several RAID5 collections (or even RAID1 collections), and LVM the resulting RAIDs.

VirtualBox as a development and testing tool

Monday, August 10th, 2009
No Gravatar

Sun’s VirtualBox package has been gaining steady ground on other virualization solutions in the areas of desktop os virtualization for some time now. Many have found VirtualBox 2 to be quite fast and snappy running Windows XP guest operating systems on Linux hosts. Version 3 was recently released that provided official support for things that they were previously experimenting with, like 3d acceleration for D3D and OpenGL applications on the guest OS. It’s even rumored to perform well playing games like Halflife 2.

Back to the basics, part 2: tar

Thursday, July 2nd, 2009
No Gravatar

One of the most common problems with tar is ending up with unexpected contents of directory structures in your tar archive (sometimes called a tarball).  I’ll show you how to create those nice, neat tarballs containing just the directory you wanted without the unnecessary preceding directory structure.

Back to the Basics with rm

Wednesday, June 10th, 2009
No Gravatar

At the Manitoba Unix Users Group last night, a common problem was presented as a warning to people new to unix based operating systems. The message was “All operating systems will let you shoot yourself in the foot. Unix based systems will let you shoot yourself in the foot really fast.” One of the examples was the dangers of using root while executing recursive delete commands.

Say  you wanted to get rid of all the hidden files in your directory (those starting with . for example .htaccess and .htpasswd)

DO NOT USE “rm -Rf .*” AS ROOT and be careful as a normal user!

Is my backup complete?

Tuesday, May 12th, 2009
No Gravatar

Many server administrators use rsync to synronize files between local as well as offsite media. Often it’s used within a scheduled backup script. But how can you tell if rsync was successful or not without looking through the output of the command in detail? If it wasn’t successful, how can you tell if it was an error or warning that you would normally ignore (for example, the “Partial transfer due to vanished source files” error that happens in  maildir files that come and go normally during the backup and don’t need to be backed up)? Here’s an example script that can help.