Category: Linux

How to replace a Volume in mdadm software RAID array

replace a Volume in mdadm software RAID array
mdadm, which is a Linux Software RAID, is not inferior to a typical hardware RAID controller, and just like a hardware controller – enables us to swap physical disks inside the RAID array. It requires executing some commands indeed, but the whole process still seems to be pretty straightforward.

Usually, we replace a disk in RAID when it starts failing, but there might be scenarios, where you just want to swap mechanical SATA disks in RAID with SSDs, one by one, for better performance, without reinstalling the whole OS.
Read More

Debian Installation with LVM RAID 1 and Hot Spare

Debian 11 installation
Debian is a powerful, multipurpose, and super stable Linux distro, however, in my humble opinion, its installation wizard was never a strong point of this Linux distribution, making it pretty difficult to install for beginners. While the standard setup with just a single disk is still relatively digestible for most users, the more sophisticated setup involving RAID with LVM might be pretty hard and arduous. The purpose of this tutorial is to help you go through the whole installation procedure smoothly and painlessly.

In this tutorial, I present Debian 11 (Bullseye) installation based on MD-RAID, configured in Mirroring mode, with an additional Hot Spare drive and LVM partitioning on top of it.
Read More

Comment uncomment and replace characters in multiple lines in Vim

Modifying files in Vim can be arduous and time-consuming, especially when we want to modify multiple lines at once. The typical use case is modifying a configuration file in the system when it is required to comment or uncomment multiple lines at a time, or to replace the same character in many similar lines from the top to the bottom. Here are a few hints on how to facilitate multiple line modifications in text files using Vim editor.

Read More

Resize Cinder based Volume attached to an Instance in OpenStack

OpenStack Instance volume resize
One of the key features in OpenStack is the ability to resize the Instance’s flavor to increase resource limits used by Instances, such as vCPUs and RAM. Unfortunately, in the case of an Instance with a Cinder-backed volume, changing flavor does not affect the underlying volume.
Read More

How To Enable LLDP Service on CentOS

linux networking
LLDP (Link Layer Discovery Protocol) can be essential in situations of complex network-server infrastructure configurations and it’s extremely helpful in case there is no direct access to our setup but we need to determine what network ports on the switches are our servers NIC cards connected to.

Below we present how to install and enable LLDP Daemon on CentOS Linux, based on CinderCloud VPS, and check what are the corresponding neighbor port IDs connected to our server network cards.
Read More

How to add Hot Spare Volume to the existing mdadm software RAID array

CentOS 7 installation with LVM RAID 1 mirroring
Having a Hot Spare significantly increases the security of our data in a RAID array. In the case of a single disk failure, a Hot Spare jumps in the place of a faulty drive. Working as a temporary replacement, a Hot Spare can potentially buy time for us before we swap the faulty drive with the new one.

In the below scenario we have an example CentOS 7, installed on top of RAID 1 (mirror) using mdadm software RAID. The array was created by the Anaconda installer script during OS installation, for more details refer to:
CentOS 7 Installation with LVM RAID 1 – Mirroring.
Read More

Configure VLAN tagged interface over LACP bond on CentOS / RHEL

linux networking
In one of my previous articles I presented how to:
Configure a bridge interface over a VLAN tagged bonded interface on CentOS / RHEL

This is a supplement to the above tutorial – sometimes all you need is to configure just a regular interface over a VLAN tagged bond and the below procedure describes how to do it on CentOS 7 / RHEL 7 in few easy steps.
Read More

Configure a bridge interface over a VLAN tagged bonded interface on CentOS / RHEL

linux networking
Linux enables us to create advanced network setups which provide us with special features like NIC Bonding, VLAN tagging or Bridging allowing us to increase network connectivity efficiency and reliability of Linux based hosts.

Linux Bond is a kernel module which facilitates combining multiple network interfaces (like ens1f0, ens1f1) into aggregated links named Bonds to provide network redundancy, link failover and increased throughput.

VLAN tagging (802.1q) helps us to distinguish particular VLANs from network trunk (VLANs range) coming from the switch. It’s very helpful Linux kernel module, which enables us to connect to the multiple networks, if the server has less NICs than networks.
Read More

Install and Configure Checkmk on CentOS 8 and Monitor Linux Hosts using Checkmk agent

If you have important production servers or critical services in your network, having monitoring tools becomes a must. In case of any hardware or software failures, it is crucial to get alerted as soon as possible and take appropriate actions to fix the failure.
In this article I would like to take a look at checkmk – a powerful monitoring software, developed by tribe29 GmbH with tons of configuration options and a user-friendly WebGUI, which can help you fully automate monitoring activities of your hardware and operating systems.
Read More

Configure Postfix SMTP Relay (Smart Host) on CentOS 8

Install and Configure Postfix SMTP Smart Host on CentOS
Postfix is a Mail Transport Agent (MTA), which can be easily configured as a private relay host, passing mail to other mail servers. Unlike Sendmail, Postfix is considered a very secure MTA, offering a high level of flexibility and ease of administration.
In this article, I am configuring Postfix on CentOS 8, running on CinderCloud VPS, as SMTP smart host (relay host) using SASL authentication to send out mail further to the OVH mail server.
Read More