Two "Rare" Linux Hard Drive Tips
I replaced a dying drive in my CentOS 3* Linux server yesterday. While I was doing it, I thought that it was possible that I had two tips that other people may not know about. It took a fair bit of reading to get them myself.
First, because the drive I replaced is just a storage drive, and not the system drive, I formatted it with EXT3 this way:
# /sbin/mkfs.ext3 -m 0 -j /dev/hdf1
The -m 0 tells format to not reserve any space for root, and the -j creates an ext3 journal. There's no real need to reserve 10 or 15 GB of space for root on a large drive that is only being used for data storage. This is overhead that is really only important on the system drive, to keep the drive from completely filling up and totally freezing the OS - root can still access the system. It also helps to have that extra space available so that the EXT3 filesystem can keep the likely more heavily used system drive reasonably defragmented. But it just wastes space on a drive being used solely for data storage, so get your gigs back!
Second, I also keep my tuned hdparm settings for all drives in /etc/sysconfig/harddisks. A few disks have their own parameters, so I copy /etc/sysconfig/harddisks to /etc/sysconfig/harddiskhda (hdb, hdc...) and modify it for that particular drive. Each disk that has no special parameters will use the defaults. Using this method, instead of just dropping the hdparm commands into rc.local to be executed near the end of the boot, will boost your drive to maximum speed at least halfway through the boot process, hopefully making for a faster bootup. This works for Redhat-based systems... other distros may have the option of setting some drive options (like DMA) in LILO, or, you may need to manually specify hdparm settings in a startup file that gets executed earlier in the boot process.
As a bonus tip, I also specify the '-S' option for hdparm (I use '-S180' which is 15 minutes at idle before spinning down), to spindown my additional storage drives when they are not actively being used, in order to save power, and hopefully, some wear and tear on the drives.
*Meh. Older version, I know. It works, is all I can say.
Pingbacks:
No Pingbacks for this post yet...
This post has 8 feedbacks awaiting moderation...


















