Debian - Upgrade MySQL to MariaDB

After reading some good opinions about MariaDB I wanted to give it a try. Upgrade looks quite straight forward but I found some issues a little tricky. Installation Add repo and key: cat > /etc/apt/sources.list <<SRC deb http://mirrors.supportex.net/mariadb/repo/5.5/debian wheezy main deb-src http://mirrors.supportex.net/mariadb/repo/5.5/debian wheezy main SRC (find more repositories here  external link ) Now install MariaDB: sudo apt-get update sudo apt-get install mariadb-server It could be better to install mariadb-server-5.5 and mariadb-client-5.5 package instead, because of this error  external link . ...

2014-01-24 · 1 min · timor

Nginx - enabling SPDY with freeware certificate

I was thinking about allowing access to my website using SPDY protocol for better performance and security (and for fun of course 😃 ). But SPDY have one disadvantage - you need SSL certificate signed by known authority that will verfiy in common browsers. So you can’t use self signed certificates because everyone will see a warning entering your site. Certs are quite expensive so I started searching for free one and to my surprise I found such! ...

2014-01-24 · 2 min · timor

Regenerate thumbnails in Shotwell 0.15 (for last month)

I love Shotwell  external link for it’s simplicity and easy export to Piwigo  external link . After Christmas I added new photos to my library but after that I made some modifications to them (red eye reduction, etc…). Because Shotwell generate thumbnails only on import, all my modifications were not visible on preview. ...

2014-01-08 · 1 min · timor

Apache - precompressing static files with gzip

Some time ago I’ve show how to precompress js and css file with gzip to be available for Nginx’s mod_gzip. In default configuration Apache don’t have such module but similar functionality could be achieved with few custom rewirtes. Basically we will start with these rewrites to serve gzipped CSS/JS files if they exist and the client accepts gzip compression: RewriteEngine on RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{REQUEST_FILENAME}\.gz -s RewriteRule ^(.*)\.(js|css)$ $1\.$2\.gz [QSA] Then we need to setup proper content types for such compressed files - I know how to do this in two ways: ...

2013-12-27 · 2 min · timor

Generate ECDSA key with OpenSSL

After the last NSA scandal I’ve found some time to read some texts about PFS and ECDSA keys lately. I always used RSA keys but wanted to give a try to ECDSA so I wanted to give it a try (test performance, etc). Here is how I’ve done it. Firstly find your favorite curve. A short tip about bit length and complexity could be found here. From it you will now that using 256 bit ECDSA key should be enough for next 10-20 years. ...

2013-12-17 · 5 min · timor

Delete audio track from mkv file

Lately I tried to remove some streams from MKV file - I wanted: video, audio in my language and no subtitles. I achieved it with mkvtoolnix utils. Firstly I have to identify streams in file: $ mkvmerge -i input_file.mkv File 'test.mkv': container: Matroska Track ID 0: video (V_MPEG4/ISO/AVC) Track ID 1: audio (A_DTS) Track ID 2: audio (A_AC3) Track ID 3: audio (A_DTS) Track ID 4: audio (A_AC3) Track ID 5: subtitles (S_TEXT/UTF8) Track ID 6: subtitles (S_TEXT/UTF8) Chapters: 16 entries You could use more verbose tool mkvinfo for that purpose too. ...

2013-12-16 · 1 min · timor

Preparing video files for streaming on website in MP4 and WEBM format

Some time ago I prepared a PC that was responsible for batch encoding of movies to formats suitable for web players (such as. Video.js  external link , JW Player  external link , Flowplayer  external link , etc.) ...

2013-12-16 · 2 min · timor

Re-adding failed drive in mdadm

Yesterday I have problem with fglrx witch cause ugly system reset. After that, one of my drives was marked as failed in RAID5 array. Hotspare was automatically used to rebuild array. But this hotspare is the oldest and slowest drive I’ve got… After rebuild I’ve tested failed drive and it was fine - no bad block, no any other issue - so I wanted it running back in array. What I do: ...

2013-12-12 · 2 min · timor

Ansible - Dynamicaly update /etc/hosts files on target servers

I was configuring GlusterFS on few servers using Ansible  external link and have a need to update /etc/hosts with hostnames for easier configuration. I found this one working: - name: Update /etc/hosts lineinfile: dest=/etc/hosts regexp='.*{{item}}$' line='{{hostvars.{{item}}.ansible_default_ipv4.address}} {{item}}' state=present with_items: '{{groups.somegroup}}' Source: http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html  external link

2013-12-11 · 1 min · timor
Disk usage visualisation

Inodes exhaustion on XFS

It’s quite rare to have problems with XFS and inodes exhaustion. Mostly because XFS doesn’t have inode limit in a manner known from other filesystems - it’s using some percentage of whole filesystem as a limit and in most distributions it’s 25%. So it’s really huge amount of inodes. But some tools and distributions lowered limit ex. 5% or 10% and there you could have problems more often. You could check what is you limit by issuing xfs_info with drive and searching for imaxpct value: ...

2013-11-27 · 1 min · timor