If your system abruptly loses power, or if a RAID card is beginning to fail, you might see an ominous message like this within your logs:

EXT3-fs error (device hda3) in start_transaction: Journal has aborted

Basically, the system is telling you that it’s detected a filesystem/journal mismatch, and it can’t utilize the journal any longer. When this situation pops up, the filesystem gets mounted read-only almost immediately. To fix the situation, you can remount the partition as ext2 (if it isn’t your active root partition), or you can commence the repair operations.

Continue reading Fixing EXT3 Aborted Journal

Date posted: August 24, 2010 | Author: | 2 Comments »

Categories: Linux

Very useful search and replace command for the linux command line. This command is made up of a find command to find the files that you want and a perl command to do the text replacement.

The first part “find . -type f -name “*.html” -print” finds all of the files starting at the current directory that end with .html. The “-type f” makes sure that only files are found and not directories. The string that comes after the -name parameter is the filename to find. The -print parameter just prints the
the relative path to the found file.

The -exec parameter is used to execute a command with the found file. Everything after the -exec is executed until it reaches “;”.

Continue reading Search and Replace Text in Files Recursively

Date posted: May 15, 2010 | Author: | No Comments »

Categories: Linux

If your hard drive fails on your linux server it can always be stressful, but that is why you should always have some kind of raid setup and backups available. If you do not have a hardware raid card in your server you can use software based raid. I always set my servers up with RAID 1 (mirrored disk) and backups to an external server. Remember RAID is not a backup solution since deleting a file on your mirror will remove it from both disks. Below are the basic steps for replacing a mirrored disk in software raid using mdadm.

Remove all raid partitions on the failed disk

Continue reading Replacing a Mirrored Disk Using mdadm

Date posted: March 10, 2010 | Author: | No Comments »

Categories: Linux

You can use TCL/Expect to automate SSH logins to a remote server to execute a command on that server.
This automated login script can be modified to work with any command line program that prompts for passwords or user input. I have used similar scripts to automate CVS logins and updates, and I have automated many other tasks in linux. The following example will SSH into a server and restart apache.

Continue reading Automated Login Script Using Expect

Date posted: April 16, 2008 | Author: | No Comments »

Categories: Linux Programming

This is a shell script that I wrote that checks the Qmail mail queue size and if it is above a given number it will send an email alert. With this handy script you can be notified of when your mail queue is filling up before you run into problems. This can easily be added to a cron job. You may have to change some of the script to make work on your system.

Continue reading Plesk mail queue notifier script for qmail

Date posted: December 24, 2007 | Author: | No Comments »

Categories: Linux Programming Web

Who needs IPv6 for more IP addresses when you can just arbitrarily increase the ranges. When we enter the wonderful world of syndicated television anything is possible. I was watching an episode of Smallville from season 3 titled “Delete”, and in this episode the characters are being hypnotized to kill Chloe by mysterious email messages. During one of the scenes they try to find out where the emails are coming from by tracing the IP. When the computer screen is shown you can see the IP address and netmask, and both are invalid. The IP address is 134.541.168.170 and the netmask is I think it is interesting that they choose that particular subnet mask because the pattern is similar to the common netmask. At first glance most people wouldn’t notice this, but the geekiness in me made me rewind and pause. So now that I am done rambling and after providing not a single ounce of useful information, I present the screen captures:

Computer Screen
A graphical front-end for whois

Bogus IP Addresses
IP address and subnet-mask

Date posted: December 11, 2006 | Author: | No Comments »

Categories: Computers Linux

Copyright © 2013, Neil Bittner. All Rights Reserved.