Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login

Logical Volume Management (LVM)/shaare/PaqQSg

  • linux
  • linux

LVM (Logical Volume Management)

  • Combine disk together by software

  • Add new HDD on the fly to extend disk space

  • Set LVM in Linux install

  • Desired capacity: all → set last partition to space left

  • /boot → 500 MB LVM ⚠ always

  • fdisk /dev/sdc

    • n → new partition
    • t → change partition system ID
    • 8e → change to Linux LVM
  • pvcreate /dev/sdc1 → create physical volume

  • pvdisplay → infos

  • vgcreate vg /dev/sdc1 → create volume group

  • vgdisplay → show info

  • lvcreate -n lv --size 500 vg

  • lvdisplay → show info

  • mkfs.xfs /dev/vg/lv → format logical volume

Extend LVM → create LVM partition

  • pvcreate /dev/sd01
  • vgextend vg /dev/sd01
  • lvextend -L +100M /dev/mapper/vg-vg
  • xfs_growfs /dev/mapper/vg-vg

Add / Extend Swap Space

  • System will not boot if set incorrect

  • Recommended: 2x size of RAM

  • dd if=/dev/zero of=/newswap bs=1M count=1024

    • Extract disk space from HDD to swap
  • chmod go-r /newswap

    • Make file non-readable for others
  • mkswap /newswap

    • Make swap file
  • swapon /newswap

    • Activate swap (add with the rest)
  • nano fstab

/newswap swap swap defaults 0 0

xfs_info → display detailed information

  • xfs_info /dev/mapper/cs-root
    • Debug info about main XFS partition
2 months ago Permalink
cluster icon
  • Screen & Tmux : Screen (Terminal Multiplexer) Multi-terminal sessions in one window Alt+a | → split vertical Alt+a Shift+s → split horizontal Alt+a Tab → switch wind...
  • Linux File Ownership, ACLs, and I/O Redirects : File Ownership chown → Change ownership chgrp → Change group Access Control List (ACL) setfacl → Set file ACL getfacl → Get file ACL Add Permissi...
  • Kickstart – Automate Linux Install : Kickstart server Make Kickstart available on the network Make installation source available Make boot media available Start Kickstart instal...
  • Package Management : System Updates & Software Install dnf (yum) → RedHat → /etc/yum.repos.d apt-get → Debian rpm → RedHat package management standalone package to ...
  • SSH and DNS : SSH ps -ef | grep sshd → check ssh systemctl status sshd DNS PTR record → IP to hostname A record → hostname to IP CNAME record → hostname to...


(97)
Filter untagged links
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community