Jason Sares is a Giant Dork

Archive for December, 2008

Linux Quick Tip – Linux RAID Driver

If you buy a RAID Adapter often you’ll have to create a driver disk for your OS. Most of these are 1.44MB floppy images and since modern systems often lack a floppy drive I needed some way of creating the disk.

I used a USB stick and dd for Windows (I’m sure dd for Linux would work just as well)

From the Windows Comand Prompt:

C:\>dd if=mini.img od=x: (Where X is the drive letter of the USB stick)

Then just insert the USB stick before loading your Linux Installation Media.

Comments are off for this post

Linux Quick Tip – Benchmark Disk Performance

A very quick way to benchmark your disk performance is hdparm -t /dev/Xda (hda or sda):

you should get results like this:

[root@esx-mars root]# hdparm -t /dev/sda

/dev/sda:
Timing buffered disk reads:  358 MB in  3.00 seconds = 119.33 MB/sec

This is from a Dell PowerEdge 2900 with the PERC 5i SATA RAID Controller.

Roughly you want to see 50 MB+ per disk, if you have a RAID 0 of two disks you should get 100 MB+.

What numbers are your getting?

5 comments

Little Quick Tip – Rename Multiple Files

I used to use mv in a for loop or with exec, or xargs until I found a very useful command that’s included in almost every distro

rename

Usage

$ rename oldfilename newfilename *filepattern

Example

To rename all the files in the current directory ending with .htm to .html

$ rename .htm .html *.htm

You can use RegEx and for more sophisticated selections and use -n to test your changes before you commit them.

Comments are off for this post