A Project Blog

Linux Software RAID10 Benchmarks

by @ January 31, 2010. Filed under file systems, server

Tests are done across four 7200RPM SATAII drives on a PCI (32-bit, 133MB/sec theoretical max) SATA II card, probably the slowest bus configuration possible. Done on Ubuntu 9.10 AMD64 Server.

Benchmark is a simple ‘dd’ sequential read and write.

write: dd if=/dev/zero of=/dev/md2 bs=1M
read: dd if=/dev/md2 of=/dev/null bs=1M

mdadm –create /dev/md2 –verbose –level=10 –layout=n2 –raid-devices=4 /dev/sd[ftlm]1

write: 13.2 MB/s
read: 4.0 MB/s

mdadm –create /dev/md2 –verbose –level=10 –layout=f2 –raid-devices=4 /dev/sd[ftlm]1

write: 48.3 MB/s
read: 92.7 MB/s

mdadm –create /dev/md2 –verbose –level=10 –layout=o2 –raid-devices=4 /dev/sd[ftlm]1

write: 47.4 MB/s
read: 98.7 MB/s

And some comparisions:

RAID1

write: 38.9 MB/s
read: 64.8 MB/s

Single Disk

write: 59.4 MB/s
read: 71.9 MB/s

Remove Stale LVM Devices

by @ January 23, 2010. Filed under file systems

Have an LVM device left on your system from a drive that was removed before pvremove was run?

$ sudo dmsetup remove /dev/mapper/removed-device

My Tivo Twitters

by @ September 22, 2009. Filed under devices

I wrote a short script that sends a Tweet whenver my Tivo HD starts recording a show. You can download it below. It runs best on a Linux computer that can constantly poll the Tivo.

Download: tivo_twitter.sh script

Results: http://twitter.com/30west

365 Days of Uptime on a Linksys router

by @ July 8, 2009. Filed under devices

I passed 365 days of uptime on my Linksys WRT54GL v1.1 router. It’s running DD-WRT firmware, and sits on a large APC UPS. Total data transfer on the router’s WAN port is reported at 1,570,619 MB down/ 79,832 MB up.

365days

Replace an LVM Drive with a Larger One

by @ March 21, 2009. Filed under file systems, howto

LVM allows you to hot add devices to expand volume space. It also allows you to hot remove devices, as long as there are enough free extents in the volume group (vgdisplay) to move data around. Here I’m going to replace a 400 GB drive (sdg) with a 750 GB one (sdf) from logical volume “backup” on volume group “disks”. It does not matter how many hard drives are in the volume group, and the filesystem can stay mounted.

  1. Partition and create a physical volume on the device

    $ sudo pvcreate /dev/sdh1

  2. Add the new drive to the volume group

    $ sudo vgextend disks /dev/sdh1

  3. Move all extents from the old drive to the new one (this step may take hours)

    $  sudo pvmove /dev/sdg1

  4. Remove the old drive

    $ sudo vgreduce disks /dev/sdg1

  5. Expand the logical volume to use the rest of the disk. In this case, another 350GB.

    $ sudo lvextend -l+83463 /dev/disks/backup

  6. Expand the file system

    $ sudo resize2fs /dev/disks/backup

Finding and Building RAID Arrays

by @ November 4, 2008. Filed under file systems

Scan a system for RAID arrays and save findings so the array reappears across reboots:

mdadm --detail --scan >> /etc/mdadm/mdadm.conf

Create a RAID5 array out of sdm1, sdj1, and sdk1 (all partitioned with raid-autodetect partitions)

mdadm --create /dev/md1 --level=5 --raid-devices=3 /dev/sd[mjk]1

Start Folding@Home on Boot with Screen on Ubuntu Linux

by @ March 1, 2008. Filed under howto, shell

Quick instructions to get Folding@home (or any other program) to run at boot before user login on Ubuntu Linux. This probably works on other distros with an rc.local file too.

1. Install F@H client, mine is in /opt/folding

2. Create a simple script, I called mine folding.sh and is only has:

#!/bin/bash
cd /opt/folding
./fah6 -smp

3. Put the screen command in /etc/rc.local. This will execute as user nick (su nick -c), “-dmS” will create the session detached and name it folding, and “bash –rcfile” will allow the screen session to keep running even if folding quits.

su nick -c “screen -dmS folding bash –rcfile /home/nick/bin/folding.sh”

Folding@home now starts whenever the computer boots, before anyone logs in. Nick can reattach to it and  control it or watch the progress by running “screen -r folding”.

Tripwire on Ubuntu 6.06

by @ December 23, 2007. Filed under howto, server

Quick instructions to getting Tripwire installed and running on Ubuntu 6.06 LTS (Dapper Drake). For more detailed instructions check out this site.

1. Install Tripwire. Say Yes to everything, and create some passwords.

% sudo apt-get install tripwire
% sudo tripwire -m i

2. Fix the policy. I was getting many errors that looked like:

### Warning: File system error.
### Filename: /root/.Xauthority
### No such file or directory

I removed the non-existent files from the policy file with the following commands:

% sudo cp /etc/tripwire/twpol.txt /etc/tripwire/twpol.txt.bak
% sudo vim /etc/tripwire/twpol.txt
% sudo tripwire --update-policy -Z low /etc/tripwire/twpol.txt

Later, when you need to update the database, such as after running updates (adjust the date and number from then end of the file, or sometimes you can just drop the whole -r flag):

% sudo tripwire -m u -r /var/lib/tripwire/report/closetbox64-20071223-133927.twr

By default, Tripwire will be set to email whenever it sees changes. To quickly check the status, run:

% sudo tripwire --check

Run a Command on Boot for Ubuntu

by @ October 10, 2007. Filed under server

I used this to start fetchmail on an Ubuntu 7.10 server running Request Tracker.

Edit /etc/rc.local, add your command, make sure it doesn’t create any output. This is my command:

su rt -c “fetchmail -d 300″ > /dev/null 2>&1

It starts a background fetchmail process as the “rt” user, just as the Request Tracker documentation states.

erm

by @ September 11, 2007. Filed under ramblings

Dear Intel,

Thank you for including Windows AHCI drivers on floppy disks with your new DQ35JO motherboard. However, putting a floppy disk drive controller on the motherboard would be useful too.

Thanks,

Nick

« Previous
Next Page »

Copyright ©2005-2007 Nicholas Brand. All rights reserved.
powered by WordPress.

categories:

links:

blogroll:

search:

archives:

February 2010
M T W T F S S
« Jan    
1234567
891011121314
15161718192021
22232425262728

other:

computers:

  • mini
  • closetbox (server)
  • backupbox
  • netbook
  • htpc
  • shuttle
  • icebox (desktop)
  • thinkpad
  • other devices:

  • tivohd
  • nokia 770
  • personal:

    del.icio.us
    Last.FM
    Amazon Wishlist
    Digg
    Twitter

    20 queries. 0.151 seconds