Archive for the ‘Linux System Administration’ Category

Rebel Code

Friday, January 29th, 2010
No Gravatar

I was passed a very loved copy of Rebel Code by Glyn Moody. It’s about the beginnings of GNU, GPL liscensing, Linux, the Free Software Foundation, and the Open Source movement.

I was very interested to see that the two big contributors in making GNU, GPL, and the FSF gain such a big foot hold so early on (were otherwise they would have died) were largely successful because they were both extremely driven. It’s another proof that good large-scale things don’t just happen, it takes hard work and dedication. The two personalities behind GNU, FSF, and Linux in particular were driven by completely different things: Richard Stallman seemed to be almost driven by vengeance, offended about being turned down about various things related to his free OS. Linus Torvalds on the other hand seemed very laid back, but driven to see how things ticked, and from that driven to make the ticking things work like he envisioned. Both didn’t like to be called wrong about their ideas.

Running a completely different linux distro with chroot

Wednesday, October 21st, 2009
No Gravatar

The Linux chroot environments are often used to run pieces of software that are not compatable with the running distribution. For example, people running 64 bit Linux distributions will often create a 32 bit chroot environment based on that same distribution to run 32 bit software that might have better support. Adobe’s flash is a good example from the past: before 64 bit linux really gained popularity, only the 32 bit version of Adobe flash was available natively. But what if you need to install something that isn’t supported natively by your distribution at all, but is under a different distribution, and you’d like to keep package management the same?

Logrotate

Monday, September 21st, 2009
No Gravatar

Is the log for your custom app getting a little long? Have a need to keep your logs around but would like to keep their size down to a more managable size? Logrotate is the easy and powerful answer. You can tell logrotate to rotate your logs on various different triggers (daily, weekly, some other time, on a specific file size, on a specific number of lines, etc). You can tell it what to do before and after rotating (to put mysql into a safe state, or to restart apache to rebuild deleted log files, for example).

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.