Mounting NFS from Host machine inside VM on Fedora

For the past few weeks I’ve been trying to solve few particular set of problems which I won’t go into detail here, perhaps in another post. One of the challenges I’ve faced is how to export NFS from my ZFS pool on Fedora host machine and mount it within Ubuntu based VM. The whole process is quite simple and straight forward so here we go. In order to be able to use NFS at all we first need to install required components on the host machine:...

November 19, 2019 · 2 min · Ivan Tomica

Firefox Widevine CDM crashing on Fedora

I had this problem with playing Netflix videos in Firefox on Fedora where even at video preview-s I would constantly get yellow bar with the message that Widevine Content Decryption Module, required for playing DRM content Netflix serves, has in fact crashed. Videos worked fine in Chrome, but I’d like to use Firefox. After some digging through, mainly by following Journal logs and triggering error in parallel I’ve came across following error...

November 18, 2019 · 2 min · Ivan Tomica

Self-Hosted Email server

More than 3 years ago I’ve written an article about self-hosting email. Throughout the years that setup was adjusted, migrated and changed in various ways. I’ve used it on the FreeBSD, Debian, Ubuntu since the original article which was based on CentOS. Now, I’m trying to set it up again on the CentOS, this time on the CentOS 8 and components to achieve the whole flow are changed a bit, and there are even some new ones....

October 31, 2019 · 14 min · Ivan Tomica

Using Sanoid for snapshotting ZFS on Fedora

ZFS is really nice filesystem and I use it wherever I can. I could write essays on the topic of ZFS and how awesome it is, and that is just what might happen some time in the future, but for now I’ll just show you how snapshots are managed on my machines. Why snapshots? There are 10 types of people: Those who do backups And those who will I’m not sure about you, but I’ve definitely deleted things I shouldn’t have only to realize few minutes (,or 3 days, or a month) later that I need the data that’s now gone....

September 8, 2019 · 3 min · Ivan Tomica

Fixing URxvt copy/paste

URxvt, or if you wish to call it rxvt-unicode, has this weird thing turned on by default where it binds ctrl+shift keys to all sorts of insanity (keycap picture insert mode and stuff like that). Dammit, I want my “normal” terminal behavior back! By “normal” I think that if I press: Ctrl + Shift + V -> paste contents of my main clipboard (from X) Ctrl + Shift + C -> copy current selection to clipboard So to restore that functionality here’s the magic thing you need in your ....

January 23, 2019 · 1 min · Ivan Tomica

Useful bash shortcuts

Moving around: CTRL + A # beginning of the current line CTRL + E # end of the current line Alt + F # one word forward Alt + B # one word back Text manipulation: CTRL + U # delete characters before cursor CTRL + K # delete characters after cursor CTRL + W # delete word before cursor Alt + D # delete word after cursor Alt + U # word after cursor to uppercase Alt + L # word after cursor to lowercase Alt + C # capitalize a word

May 20, 2018 · 1 min · Ivan Tomica

Hide other users processes on Linux

By default proc is mounted in a way that allows inspection of other users processes by any account on the system. This can be a security risk if attacker gets hold of one of the accounts on the machine as it can freely inspect processes and gather information that it perhaps shouldn’t have. In order to restrict access we can add hidepid mount option to /etc/fstab: proc /proc proc defaults,hidepid=2 0 0 To re-mount current /proc you can use:...

April 22, 2018 · 1 min · Ivan Tomica

Using File Descriptors to calculate progress in Linux

ProcFS in Linux has many useful information about process and its status. In this particular case I’ll show you how to determine progress while copying the file with cp. Same principle can be used for many other situations as well; like importing MySQL dump or whatever you comes up on your mind :-) So in this situation I am copying the ~98GB file to another directory: cp -a /input/archive.tar.gz /output/ First, let’s find PID of this process....

April 21, 2018 · 2 min · Ivan Tomica

Install SVN PHP module from PECL on EasyApache 4

Basically, something is broken while attempting to install SVN module for PHP via “Modules installer” option. To manually install extension follow these steps: Download the SVN PECL package: wget Extract the package: tar xzf svn-1.0.3.tgz Run phpize for appropriate PHP version: /opt/cpanel/ea-php56/root/usr/bin/phpize Configure with appropriate PHP configuration: ./configure –with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config Edit the Makefile to add following CFLAGS: CFLAGS = -g -O2 -std=c99...

May 23, 2017 · 1 min · Ivan Tomica

How to enlarge (resize) partition and expand LVM pool on top of it

Day or two ago I encountered a customer that had their server partitioned in a way that there was around 250GB of non-allocated space on disk. There were two partitions (sda1 and sda2) that were set up as /boot and LVM pool containing / mount point respectively. Naturally I’ve replicated that setup locally and simulated how to expand partition and LVM pool on top of it. All without loosing and data OFC....

April 28, 2017 · 2 min · Ivan Tomica