Pras' Labs

iSCSI+LVM: Automatically Enable Volume Group Contain iSCSI Disk Physical Volume

When using iSCSI and LVM, sometimes we have to manually enable iSCSI disk that used as a physical volume in LVM. This is because LVM service is started earlier than iSCSI service so the iSCSI disk containing the physical volume is not present yet. Solution to this problem is to enable lvmetad in /etc/lvm/lvm.conf. The lvmetad is “LVM metadata daemon” that acts as in-memory cache of LVM metadata gathered from devices as they appear in the system. Whenever a block device appears and has PV label on it, it is automatically scanned via an udev rule. This update the lvmetad daemon with the LVM metadata found. Once the VG is complete (all the PVs making up the VG are present), the VG is activated. The lvmetad daemon is required for this LVM event-based autoactivation to work and the iSCSI disk must be present in the system after boot time. ...

Installing Postfix with Auth SASL and LDAP Support on FreeBSD

Install packages using FreeBSD port. Install postfix # Options for postfix-2.11.0,1 _OPTIONS_READ=postfix-2.11.0,1 _FILE_COMPLETE_OPTIONS_LIST=BDB CDB INST_BASE LDAP_SASL LMDB MYSQL NIS OPENLDAP PCRE PGSQL SASL2 SPF SQLITE TEST TLS VDA DOVECOT DOVECOT2 SASLKRB5 SASLKMIT OPTIONS_FILE_SET+=BDB OPTIONS_FILE_SET+=CDB OPTIONS_FILE_UNSET+=INST_BASE OPTIONS_FILE_SET+=LDAP_SASL OPTIONS_FILE_UNSET+=LMDB OPTIONS_FILE_UNSET+=MYSQL OPTIONS_FILE_UNSET+=NIS OPTIONS_FILE_SET+=OPENLDAP OPTIONS_FILE_SET+=PCRE OPTIONS_FILE_UNSET+=PGSQL OPTIONS_FILE_SET+=SASL2 OPTIONS_FILE_UNSET+=SPF OPTIONS_FILE_UNSET+=SQLITE OPTIONS_FILE_SET+=TEST OPTIONS_FILE_SET+=TLS OPTIONS_FILE_UNSET+=VDA OPTIONS_FILE_UNSET+=DOVECOT OPTIONS_FILE_UNSET+=DOVECOT2 OPTIONS_FILE_UNSET+=SASLKRB5 OPTIONS_FILE_UNSET+=SASLKMIT install openldap # Options for openldap-client-2.4.38 _OPTIONS_READ=openldap-client-2.4.38 _FILE_COMPLETE_OPTIONS_LIST=FETCH OPTIONS_FILE_UNSET+=FETCH install cyrus-sasl2 # Options for cyrus-sasl-2.1.26_4 _OPTIONS_READ=cyrus-sasl-2.1.26_4 _FILE_COMPLETE_OPTIONS_LIST=ALWAYSTRUE AUTHDAEMOND KEEP_DB_OPEN OBSOLETE_CRAM_ATTR BDB MYSQL PGSQL SQLITE2 SQLITE3 CRAM DIGEST LOGIN NTLM OTP PLAIN SCRAM OPTIONS_FILE_UNSET+=ALWAYSTRUE OPTIONS_FILE_SET+=AUTHDAEMOND OPTIONS_FILE_UNSET+=KEEP_DB_OPEN OPTIONS_FILE_SET+=OBSOLETE_CRAM_ATTR OPTIONS_FILE_UNSET+=BDB OPTIONS_FILE_UNSET+=MYSQL OPTIONS_FILE_UNSET+=PGSQL OPTIONS_FILE_UNSET+=SQLITE2 OPTIONS_FILE_UNSET+=SQLITE3 OPTIONS_FILE_SET+=CRAM OPTIONS_FILE_SET+=DIGEST OPTIONS_FILE_SET+=LOGIN OPTIONS_FILE_SET+=NTLM OPTIONS_FILE_SET+=OTP OPTIONS_FILE_SET+=PLAIN OPTIONS_FILE_SET+=SCRAM install cyrus-sasl2-saslauthd ...

