Category: Linux

Setup VLAN-tagged interface on Ubuntu


VLANs offer a powerful way to divide a physical network into multiple logical networks. This can be useful if your host has a limited number of interfaces or you want to limit the usage of network ports on your switch. In this tutorial, we’ll demonstrate how to set up a VLAN-tagged interfaces on top of physical network interface on Ubuntu 22.04 using NetworkManager Text User Interface (nmtui).
Read More

How to configure a multi-hop SSH tunnel to bypass internet blocks

multi-hop ssh tunneling
SSH allows users to establish secure connections over untrusted networks by encrypting the communication between client and server. SSH tunnels offer an array of benefits, including secure remote access, bypassing firewalls, and establishing secure communications between multiple network segments.
Read More

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