Skip to main content

Posts

Recent posts

My new home server (fight with noise and temperature monitoring)

Hardware I've got another new PC for home purpose and decided to make a home server for my sysadmin and programming tasks.  Also, my old PC  is based on AMD 6-cores phenom and six cores is a good value for virtualization. Are you ready to have a cloud at home? Yes, I'm. I bought a special case  (2U size with six places for hard drives. ) This case also has 3 80mm coolers and I hope this a good way to make cold system. Standart PC power supply is placed at a front side and the power cable is going from the front side to the back side. 






My Chiftec power supply has a lot of cord and it is impossible to set up all 6 drives inside. It is no place for the power cord. At this moment I think that power supply with unattachable cord is a good choice.  I spend one drive case for my cables. Another one issue is a noise of low-cost chinese coolers.  They generate a good airstream but noise was unacceptable. I cut  red wire and added a resistor (22 Omh) and 33 Omh to another one cooler. 


Update grub using dracut

Fixing grub using dracut Last kernel update was not successful to me. Centos can not boot with next messages: 
[ 180.098802] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts[ 180.610167] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts[ 181.121619] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts[ 181.633093] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts[ 182.144831] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts[ 182.656146] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts[ 183.167306] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts[ 183.678755] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts  Of course simples way  is creating  linux  usb stick  and fix it. But dracut shell is present and  loo…

Postgresql partituoning (few simple steps)

History I created a simple application for logistic purpose based on Django, PostgresSQL, and Postgis.  This is a service receiving a position of a truck and place it on the map. Service is really simple and uses a virtual machine with small performance.  The main problem of the current solution is a small performance of this cloud server.  Most of the cloud providers use LAN for attaching virtual server's drives. As result speed of disk I/O is really small.  

root@sergiy:/home/serg# fdisk -l Disk /dev/xvda1: 20 GiB, 21474836480 bytes, 41943040 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/xvda2: 1 GiB, 1073741824 bytes, 2097152 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesroot@sergiy:/home/serg# hdparm -tT /dev/xvda1 /dev/xvda1: Timing cached reads: 18876 MB in 1.99 s…

Upgrade postgres 9.4 to 9.6 at Debian linux

I'm using virtual server based on Debian Linux for some my free projects.  One of them is based on Postgres with PostGIS extension.   This windy rainy day is a good time for executing some upgrade. Also I would like to add partman extension for partituoning.
Checking new version. Update package list :
aptitude update Get: 1 http://ftp.debian.org/debian jessie-updates InRelease [145 kB] Get: 2 http://security.debian.org stretch/updates InRelease [62.9 kB] Get: 3 http://security.debian.org jessie/updates InRelease [63.1 kB]
 Check for new version:


dpkg-query -l postgresql* Desired=Unknown/Install/Remove/Purge/Hold| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)||/ Name Version Ar…

checking host hardware using linux kernel

How to collect information about  host without trivial system command   I'm using a lot of hardware boxes with no limit on distro types and versions.  In this case using system command such as ifconfig has a limited usage.  Also,  system config files have a different path and best way for me is getting information from the kernel. Of course,  I'm using cat command for doing this.
Next table has information about hardware. Let me know if something is interesting for you and you know something interesting

hardware information in the linux kernelfile pathinformation/proc/cpuinfoCPU/proc/meminfomemory/sys/blockList of block devices. HDD has sd or hd at the beginning/sys/class/block/{digit}/device/modelHDD drive and vendor/sys/block/{digit}/sizeHDD size /sys/blockList of block devices. HDD has sd or hd at the beginning/sys/bus/pci/devices/0000:{digit}/netSystem name of the network card /sys/devices/virtual/dmi/id/board_* Motherboard information /proc/net/routeNetcard names with VLA…

Postfix can not start via systemd (simple fix)

Solving problem related to systemd process I like postfix.   This is really smart and secure mail server. I'm helping above  dozen clients around the world and  tunning  postfix is really fun task. This morning I was downgrading postfix  to the stable version for one of the my friends and come across interesting issue. 
root@newserver:/etc/init.d# systemctl status postfix ● postfix.service Loaded: masked (/dev/null; bad) Active: inactive (dead) since вт 2017-06-13 14:35:41 EEST; 1h 48min ago Main PID: 25145 (code=exited, status=0/SUCCESS)чер 13 14:47:09 newserver systemd[1]: Stopped postfix.service.чер 13 14:47:29 newserver systemd[1]: Stopped postfix.service.чер 13 14:58:22 newserver systemd[1]: Stopped postfix.service.чер 13 14:58:23 newserver systemd[1]: Stopped postfix.service.чер 13 15:05:20 newserver systemd[1]: Stopped postfix.service.чер 13 15:29:06 newserver systemd[1]: Stopped postfix.service.чер 13 15:29:06 newserver systemd[1]: Stopped postfix.service.чер 13 15:…