[ Bjarni R. Einarsson / blog: IS EN ]


hdparm, noise and hot-swapping

2001-06-20 08:35
The Linux "hdparm" utility is very cool. It allows you to fine-tune your system's hard disks and CD-ROMs by turning various features on or off. One really nifty trick I learned a couple of days ago is "hdparm -E 1 /dev/cdrom". This tells my CD-ROM that I don't really want 56x transfer rates, 1x should be more than enough. Yes the drive goes slower but it becomes both more reliable (useful when ripping audio CDs) and completely silent. And single-speed CD-ROMs are more than fast enough to play back .mp3 files...

I've also been taking liberal advantage of the "hdparm -S n" command, to tell my IDE drives to spin down when I'm not using them. My machine at home has three hard drives, two of which are IDE. I put the system and all logs and so forth on the SCSI disk, which means that when I'm not actually using the computer the IDE disks are completely idle and spin themselves down - again making my computer more quiet. This also saves a tiny bit of electricity.

My final "hdparm" trick is to turn on/off DMA transfers as necessary. Generally I'd only mention the turning-on bit, but yesterday I found out that it was quite useful to be able to turn DMA transfers off on the fly as well. Last weekend I bought a bracket which allows me to simply pull out one of my hard disks and walk away with it when I like. After some expiramentation I discovered that I could hot-plug the disk (remove it and re-insert it without turning the computer off) if I just turned off DMA transfers and unmounted it first. And I'm not sure the unmounting was necessary...

This means that with careful configuration hot-swappable RAID5 for Linux can be had for the price of 3 IDE disks, plus 9000ikr for the brackets, plus the time it takes to configure the software RAID5 and tweak things with hdparm. Totally cool.

     Hotswap (Hrafnkell)
         True. :) (Bjarni)
             Power surges (Hrafnkell)

Comments are closed.

Nýtt í dagbókinni