FreeBSD Check TCP/UDP Open Port or Services

In this short tutorial I will show how to check TCP/UDP open port or services in FreeBSD box. For checking open port or services which uses port in FreeBSD simply issue the following commands. check TCP connection sockstat -Ptcp check UDP connection sockstat -PudpCombine with grep to search port used by specific service or service which using specific port. use grep to get service or port ...

DRBD: Troubleshooting and Error Recovery of Hard Drive Failure or Replacement

DRBD refers to block devices designed as a building block to form high availability cluster. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based RAID-1. (DRBD) Sometimes we have a disk failure on hard drive which contains DRBD backing device. The following steps can be used to replace or recover the failed drive. detach drbd resource from broken backing storage ...

DRBD: Manual Split Brain Recovery

Split Brain in DRBD is a condition where each host think that resource in another host is outdated, thus synchronization won’t be occured. This condition often occurs because of network or power failure which is indicated by these variables: log: Split-Brain detected, dropping connection connection-state: StandAlone/WFConnection To manually recover the cluster from split brain condition, the following steps is required. on victim connection state must be StandAlone # drbdadm disconnect <resource> set victim as secondary ...

Find A Virtual Machine by MAC Address with VSphere Client and PowerCLI

It is usual task to find someone computer by its MAC address when there is an issue related to his computer in the local network. The common case is IP conflict or network abuse. But, if the MAC Address shows that machine is one of many scattered VMware virtual machine out there, how do we find it? vSphere Client If you have an VMware ESX or ESXi server, vSphere Client is tool to manage your virtual machines from remote computer. But, vSphere Client cannot tell the MAC Address of virtual machines from version 10 or higher and to find virtual machine based on MAC Address we must open the virtual machine Setting one by one. It is still possible when there are few virtual, but it is exhausting when we have many virtual machine. ...

Installing Zimbra Collaboration Server 8 FOSS on CentOS 6.5

Zimbra is a well known collaboration suite which includes email, calendaring, file sharing, activity streams, social communities and more. The most popular product from Zimbra is Zimbra Collaboration Server. Zimbra Collaboration Server comes with two version: Network Edition and Open Source Edition (FOSS). This documentation shows a simple way to install Zimbra Collaboration Server Open Source Edition in CentOS 6.5. Getting Started Prepare the system # yum update Disable SELinux ...

Quantum Espresso 5.0.3 Using Intel Math Kernel Library 11.0 Optimization

Quantum Espresso is a software for electronic-structure calculations and materials modeling at the nanoscale. The installation of Quantum Espresso is quite easy because it includes external libraries which it needs. But we are encouraged to install Quantum Espresso using our own machine optimized external libraries such as Basic Linear Algebra Subprograms (BLAS), Linear Algebra Package (LAPACK), Scalable LAPACK (SCALAPACK), and Fastest Fourier Transform in the West (FFTW). External Libraries There are several repositories or development teams which provide external libraries. For example is Netlib which provides BLAS, LAPACK, and SCALAPACK. But, for machines with Intel processor, maybe the best external libraries out there is Intel® Math Kernel Library which has a non-commercial version as standalone or included in Intel® Parallel Studio XE 2013 for Linux that can be downloaded in Intel Non-Commercial Software Development. Intel® Math Kernel Library provides BLAS, LAPACK, SCALAPACK, and even FFTW interfaces. ...

Installing Icinga on Scientific Linux 6.4

Icinga is a well-known server or network monitoring that runs in many Unix/Linux distribution. Server/Network monitoring is an essential part of Network Operations Center because by monitoring network engineers can always get the feedback and status from network and production servers. This is a simple documentation of Icinga installation in Scientific Linux 6.4 server. Getting started Before we install icinga, it best to keep our system updated. # yum update Search icinga package using yum search in RPMForge repository. ...

Installing Cacti on Scientific Linux 6.4

Cacti is a network graphic monitoring tools which used the potential of RRDTool. RRDTool is a data logging and graphing system for time series data. Cacti can show us a real time performance of network or servers which make this software become one of the most popular open source monitoring software. Getting Started Always update your box before we install new software. # yum update Install dependencies for cacti. ...