hdparm -Tt /dev/hdX (where X is your hard drive or CD/DVD drive). Now you are ready to tweak your settings.
NOTE! The performance of the drives in your system depends on several things, among those are the kernel version and patch set you are using.
If you are using RedHat/Fedora you can configure each drive by using these settings in/etc/sysconfig/harddiskhdX (where X is your drive, e.g. in my case e and g):
USE_DMA=1 MULTIPLE_IO=16 EIDE_32BIT=3 LOOKAHEAD=1 EXTRA_PARAMS=-S242 # sleep setting.
/etc/conf.d/hdparm, and add a line for each drive:
disc0_args="-d1 -m16 -c3 -S242 -u1" disc1_args="-d1 -m16 -c3 -S180 -u1" cdrom0_args="-d1"
Using these settings gives me a performance of (Tested using hdparm -Tt /dev/hdX):
/dev/hde: Timing cached reads: 728 MB in 2.00 seconds = 363.15 MB/sec Timing buffered disk reads: 156 MB in 3.01 seconds = 51.85 MB/sec
I recommend using Logical Volume Management instead of regular static partitions. But if you do not have the possibility to use LVM2 I would recommend the partition scheme in table 3.1 for a desktop Gentoo system.
NOTE! /opt, /usr and /var doesn't have to be separate partitions, I just prefer it that way
I prefer to use the ext3 filesystem on my root partition, and ext2 on /boot. Ext2 uses less space, because it does not use a journal. On the rest of the partitions I prefer a fast filesystem like ReiserFS or SGI's xfs.
| Mount point | Size | Comment |
|---|---|---|
| /boot | 100MB | For kernels, I currently use 12MB, so less is ok |
| / | 400MB | Should be larger if it should hold /opt, /usr and /var |
| /home | Rest of drive | As much as you need for your documents, music, movies and so on. If you have Wine installed and use a folder in your home directory for Windows applications, remember to have extra space for those. I currently have a couple of games installed, and they use about 6GB of space |
| /opt | 1GB | Used for applications like Opera, VMWare, Java and OpenOffice.org |
| /usr | 4GB | Here is the largest part of the system installed, I currently use 2,7GB on my workstation |
| /var | 2GB | Is enough space to compile X.org and KDE |
| swap | Size of you memory | E.g. 512MB swap with 512MB ram |
LVM2 is a simple and elegant way to manage you partitions. Normal PC partitions are "hardcoded" to the disc, e.g. if one of your partitions run out of space you will have to either: 1) repartition your whole hard drive (e.g. back all data up, repartition, reinstall, restore data) or 2) buy a new hard drive and move your data to that disk. With LVM2 you could just resize your partitions (Called Logical Volumes in LVM) on the fly, without rebooting!. And if your drive is completely full, just add a new drive and expand your logical volume to include this new disk.
To use LVM2 you will need kernel support for it:Device Drivers --->
Multi-device support (RAID and LVM) --->
[*] Multiple devices driver support (RAID and LVM)
<*> Device mapper support| Manu. | Model | Size | Specs. | Status | Noise |
|---|---|---|---|---|---|
| IBM | Deskstar GXP75 | 30GB | 2MB cache, ATA100, 7200RPM | Dead (1) | Very noisy, high pitched spinning sound, high seeking sound |
| IBM | Deskstar GXP120 | 40GB | 2MB cache, ATA100, 7200RPM | Dead (1) | Very noisy, high pitched spinning sound, high seeking sound |
| Maxtor | DiamondMax Plus 9 (6Y120P0) | 120GB | 8MB cache, ATA133, 7200RPM | Running fine (2) | Low noise, low seeking sound |
| Maxtor | 541/DX (2B020H1) | 20GB | 2MB cache, ATA100, 5400RPM | Running fine (3) | Rather noisy, high seeking sound |
| Seagate | Barracuda 7200.7 Plus | 160GB | 8MB cache, ATA100, 7200RPM | Running fine (4) | Very low noise, almost no seeking sound |
| IBM | IBM-DJSA-210 | 10GB | ATA66, 4200RPM | Running fine (5) | Very low noise, no seeking sound (it's a laptop drive) |
| IBM | Travelstar 3XP | 3GB | 96KB cache, 4000RPM | Running fine (6) | Rater low noise, no seeking sound (it's a laptop drive) |
hdparm as with your hard drive, you should at least enable DMA, so that your DVDs don't skip :)
For instructions on how to burn CDs in Linux please read my CD burning guide.
To utilise an external device case in Linux (containing either a CD-rom, CD-R/RW or hard drive), you first of all need generic USB support or Firewire support. Then the following should be enabled in your kernel:
Device Drivers --->
ATA/ATAPI/MFM/RLL support --->
<*> ATA/ATAPI/MFM/RLL support
<*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
<M> SCSI emulation support
SCSI device support --->
<M> SCSI device support
<M> SCSI disk support
<M> SCSI CDROM support
<M> SCSI generic support
USB support --->
<M> USB Mass Storage supportmodprobe usb-storage modprobe sd_mod modprobe scsi_mod modprobe sg modprobe sr-mod
/dev as sdaX or sdbX (X is a number) depending on how many other SCSI devices you have in your system. You can mount the device with: mount /dev/sdaX /mnt/usb-storage/ -t vfat or what ever file system the drive is using./etc/fstab
/dev/sdaX /mnt/usb-storage/ vfat noauto,user,quiet,defaults,sync 0 0
udev as device manage is a good choice to ensure that your USB device always get the same /dev entry.