A Project Blog

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 Uncategorized, 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

hdparm -t /dev/md0

by @ June 22, 2007. Filed under file systems
/dev/md0:
Timing buffered disk reads: 1248 MB in 3.00 seconds = 415.65 MB/sec

MDADM Versions

by @ June 16, 2007. Filed under file systems

mdadm - kernel - distro

1.12.0 - 2.6.15 - Ubuntu 6.06 LTS
2.5.6 - 2.6.20 - Ubuntu 7.04

2.6.3 - 2.6.24 - Ubuntu 8.04 LTS
2.6.7 - 2.6.27 - Ubuntu 8.10
1.12.0 - 2.6.9 - CentOS 4.5

2.5.4 - 2.6.18 - CentOS 5.0
2.5.6 - 2.6.18 - Debian 4.0r0
2.6.1 - 2.6.21 - Fedora 7

MDADM 2.x on kernels >2.6.17 supports online resizing of RAID 5 arrays :)

Speed Up Rebuilding Linux Software RAID Arrarys

by @ May 16, 2007. Filed under file systems, server
# cat /proc/mdstat

md0 : active raid5 sdf1[7] sdb1[0] sde1[5] sdg1[4] sdh1[3] sdd1[2] sdc1[1]
1465175424 blocks level 5, 64k chunk, algorithm 2 [7/6] [UUUUUU_]
[>....................] recovery = 1.3% (3331200/244195904) finish=2357.0min speed=1700K/sec

Ouch. Two files are used to control the speed of rebuilding RAID arrays in Linux.

/proc/sys/dev/raid/speed_limit_min
/proc/sys/dev/raid/speed_limit_max

Even though my _max file is set to 200,000K/sec and my system is not doing anything, my RAID 5 rebuild process is hovering around the _min rebuild speed, of 1,000K/sec. With my setup this will take approximately 40 hours to complete, which is too long for me to wait. So, I pushed the _min speed up to 10,000K/sec, which will now take 6 hours to finish, and use slightly more of my system’s idle resources.

root# echo “10000″ > /proc/sys/dev/raid/speed_limit_min

Later I set _min to 50,000K/sec, and the rebuild speed topped out at 25,000K/sec.

#cat /proc/mdstat

Personalities : [raid5]
md0 : active raid5 sdf1[7] sdb1[0] sde1[5] sdg1[4] sdh1[3] sdd1[2] sdc1[1]
1465175424 blocks level 5, 64k chunk, algorithm 2 [7/6] [UUUUUU_]
[=>...................] recovery = 5.1% (12661840/244195904) finish=149.9min speed=25726K/sec

The rebuild took less than 3 hours, down from the original 40.

Find the Model Number of Your DVD Burner in Linux

by @ May 14, 2007. Filed under hardware, howto

$ cdrdao drive-info /dev/scd0

Cdrdao version 1.2.2 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version ‘ubuntu-0.8ubuntu1′

/dev/cdrw: LITE-ON DVDRW LH-20A1S Rev: 9L02
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0×0000)

Maximum reading speed: 8467 kB/s
Current reading speed: 8467 kB/s
Maximum writing speed: 8467 kB/s
Current writing speed: 8467 kB/s
BurnProof supported: yes
JustLink supported: no
JustSpeed supported: yes

Install the Ubuntu Studio Theme in Ubuntu Feisty

by @ May 11, 2007. Filed under howto

Instructions here.

« Previous

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

categories:

links:

blogroll:

search:

archives:

November 2008
M T W T F S S
« Mar    
 12
3456789
10111213141516
17181920212223
24252627282930

other:

computers:

  • backupbox
  • closetbox
  • icebox
  • thinkpad
  • minibox
  • briefcasebox
  • summary
  • mythbox
  • other devices:

  • tivo
  • nokia 770
  • personal:

    Last.FM
    Amazon Wishlist
    Digg
    del.icio.us

    23 queries. 0.288 seconds