disown: Bash Builtin

October 28th, 2010
1
2
3
4
5
6
7
8
9
10
11
12
13
14
disown [-ar] [-h] [jobspec ...]
  Without options, each jobspec is removed from the table
  of active jobs. If jobspec is not present, and neither
  -a nor -r is supplied, the shell's notion of the
  current job is used.  If the -h option is given,  each
  job-spec is not removed from the table, but is marked
  so that SIGHUP is not sent to the job if the shell 
  receives a SIGHUP.  If no jobspec is present, and neither
  the -a nor the -r option is supplied, the current job is
  used. If no jobspec is supplied, the -a option means to
  remove or mark all jobs; the -r option without a jobspec
  argument restricts operation to running jobs.  The
  return value is 0 unless a jobspec does not specify a 
  valid job.

Run… and a move to Cambridge

August 13th, 2010

I suppose things have been a little quiet recently; but I can blame that entirely on having to commute 2 hours a day to London for work… Yes, I’ve (temporarily) moved to Cambridge.

In other news, I went for a short run yesterday morning, only about 2 miles, but here’s the route:

2 mile run - 12th August 2010 in Cambridge

Ducknapping!

May 13th, 2010

Someone keeps stealing my ducks!

Red Home

Blue Window

Yellow Window

Green Monitor

And then they did it again!

Yellow CD Wallet

Blue Coin Jar

Red Laptop

Green Home

Quickly setting ERC accross all sd* devices

April 11th, 2010

ERC (Error Recovery Control) is used to determine how long a hard drive should wait before giving up and declaring a sector as unreadable.

On most desktop drives, where you do not have another copy in RAID, you want the drive to keep re-trying for ever.

When you’re running drives in RAID, however, you want the drive to error out quickly and allow a spare to be mirrored in.

If you want to use a Desktop HDD in your RAID array, consider running:

smartctl -l scterc,70,70 /dev/sda

This will set the timeout to 7 seconds, a relatively reasonable length of time to wait.

If you’re in the situation of having a large number of drives attached via conventional SATA controllers, like I do, you’ll probably want to make this a little easier. You can run:

for i in `ls /dev/sd[a-z]` ; do 
    smartctl -l scterc,70,70 $i ; 
done

For more details, you will want to have a read of this page.

Installing Linux on a Thecus n8800Pro

April 11th, 2010

The Thecus n8800Pro is a 2U, 8 drive, inexpensive storage array. It comes with a pretty GUI running what appears to be embedded Linux. Clearly I had to get a normal Linux distribution running on there!

A quick Google on installing Linux on other Thecus models suggests that they are standard x86 hardware and perfect to get Linux onto.

The first thing you’ll notice is that there’s no VGA port on the back of the device:

No VGA Port

Not to matter, there is a header on the motherboard for VGA:

There are headers!

First things first, you need a VGA cable, some pliers and other cutting instruments:

Tools you will need

Carefully remove the blue plastic case and as much metal as you can from the cable, you should end up with something looking like this:

Stripped Cable End

Next, you’ll want to ease your new plug into the holes on the motherboard. Use paper to insulate any metal parts of your plug from unintentional contacts on the motherboard. You’ll need to use something to hold the plug in place, paper works well. You may need to wiggle the cable a little to get signal:

The plug is in place with paper

Once you’ve got the cable in place, a quick reboot of the Thecus will give you the option to press DEL to enter the Phoenix BIOS:

Phoenix BIOS

Now you’ll need to change the boot order to allow your device to boot from USB CD-ROM before the Hard Disk. I couldn’t get LAN(PXE) booting to work. Then you’ll be able to boot from a CD and install an operating system of your choice.

A few useful bits of output:

lspci

00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1c.4 PCI bridge: Intel Corporation 82801GR/GH/GHM (ICH7 Family) PCI Express Port 5 (rev 02)
00:1c.5 PCI bridge: Intel Corporation 82801GR/GH/GHM (ICH7 Family) PCI Express Port 6 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GHM (ICH7-M DH) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
03:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
04:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
05:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
06:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)

cat /proc/cpuinfo

processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Core(TM)2 CPU         T5500  @ 1.66GHz
stepping    : 2
cpu MHz        : 1000.000
cache size    : 2048 KB
physical id    : 0
siblings    : 2
core id        : 0
cpu cores    : 2
apicid        : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
                 cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
                 syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2
                 cx16 xtpr lahf_lm
bogomips    : 3333.64
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:
 
processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Core(TM)2 CPU         T5500  @ 1.66GHz
stepping    : 2
cpu MHz        : 1000.000
cache size    : 2048 KB
physical id    : 0
siblings    : 2
core id        : 1
cpu cores    : 2
apicid        : 1
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
                 cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
                 syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2
                 cx16 xtpr lahf_lm
bogomips    : 3333.13
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

IPv6 is finally here!

April 10th, 2010

caffeine is ipv6 ready

caffeine.andymillar.co.uk is now fully ipv6 enabled!

[root@caffeine ~]# host www.andymillar.co.uk
www.andymillar.co.uk has address 212.13.201.140
www.andymillar.co.uk has IPv6 address 2001:ba8:0:1c7::d40d:c98c

Internet Gateway

March 25th, 2010

So I never get confused as to which server is the “Internet Gateway” and which is the “Private Gateway”, a slight modification to the motd was necessary:

Internet gateway

I won’t be getting them confused again :-)