Oct 222014

To set the spindown time to 2 minutes for /dev/sda, /dev/sdb and /dev/sdc, run:

for dev in /dev/sd{a..c}; do hdparm -S 24 $dev; done

To make this persistent, create the file /etc/udev/rules.d/11-sdb-spindown.rules to create a udev rule (only for /dev/sdb):

ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdb", RUN+="/usr/bin/hdparm -S 24 /dev/$kernel"

or to apply for all /dev/sd[a-z] drives:

ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", RUN+="/usr/bin/hdparm -S 240 /dev/$kernel"

Try running sudo udevadm trigger afterwards to apply the new rules.

To check the current power status of the drives:

Oct 212014

Using Samba (or SMB) shares on Linux is not difficult but you should know some tricks. First of all, you can use smbclient to probe your Samba-Server and try to connect to it. You can then mount an SMB-share locally.
In addition, I wrote a tool to synchronize a local directory with a Samba server (without mounting it) via Python. Scroll down for more details.

Using smbclient

To install smbclient and nmap on Arch Linux, do:

pacman -Sy nmap smbclient

Then you can use nmap, nmblookup and smbclient to communicate with your Samba server:

Oct 202014

Der SyncMaster 971P verfügt über ein hochwertiges PVA-Panel, das mit einem sehr hohen dyn. Kontrastwert (4.000:1), einem sehr hohen Betrachtungswinkel von 178°/178° (h/v) und schnellen 6 Millisekunden (G/G) Reaktionszeit aufwarten kann. Das elegante Design verleiht dem SyncMaster 971P der asymmetrische Dreigelenkfuß mit Pivotfunktion, gepaart mit dem versteckten Kabelführungssystem und dem blau beleuchteten Power-Button. Mit dem im Fuß integrierten USB 2.0 Hub (1x Upstream, 2x Downstream) gestaltet sich das Anschließen weiterer USB-Geräte unkompliziert und bequem.

Samsung 971P Dimensions of the Samsung 971P

German product description (ad) and technical specs: Werbetext und Spezifikationen für den Samsung SyncMaster 971P.

Oct 202014

The Dell PowerEdge T20 is a entry-level server from Dell. Being available since 01.2014 the price for those machines dropped quite rapidly in 06.2014 and now end users buy this machine to use it as a cheap desktop computer or workstation. The version with the Intel Xeon CPU 1225v3 is quite powerful and this is the version I bought. This blog post is my collection of information about this computer.

Main Features

  • Processor: Xeon E3-1225v3
  • Graphics (on CPU): Intel HD Graphics P4600
  • Chipset: Intel C226
  • Network: Intel I217
  • Power Supply: 290W
Oct 182014

Intel Gigabit ET Dual Port Server Adapter on Arch Linux (Kernel v3.16)

NIC Bonding on Arch Linux

Simple bonding setup as described in the Arch Wiki:

sudo pacman -Sy ifenslave
cp /etc/netctl/examples/bonding /etc/netctl/bonding
vim /etc/netctl/bonding
# -------- content: ----------
Description="Bonded interface of PRO/1000 ET Server Adapter"
BindsToInterfaces=(enp4s0f0 enp4s0f1)
# ----------------------------
netctl switch-to bonding
# but somehow an IP on a single NIC was left over. So I did:
netctl stop bonding
systemctl stop dhcpcd@enp4s0f0.service
ip link set dev enp4s0f0 down
netctl switch-to bonding
cat /proc/net/bonding/bond0

A more elaborate setup using LACP (802.3ad) mode:

Oct 172014

Serial Communication from UDOO to builtin Arduino Due


stty -F /dev/ttymxc3 cs8 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts

Specs for the UDOO Quad

Source: http://elinux.org/UDOO#UDOO_Quad

Freescale i.MX6Quad, 4 x ARM® Cortex™-A9 core @ 1GHz with ARMv7A instruction set
GPU Vivante GC 2000 for 3D + Vivante GC 355 for 2D (vector graphics) + Vivante GC 320 for 2D (composition)
Atmel SAM3X8E ARM Cortex-M3 CPU (same as Arduino Due)
76 fully available GPIO with Arduino compatible R3 1.0 pinout
HDMI and LVDS + Touch
2 Micro USB (1 OTG)
2 USB 2.0 type A and 1 USB 2.0 internal pin header (requires adapter cable)
Analog Audio and Mic jacks
CSI Camera Connection
on board Micro SD card reader (boot device)
Power Supply (6-15V) and External Battery connector
Ethernet RJ45 (10/100/1000 MBit)
WiFi Module
SATA connector with power header

Oct 162014

Speeding up the write access of a RAID array

echo 32768 > /sys/block/md0/md/stripe_cache_size

Source: Stackoverflow

Speeding up RAID1 array rebuild


echo 50000 > /proc/sys/dev/raid/speed_limit_min
echo 200000 > /proc/sys/dev/raid/speed_limit_max

the resync speed went from 1M/sec to about 25M/sec:

cat /proc/mdstat

Personalities : [raid1]
md1 : active raid1 sdb3[0] sda3[1]
      410024768 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  0.7% (3086912/410024768) finish=625.8min speed=10836K/sec

unused devices: <none>

Probably you may also change something here:

for syncmd in /sys/block/md1/md/sync*; do echo $syncmd; cat $syncmd; done

Watching the rebuild process:

Oct 142014

This is simply a Bluetooth compatible keyboard.

Pairing with a PC / Tablet

  1. Switch the keyboard off.
  2. Enable Bluetooth on your PC or tablet and search for bluetooth devices.
  3. Press and hold the [FN] button of the keyboard.
  4. Switch on the keyboard.
  5. Select the keyboard on your PC or tablet and wait for a request to enter a passphrase.
  6. Release the [FN] key.
  7. Enter the passphrase and press [Enter].
  8. Start using the keyboard.

The keyboard can only be paired with one PC or tablet at a time. Pair it again if you want to use it with a different device.

Sep 052014
  • Producer: Sun Microsystems
  • Model: Ultra 40
  • Code: A71
  • Codename: Sirius
  • CPUs: 2x AMD Opteron Dual Core 280
  • CPU Freq: 2.8 GHz
  • Grafik: Quadro FX 3500
  • RAM: 8GiB PC3200 DDR-400 ECC
  • HDDs: 2x 465GiB
  • Power Supply: 1000W

The hardware is detailed in this gist.

HDD Brackets

The SUN SPUD brackets work. I bought two additional ones with the article nr. 540-6562.


Aug 272014

This post is based on my previous blog post, Updating DNS Entries (with nsupdate or alternative implementations) – Run Your Own DDNS, and on Cédric Félizard’s post “Your Own Dynamic DNS“.

Running your own DynDNS (DDNS) server is easy when you have your own domain registered and an own Linux server up and running. A .de domain, for example, costs only about 6 EUR per year if you register at an inexpensive domain hoster in Germany. Let’s say you have registered example.com. Now you can use a subdomain such as d.example.com to contain all your dynamic IPs. An individual host could then be named something like eric.d.example.com. The advantage of using a subdomain .d.example.com instead of example.com itself is that you can refer the authority for this subdomain to your own server while the upper zone example.com can still be managed by the DNS hoster. The following sections will describe how to set this up in detail.