🖥️lvm
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the lvm command with important options and switches using examples.
2 minute read
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██╗ ██╗ ██╗███╗ ███╗
# ██║ ██║ ██║████╗ ████║
# ██║ ██║ ██║██╔████╔██║
# ██║ ╚██╗ ██╔╝██║╚██╔╝██║
# ███████╗╚████╔╝ ██║ ╚═╝ ██║
# ╚══════╝ ╚═══╝ ╚═╝ ╚═╝
#Exclusive Activation of a Volume Group in a Cluster
#Link --> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/High_Availability_Add-On_Administration/s1-exclusiveactive-HAAA.html
1> vgs --noheadings -o vg_name
2> volume_list = [ "rhel_root", "rhel_home" ]
3> dracut -H -f /boot/initramfs-$(uname -r).img $(uname -r)
4> Reboot the node
5> uname -r to verify the correct initrd image
#==============================#
# CMD LVM
#==============================##==============================#
https://thomas-krenn.com/de/wiki/LVM_vergrößern
vgdisplay
lvdisplay
pvdisplay
# LVM's anschauen long
vgs
lgs
pgs
# LVM's anschauen short
lvextend -r --size +10G /dev/vg/opt
# vergrößern mit der option -r resized gleich das filesystem
lvdisplay
swapoff /dev/vg/swap
# swap aus
lvextend -L+1G /dev/vg/swap
mkswap /dev/vg/swap
swapon /dev/vg/swap
# LVM SWAP Vergrössern
pvcreate /dev/sdb /dev/sdc /dev/sdd
# To create physical volumes on top of /dev/sdb, /dev/sdc, and /dev/sdd
lvcreate -n vol_projects -L 10G vg00
# The -n option is used to indicate a name for the LV, whereas -L sets a fixed size and -l (lowercase L) is used to indicate a percentage of the remaining space in the container VG.
mkfs.ext4 /dev/vg00/vol_projects
# create a filesystem on top of it
lvreduce -L -2.5G -r /dev/vg00/vol_projects
# resizing each filesystem
lvextend -l +100%FREE -r /dev/vg00/vol_backups
# resizing each filesystem
vgextend vg00 /dev/sdd
# Adding the remaining PV from our initial setup (/dev/sdd).
blkid /dev/vg00/vol_projects
# to find out what its UUID (a non-changing attribute that uniquely identifies a formatted storage device) is
#==============================##==============================#
# CMD LVM #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command lvm in a clear format. This allows users to quickly access the needed information for lvm without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for lvm are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.