CentOS and yum - Error: rpmdb open failed

Today I had Ansible reporting an error on one of my CentOS machines while performing the usual upgrade procedure. I SSH’d into the host to check what was wrong and run yum clean all && yum update manually just to be greeted with the following error: rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30974) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db3 - (-30974) error: cannot open Packages database in /var/lib/rpm CRITICAL:yum. …

Posted on

NFS on Fedora

NFS allows to share files and folders over network and is much much faster than samba while using way less resources. To setup a NFS server on Fedora 26 install: $ dnf install nfs-utils Shared directories are listed in the following configuration file: --- # Syntax # <path> <ipaddr>(<option>) /home/user/Public 192.168.0.0/255.255.255.0(ro,sync) More information can be found here: Fedora NFS administration guide. In the above example, the the directory ‘/home/user/Public’ can be accessed by every client in the same LAN with read-only permissions. …

Posted on

AMD Ryzen-info :: Python

AMD Ryzen-info is a small Python script I wrote to monitor the main hardware system information of an AMD Ryzen system running on a recent version of Linux kernel. It relies on dmidecode and lm_sensors to gather the needed information, to get correct voltage and temperature readings it is critical that the most up to date version of the it87 kernel module is installed; Python version 3.5 or higher is also hard requirement. …

Posted on

AMD Ryzen on Linux

Finally we have some new hardware worth writing of and also spending money on. I have been using an AMD Ryzen 7 1700X based build for some time now and so far I am really liking it, the CPU is marvelous considering the pricetag and felt like a worthwhile upgrade from the Xeon E3-1241v3 I was using before; it is basically twice the cores clocked at pretty much the same speed. …

Posted on

Handbrake, compile from source on Fedora 25

Handbrake cannot be installed from default repos nor rpmfusion, to get it on Fedora 25 there are two other options: use negativo17 third party repository; compile from source. The first option is, but that is my opinion, subpar because I don’t trust third party repositories; option two is what is left. Download the source code from git and install some dependencies: $ git clone https://github.com/HandBrake/HandBrake.git $ sudo dnf install dbus-glib-devel gstreamer1-devel gstreamer1-plugins-base-devel intltool libgudev1-devel libnotify-devel webkitgtk3-devel libgudev-devel dbus-glib-devel webkitgtk3-devel gstream-devel libnotify-devel gstreamer1-devel gstreamer1-plugins-base-devel lame-devel opus-devel fribidi-devel libass-devel libtheora-devel x264-devel nasm Like I do with every other program I like to keep as much up to date as possible, I have a small script to take care of compilation, installation and upgrade processes for me. …

Posted on

Gajim and OMEMO on Gentoo Linux

OMEMO is the new-ish state of the art end-to-end encryption XMPP protocol extension, Gajim support it via a plugin but making it work on Gentoo is not straightforward at all. Gajim’s OMEMO plugin requires python-axolotl package to work, since that is not present in Gentoo’s repositories it must be installed from source. Before doing so a couple of dependencies must be installed first: $ emerge -a dev-python/protobuf-python $ chmod o+w /usr/lib64/python3. …

Posted on

Monitor hard disk SMART status :: Python

I have been fighting for years with smartd but I really never managed to configure it the way I want. While I certainly am not backblaze, I still have quite a few hard disks I would like to monitor and be able to replace before they actually die. I hacked up a small Python script to query some SMART attributes and send me an email in case something funky is going on; to use it just put in /etc/cron. …

Posted on

Monitor hard disk health status with smartd on Linux

This does not really works, read this: https://uwot.eu/monitor-hard-disk-smart-status-in-python/ First of all install smartmontools, it has the same name on pretty much every distro: $ emerge -a1 smartmontools Proceed to edit its configuration file, at the bottom of the file there is a quick explaination of all the available parameters: cat/etc/smartd.conf --- DEVICESCAN -H -R 1 -R 5 -R 7 -R 10 -R 11 -R 196 -R 197 -R 199 -R 200 -m user@domain. …

Posted on