Archive for the ‘linux administration – tips, notes and projects’ Category

Recently I’ve had to do extensive work with Dell PowerEdge servers, and specifically Dell’s that use the LSI MegaRAID controllers. Anyone who has ever had to work with the LSI RAID controllers knows that the MegaCLI provided by LSI is the most cryptic command line utility in existence. MegaCli is available for Linux, DOS, Windows, [...]

A server’s primary hard drive crashed hard one fine day. Yes, a non-RAIDed “server” (*sigh*). The last thing heard from it was screams of read-only, and it was gone. We got the drive mounted via a SATA dock to a new machine. At this point, all attempts at mounting and fscking failed, and dmesg was [...]

If rpm / yum command hangs incessantly during operations or you see error messages, it likely means your RPM database has become corrupted. /var/lib/rpm/ stores the RPM database information, so to resolve you can just delete and rebuild the database using one of the two methods below like so: Method # 1 rm -f /var/lib/rpm/__db* [...]

When setting up Maildir in Debian 5.0 or Ubuntu 10.x, getting the generic mail applications working correctly can be extremely tricky. When you type “mail” in a default/stock installation, it is attempting to read mbox data and will not read your “Maildir”. Annoying, since the stock configuration for mail delivery in most mail servers is [...]

So you have a drive that’s gone bad, and you cannot mount it. How can you recover a bad superblock from a corrupted ext3 partition to get back your data? Linux ext2/3 filesystem stores superblocks at different locations so it is possible to recover data from a corrupted partition. Your error will likely look similar [...]

So you’ve got a process that is taking forever to complete, and is killing your server. Make it play nice. What is nice? You can run a program with modified scheduling priority using nice command (19 = least favorable): # nice -n19 /path/to/your/script.sh This will execute the script.sh with the lowest priority, meaning the system [...]

This article applies only to PERC 2/SC, 2/DC, 3/SC, 3/DCL, 3/DC, 3/QC, 4/SC, 4/DC, 4e/DC, 4/Di, and CERC ATA100/4ch controllers, and specifically for Dell PowerEdge servers. Be VERY careful when making any modifications to any disk array, as data loss is always possible. After some planning and preparation, it is possible to migrate array and [...]

As a system administrator, I’m always looking for new tools to make my job easier. I’ve been using ‘dstat’ now for about 3 months, and it’s something I don’t know how I lived so long without. This tool is quite versatile and informative, and interacts directly with the kernel to give you a nice colorful [...]

Linux sometimes dumps a huge file when a script crashes. These core files can build up and eat away valuable disk space. Some other methods of deleting core files will damage your server. Here are a few simple commands I use to find and delete these core dump files safely. Deleting files on Linux can [...]

Encountered this gem when I was attempting to install an overly simple/normal perl module (HTML::Template, though all will fail as a result of this). This actually has nothing to do with cPanel, the kernel, or CPAN. Instead, you’re actually hitting a PAM ulimit that is exhausting all of the available reserved memory required to install [...]