Postfix and “noatime” Mounts

Never – ever – mount a filesystem Postfix uses with the noatime option. If you have fast_flush_domains enabled (which is is, by default) and you have a lot of deferred mail for which you’re the relay host, it will cause mail delays because the flush service uses atime to decide when it should refresh the fast flush files. It does this by requesting delivery of every queue id in the file. If atimes are disabled, it will keep flushing the entire deferred queue over and over, resulting in horrible mail delivery performance.

Leave atime enabled (the default on mount) and get faster disks or hardware RAID with battery backed cache if you need a performance boost. Switching to a filesystem like XFS over ext3 also helps if you’re shuffling a lot of files around. But never mount as noatime – it’s never worth it.

SFTP Clients

What I end up using for SFTP clients:

Mac: Transmit ($29.95)
Windows: WinSCP (free, open source)

No pings, no comments.

Trackbacks/ping/comments are disabled because I’m not blog-happy enough to deal with the spam bots; I have better things to do than babysit a blog. (I really hate that word, too.)

Debian on a Dell PowerEdge 750

If you have tried to install Debian on a Dell PowerEdge 750 using the 2.6 kernel (or just using a 2.6 kernel after install), you may have noticed that it can’t find your CD drive. In order to fix this, you’ll need to make sure the following modules are loaded:

piix
ide-disk
ide-generic

You’ll need to load these modules to do a 2.6 install, too. Simply switch to the console after language selection and modprobe each of the modules listed above. The CD drive should be detected (verify through dmesg) and installation will proceed normally. After booting, add these to your /etc/modules file.

Serial Console Goodness

If you’re tired of messing around with KVM switches, monitors and keyboards, or need remote console access to your server, a serial console may be just what you need! It’s far easier than you think, and it’s convienent, especialy if you have a laptop or a really long serial cable to your desktop. Please note that the configs discussed here are for pure serial console access under Linux; if you need to mix the keyboard and mouse with serial console or you aren’t using Linux you can find that info with Google.

Some (most?) real server hardware has an option to redirect BIOS to a serial console. The Dell servers I’ve used do this and it allows you to interact with the system before it hits the bootloader. Enable it, it’s handy. Next you’ll probably want to redirect your bootloader to a serial console. If you’re using GRUB, simply add the following lines to your grub config file:

serial --unit=0 --speed=115200
terminal serial

Note: the unit number can be 0 through 3, which corresponds to COM1 through COM4. Speed can be any valid RS-232 speed from 300 to 115200. I use 115200 on all my serial consoles, but if you aren’t sure what equipment may need to connect to it, 9600 is always a safe bet. GRUB assumes vt100 unless you specify –dumb since most all terminal equipment supports vt100. Or if you’re using LILO:

serial = 0,115200n8

Tell the Linux kernel to send all of its console messages to the serial port. Append the following to your kernel boot line:

console=ttyS0,115200

Replace ttyS0 with the proper serial port if you aren’t using COM1. COM2 would be ttyS1 and so forth; the speed setting can be changed as well. Note that if you boot into single user mode the console will be the serial port. Finally, you should spawn a getty on the serial port after the system boots. Add (or uncomment, most distros have this at the bottom already) to your /etc/inittab file:

T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100

(Some versions of getty, such as the one included with Red Hat 7.3, may require you to drop the -L flag. Try it both ways until it works.)

After saving the inittab file run telinit q to reread it. The serial console should become active immediately. Again, the port and speed settings can be changed to suit your needs.

That’s it! Reboot your server with your favorite terminal program (TeraTerm, Zterm, HyperTerminal, tip, minicom, etc.) connected to the serial port and see if it all works. When using your serial console don’t be tempted to enlarge the terminal window past 80×24 (80 cols 24 lines) since a lot of things will get confused and redraw the terminal quite badly. Yes, it’s small, but that’s why you have a scrollback buffer. With a serial console you’ll never need to use a keyboard and monitor on your server unless it dies in the POST phase, at which point you’ve got bigger problems than making room for a monitor.

Now for a quick recap (or for the impaitent):

For GRUB:
serial --unit=0 --speed=115200
terminal serial

For LILO:
serial = 0,115200n8

Kernel boot line:
console=ttyS0,115200

/etc/inittab:
T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100
(Try dropping the -L flag if this doesn’t work.)

Dell Servers and the Real Time Clock

It seems that Debian gets angry with Dell server hardware. I’ve heard this isn’t a problem on 2.6.10, but cross compiling for 64-bit in a 32-bit userland is annoying, so using Debian’s precompiled em64t-p4-smp kernel is less of a headache. The problem is that when the system boots, it hangs on the setting real time clock step; same thing happens with the saving/setting hardware clock steps. Passing acpi=off to the kernel fixes the problem, but then you don’t get HyperThreading, which is lame when your server has a Xeon or two in it.

The fix seems to be using the “genrtc” module in place of “rtc”. Simply add “genrtc” to your /etc/modules file (I added it to /etc/mkinitrd/modules too for good measure) and reboot without disabling ACPI. If all goes well, you should see double the number of CPUs enabled in your system.

This isn’t a unique problem to me, but you can find more information by searching for “debian dell rtc” on Google. You can also read about how HyperThreading speeds up Linux here:

http://www-128.ibm.com/developerworks/linux/library/l-htl/

Battlestar Galactica

At first I didn’t give much heed to the Battlestar Galactica miniseries – now a weekly series – on SciFi until I realized that the writer/producer was Ron D. Moore. Moore was one of the writers responsible for my favorite Star Trek series, Deep Space Nine. All of the episodes he’s credited for writing are ones I enjoyed. Another DS9 writer, Robert Hewitt Wolfe, wrote the first season of Andromeda, which I also enjoyed. After Wolfe was “let go” from that series it turned into Hercules in Space, causing its suck and lame factors to grow without limit.

Now that I know who was responsible for writing and producing Battlestar Galactica I’ll have to check it out. I have the miniseries on tape waiting to be watched when I have a few hours to spare.

802.11 b/g Channels

Here’s a handy chart that shows the 802.11b/g channel assignments. I’ve had this on another website for a long time, but the source page disappeared. Luckily I saved a copy so it can have a new home here.

802.11b channels

The key to wireless performance is to use non-overlapping channels.

Channels 1, 6, and 11 are the only three channels that don’t overlap. Others do; for example, if you had a base station on 1 and your neighbor on 3, you will still have interference because of the overlap. Grab a tool like MacStumbler or Netstumbler and find out what the channel allocations around you are and pick a channel that doesn’t overlap at all or has the least amount. This includes multiple base stations of your own: the SSID needs to be the same, but the channels must be different or you will have performance issues.