Life with Open Source

Extending PV/VG/LV on iSCSI

Extend iSCSI storage Stop LV on all nodes except one Rescan iSCSI node on one host # iscsiadm -m node -R Resize PV # pvresize /dev/<disk/part> Execute vgs and verify extended size visible as free space Extend LV # lvextend -l +100%FREE /dev/<vg>/<lv> On all other nodes run # iscsiadm -m node -R # pvscan

Fedora 22 on Raspberry Pi 2

Download one of the remix from http://arm.fedoraproject.org/ Download kernel cd /tmp/ git clone -depth 1 https://github.com/raspberrypi/firmware.git I am using LXDE: xzcat Fedora-LXDE-armhfp-22-3-sda.raw.xz | dd of=/dev/mmcblk0 bs=4M fdisk /dev/mmcblk0 change first partition type to B If you like, expand /dev/mmcblk0p3 to utilize all space and use resize2fs /dev/mmcblk0p3 to expand filesystem mkfs.vfat /dev/mmcblk0p1 mkdir /tmp/sdcard mount /dev/mmcblk0p3 /tmp/sdcard mount /dev/mmcblk0p1 /tmp/sdcard/boot cat >/tmp/sdcard/boot/config.txt #uncomment to overclock the arm. 700 MHz is the default.

openvpn certificate signature failure

CentOS and Fedora has stopped support for md5 certificates At client side if you get following error server log usually /var/log/messages VERIFY ERROR: depth=0, error=certificate signature failure: &lt;snip> TLS_ERROR: BIO read tls_read_plaintext error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed TLS Error: TLS object -> incoming plaintext read error TLS Error: TLS handshake failed Fatal TLS error (check_tls_errors_co), restarting To fix this: vi /etc/systemd/system/NetworkManager.service and add following .include /usr/lib/systemd/system/NetworkManager.service [Service] Environment="OPENSSL_ENABLE_MD5_VERIFY=1 NSS_HASH_ALG_SUPPORT=+MD5" Now restart daemon

Running multiple PostgreSQL clusters using systemd

Requirements   Using systemd   Multiple instance of PostgreSQL       First instance running on port 5491       Second instance running on port 5492 Steps to setup first service STEP 1 create and edit service file sudo vi /etc/systemd/system/postgresql-9.4-5941.service STEP 2 Import original and Add Env .include /lib/systemd/system/postgresql-9.4.service [Service] Environment="PGDATA=/var/lib/pgsql/9.4/data1/" STEP 3 Modify postgresql.conf for instance sudo vi /var/lib/pgsql/9.4/data1/postgresql.conf" STEP 4 Change port for postgresql

Qnap Surveillance Station Recording q264 to h264

QNAP Surveillance Station recording are marked as q264 but it is easy to change them to play with regular players Replace 4 byte at offset 0x70 and 0xBC from q264 to h264 Here is python code f=open("<Filename>.avi","r+") f.seek(0x70) f.write('h264') f.seek(0xBC) f.write('h264') f.close()

Disk benchmark with dd

Quick way to determine disk write performance dd bs=1G count=5 if=/dev/zero of=<path>/disk-io-test.dat oflag=dsync rm -f <path>/disk-io-test.dat Note: Try to set bs= and count= to a number which is close to double the memory to get realistic results

CentOS 7 Installation

For CentOS 6 users it may be difficult to understand and use new CentOS 7 installer but for Fedora users it is an easy one. To ease the life of new CentOS 7 users, here are steps for minimal CentOS 7 install. Boot from DVD Select Install CentOS 7 by pressing ↑ and press ↵ Language Selection Select your language and Click “continue” Installation Summary This is the main install setup screen.

Odoo Invoice caching

Default setting for Odoo (formerly OpenERP) is to cache invocie PDFs. To disable caching Settings -> Technical -> Actions -> Reports Scroll to Name = Invoice Select Invocie Click Edit UnCheck "Reload from Attachment" Click on Save Here is a screen shot