NAS space getting low

Alas after 3 running for 3 years the space on my home NAS is running low.
Filesystem            Size  Used Avail Use% Mounted on
/dev/md0              915G  905G  9.9G  99% /
So it's time to upgrade however due to budget constraints and the fact I need 2 for raid it will only be to 2TB drives.
Now comes the question of which disks to use. Currently I use 1TB Samsung HD103SJ drives and to be honest they've served me well in a 24/7 environment running for 3 years. 
Go with cheaper Toshiba drives for £60 each however i'm a little cautious as I haven't used Tosh drives much. 
Or for £77.96 each I can have the quality Western Digital "RED" drives but reading the reviews on amazon there seems to be an issue with warranty being 'out of region' which means they will not honour the warranty in the UK meaning you would only get the 1 year warranty from amazon and not the full 3 year WD one. It also appears the seller is shipping the 3 platter version instead of the 2 platter one which perform better with less noise.
After some research and reading of reviews i've decided to stick with the samsungs and found them slightly cheaper here
Continue Reading

Testing usb flash drive speeds in linux

I’m pondering a project which will need a reasonably fast write usb flash drive so I decided to root around in drawers behind cupbaords and under sofas to find some to test.

All are formatted as FAT32 and tested on my Debian linux box.

read test conducted using dd if=/dev/sde of=/dev/null bs=10000 count=10000
write test conducted using dd if=/dev/zero of=/dev/sde bs=1M count=100

Sandisk cruzer slice 8GB
r 100 MB copied, 6.01249 s, 16.6 MB/s
w 105 MB copied, 28.5709 s, 3.7 MB/s

integral Courier 4GB
r 100 MB copied, 6.60859 s, 15.1 MB/s
w 105 MB copied, 23.9367 s, 4.4 MB/s

Sony Microvault 4GB
r 100 MB copied, 5.85735 s, 17.1 MB/s
w 105 MB copied, 11.8885 s, 8.8 MB/s

Integral AG47 4GB
r 100 MB copied, 5.53511 s, 18.1 MB/s
w 105 MB copied, 13.9816 s, 7.5 MB/s

Continue Reading

Installing Debian Lenny Via USB Flash

On existing Debian machine insert formatted usb flash

dmesg should show something similar to

usb 4-4.4: new high speed USB device using ehci_hcd and address 8
usb 4-4.4: configuration #1 chosen from 1 choice
scsi4 : SCSI emulation for USB Mass Storage devices
usb 4-4.4: New USB device found, idVendor=0781, idProduct=5406
usb 4-4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-4.4: Product: U3 Cruzer Micro
usb 4-4.4: Manufacturer: SanDisk
usb 4-4.4: SerialNumber: 45271013A181B72F
scsi 4:0:0:0: Direct-Access     SanDisk  Cruzer           8.01 PQ: 0 ANSI: 0 CCS
sd 4:0:0:0: [sde] 3907711 512-byte hardware sectors (2001 MB)
sd 4:0:0:0: [sde] Write Protect is off
sd 4:0:0:0: [sde] 3907711 512-byte hardware sectors (2001 MB)
sd 4:0:0:0: [sde] Write Protect is off
sde: sde1
sd 4:0:0:0: [sde] Attached SCSI removable disk


zcat boot.img.gz > /dev/sde (where sde is your USB device name which was obtained from the dmesg output)

Now it is a good idea to remove un-plug and plug back in your USB devices so that the new partition table/structure is recognized by the Linux system. I had to do this. This refreshes the drives partition table stored by udev.

mount /dev/sde /mnt/ (replace sde with whatever your dmesg shows)


cp debian-508-i386-netinst.iso /mnt

umount /mnt/sde

That’s it. You have successfully created USB flash installation media. Just plugin the USB stick to the computer on which you would like to install Debian Lenny and set the BIOS to boot from USB stick.

Continue Reading

out of vmalloc space

My Debian box started throwing up 

allocation failed: out of vmalloc space – use vmalloc=<size> to increase size


cat /proc/meminfo showed

VmallocTotal: 114680 kB
VmallocUsed: 113940 kB
VmallocChunk: 316 kB

In order to fix it I edited


and added the vmalloc variable, before

kernel          /boot/vmlinuz-2.6.26-2-686 root=/dev/md0 ro quiet


kernel          /boot/vmlinuz-2.6.26-2-686 root=/dev/md0 ro quiet vmalloc=256m

(the default is 128m) reboot

cat /proc/cpuinfo

VmallocTotal:   245752 kB
VmallocUsed:     10884 kB
VmallocChunk:   234440 kB

Continue Reading

Redirection & Logging

This is more for personal reference than anything else. I wanted to log the output of different scripts i’d done but every time I wanted to I had to search the net bcause I kept forgetting (must be old age) so thought i’d put all the info in one place.

Continue Reading

Changing the default MOTD with Debian 5 Lenny

To change or remove the message, simply edit the /etc/motd file in
your favourite text editor either as the root user or using sudo and
then save the file. Clear all the text for no MOTD or replace it with
whatever you would prefer. The next time you log in it will show the
new (or no) text message.

This will work for now, but on reboot the file is reconstructed by
the /etc/init.d/ script. It writes out "uname -snrvm" to
/var/run/motd (/etc/motd is a symbolic link to /var/run/motd) and then
adds the text from /etc/motd.tail

Therefore to change what goes into the motd file on reboot, edit the
/etc/motd.tail file, making it blank for no message of the day.

If you don’t want the uname information to be included in the motd
file then you would also need to modify the /etc/init.d/

Continue Reading