Paul Littlefield Live. Love. Laugh.

5May/11

Learnt – Change Preferred Minor MD Superblock On Software RAID Hard Disk

A hard disk drive failure on one of my servers prompted a manual software RAID 1 check and resync. Using good old SystemRescueCD, this was done but in doing so it inadvertently changed the preferred minor md superblock number on the array's hard disk drives from 3 to 124.

mdadm --misc --examine /dev/sda3 |grep 'Preferred Minor'
Preferred Minor : 124

To fix this, stop the array and reassemble it again but update the superblock as it runs. Make sure you declare which hard disk drive partitions you are using as you assemble:-

mdadm --verbose --misc --stop /dev/md124
mdadm --verbose --assemble --update=super-minor --run /dev/md3 /dev/sda3 /dev/sdb3

To check it has worked, run the following 2 commands:-

mdadm --misc --examine /dev/sda3 |grep 'Preferred Minor'
Preferred Minor : 3

cat /proc/mdstat
md3 : active raid1 sdb3[0] sda3[1]
      10490368 blocks [2/2] [UU]
Filed under: Software
25Apr/11

Learnt – FFmpeg x264 Presets Changed Method

The method for calling x264 presets has changed in the latest git version of ffmpeg. The developers have also included an easy way to call the tune parameter - most often used for 'film' or 'animation'...

(OLD METHOD)  -vcodec libx264 -vpre veryslow
(NEW METHOD)  -vcodec libx264 -preset veryslow -tune film
Filed under: Software
24Apr/11

Learnt – Ubuntu Linux Kernel ACPI CPU Fan Bug Fix

The latest kernel update to my Ubuntu Linux MythTV computer caused the CPU fans to run at full speed (7000+ RPM), because the ACPI was not working properly. To fix this (although it's still not AS quiet as it was before) edit your Grub2 menu to add the options "acpi=force acpi_osi=linux"...

sudo -i
 nano /etc/default/grub
 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force acpi_osi=linux"
 update-grub

...to bring the fans down to a more acceptable ~3500 RPM (although I reckon I can still improve on that).

Filed under: Software
17Mar/11

Learnt – Sendmail Multiple SMTP Smart Hosts

Add colon separated server hostnames to the sendmail.cf  and update your authinfo file.

define(`SMART_HOST',`[smtp.company1.com]:[auth.smtp.company2.co.uk]'
Filed under: Software
17Mar/11

Learnt – Fetchmail preconnect command

The Fetchmail software for Linux used on my servers does not log the date and time on every check. To fix this, add the preconnect command to the configuration file:-

preconnect "date >> /home/postman/fetchmail.log"
Filed under: Software
12Jan/11

Learnt – How To Calculate Days In A Spreadsheet

=DATE(2008;12;12) | =DATE(2009;2;19) | =DAYS360(A5;B5;1)
Filed under: Software
1Jan/11

Objectives of 2011

  • Learn something new every day.
  • Lose 1 stone in weight.
  • Try for the Linux Professional Institute Level III Qualification.
  • Write my first HP/Palm WebOS app.
Filed under: Life, Software
30Dec/10

New web site launched

I launched my new web site today. It runs on WordPress and Linux. Enough said.

Filed under: Software