November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Extending root partition using LVM

After deploying a VMware virtual machine via template, it may be necessary to extend the root file system based on use requirements as templates typically are minimal in their configuration. In this example, I opted to add a virtual disk instead of increasing the size of the existing vmdk, and extend the LVM vg (volume […]

Couldn’t find device with uuid

Linux LVM commands result in Couldn’t find device with uuid

Couldn’t find all physical volumes for volume group

Help! Commands like ‘lvs’, ‘lvdisplay’, ‘vgdisplay’, and ‘pvscan’ result in an error like the following:

Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’. Couldn’t find all physical volumes for volume group metabackupvg. Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’. […]

Recovering a Lost LVM Volume Disk

Overview

Logical Volume Management (LVM) provides a high level, flexible view of a server’s disk storage. Though robust, problems can occur. The purpose of this document is to review the recovery process when a disk is missing or damaged, and then apply that process to plausible examples. When a disk is accidentally removed or damaged […]

How to change a network interface name on CentOS 7

Traditionally, network interfaces in Linux are enumerated as eth[0123…], but these names do not necessarily correspond to actual hardware slots, PCI geography, USB port number, etc. This introduces a unpredictable naming problem (e.g., due to undeterministic device probing behavior) which can cause various network misconfigurations (e.g., disabled interface or firewall bypass resulting from unintentional interface […]

CentOS 7 & firewallD

Usually one of the first things we want to do with a new server is to restrict access to SSH -service.

So far it seems that everyone advices “disable firewallD, install iptables service and use it like you’ve always used” but how about trying to get along with this new tech?

Restricting access to […]

Logical Volume Snapshots

Logical Volume Snapshots Objective: Creating and restoring manual logical volume snapshots. Environment: CentOS release 6.3 (32-bit). Descriptions: By LV snapshot you will be able to freeze your logical volumes. In other words, you can easily backup and rollback to a original logical volume state. This is almost similar to VMware where you can the snap […]

ISO – Mount/Unmount

ISO – Mount/Unmount Objective: 1. Mount the ISO to CD/DVD, then mount it to file system. 2. Create an ISO from the CD/DVD, then mount to file system. 3. Created ISO will be mounted, and will be mounted as an file system. Environment: CentOS release 6.3 (32-bit). Implementations: – Mounted my ISO image to CD/DVD, […]

How to Remove commands from your history

How to remove if your typed password or sensitive information in your command console.

[root@linux1 ~]#history 1 history 2 mypassword 3 otherpassword 4 ls -la 5 sudo rm -f /home/

Remove sensitive command with numbered entry.

[root@linux1 ~]#history -d 2

[root@linux1 ~]#history 1 history 2 otherpassword 3 ls -la 4 sudo rm -f /home/

[…]

How to Change Username in Linux

How to Change Username in Linux

-l, –login NEW_LOGIN The name of the user will be changed from LOGIN to NEW_LOGIN. Nothing else is changed. In particular, the user´s home directory name should probably be changed manually to reflect the new login name.

Example:

Change existing username account from alice to tom:

usermod -l <new_login> […]

Unlock account in linux using pam_tally2

DESCRIPTION This module maintains a count of attempted accesses, can reset count on success, can deny access if too many attempts fail.

pam_tally2 comes in two parts: pam_tally2.so and pam_tally2. The former is the PAM module and the latter, a stand-alone program. pam_tally2 is an (optional) application which can be used to interrogate and manipulate […]