Greetings! You have reached the memorydump site of Toni van de Wiel.

The main goal of this site is to serve as some kind of external memory for my mind. Too often I find myself re-inventing wheels that I'm sure I've invented before, but due to lack of proper search-capabilities of my brain are nowhere to be found again easily. Some parts of this site therefore may look like braindumps, where other parts are more structured. With Google as your friend, some of these might even be of use to you...

Hot swapping SATA disks

Hot swapping disks appears to be possible:
scsiadd -r 5 0 0 0
more testing needed

fixing unreadable (pending) sectors on a RAID6 array

So I got this email from my fileserver stating:

Subject: SMART error (CurrentPendingSector) detected on host: fs

This email was generated by the smartd daemon running on:

host name: fs
DNS domain: local
NIS domain: (none)

The following warning/error was logged by the smartd daemon:

Device: /dev/sde, 1 Currently unreadable (pending) sectors

Now, I received those before, never really paying attention to them. Or I simple forgot about them, since the email also stated:
No additional email messages about this problem will be sent.

Growing RAID6 array

I've bought a nice 3TB disk which I am going to add to my fileserver. This blog entry wil document what I need to remember from what I learned during the process.

Make sure the rebuilding/reshaping of the array does not put too much strain on the server. I've seen VMs go haywire because of unresponsive NFS-shares
# echo 20000 > /proc/sys/dev/raid/speed_limit_max

add the new partition (which is the same size as the rest of the partitions in the array 990GB) to the RAID6 array.
# mdadm --add /dev/md1 /dev/sdf1

Mini DV MD80 camera: setting date/time

Every post on the internet on this subject instructs to create a tag.txt file to set the date and time.
On the particular device I bought (from 1dayfly.nl) it seems to be the following:
filename: time.txt
yyyy.mm.dd hh:mm:ss

Using iptables and Squid for transparent proxying

I wanted to listen in on the http traffic generated by my Android phone. The phone is not rooted (yet) so installing proxy apps is a no-go. Since the phone is connected over WiFi to my router, it was reasonable easy to redirect the http-traffic to a box running a Squid transparent proxy.

traffic coming in from the phone destined for any host on post 80, send that to the box running squid on port 3128:
iptables -t nat -A PREROUTING -p tcp -s phone-ip --dport 80 -j DNAT --to squidbox-ip:3128

A UPS might be a good idea

I was planning to switch to async NFS because of the increased performance. Reading and thinking about the way this works made me realize that having just RAID-6 is in no way a guarantee that my files are safe all the time. I have had one power outage since running this server and although the fileserver and the ESXi machine came up nicely after power was restored there is no guarantee that the content of the filesystems is not harmed after this.

So it is time to buy a UPS. After some investigation I decided to buy the APC BackUPS 700G.

Asrock SATA3 controller issues

The reason I originally ditched the fileserver-within-ESXi approach was mainly because I had too few SATA ports in the ESXi box. The Intel board only had 5 internal SATA connecters and 1 eSATA, but that was not enough to run a 5 drive RAID6 array plus the two drives I needed to run my current 'production' VMs.
I spotted this ultra-cheap PCIe-1x card made by Asrock (http://azerty.nl/producten/product_detail/?ID=263358) and made this available to the fileserver VM by means of the PCI passthrough function of ESXi. This card identifies itself as

Booting of a failed RAID array

One can not just have a RAID array and hope that things will work out fine if one of the disks fail. I need to test these things, just to see it work...
So, test 1: just unplug one of the disks (simply pull out the SATA connector on a running system)
The system seems to hang a few seconds when it tries to write to /dev/sda1 but then this happens:

[ 801.691113] raid1: Disk failure on sda1, disabling device.

fs:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdc1[2] sda1[3](F) sdb1[1]
9775424 blocks [2/1] [_U]

Syndicate content