Supprimer Rendre public Rendre privé Add tags Delete tags
  Ajouter un tag   Annuler
  Supprimer le tag   Annuler
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Connexion

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
3 months ago Permalien
cluster icon
  • SadServers: Linux, DevOps & SRE Labs | Interview & Hiring Assessment : Hands-On Linux & DevOps Real Challenges. Real Infra. Real Skills. Master Linux & DevOps troubleshooting on live servers. Fun, real-world challenges fo...
  • Bash : First Line of Script #!/bin/bash → defines the shell interpreter Comments Use # for commenting Common Elements Commands: echo, cp, etc. Statement...
  • Systemctl, process management : Basic System Info Commands uptime → time now, up since, numbers of users, load average hostname → ip hostname uname -a → current OS and kernel info w...
  • System information, root recovery, environment variables, shortcuts : Finding System Information cat /etc/redhat-release → Red Hat version uname -a → Linux hostname, kernel, architecture dmidecode → hardware, BIOS, syst...
  • System Run Level and Boot Process : System Run Level init 0 → shutdown init 1 → single user mode → troubleshoot init 6 → reboot the system init 2 → multiuser without networking init 3 →...


(110)
Filtrer par liens sans tag
Replier Replier tout Déplier Déplier tout Êtes-vous sûr de vouloir supprimer ce lien ? Êtes-vous sûr de vouloir supprimer ce tag ? Le gestionnaire de marque-pages personnel, minimaliste, et sans base de données par la communauté Shaarli