mirror of
https://codeberg.org/hyperreal/techne
synced 2024-11-01 14:23:06 +01:00
29 lines
626 B
Org Mode
29 lines
626 B
Org Mode
#+title: LVM2
|
|
#+setupfile: ../org-templates/page.org
|
|
|
|
** Add disk to LVM volume
|
|
Create a new physical volume on the new disk:
|
|
#+begin_src shell
|
|
sudo pvcreate /dev/vdb
|
|
sudo lvmdiskscan -l
|
|
#+end_src
|
|
|
|
Add the newly created physical volume (~/dev/vdb~) to an existing logical volume:
|
|
#+begin_src shell
|
|
sudo vgextend almalinux /dev/vdb
|
|
#+end_src
|
|
|
|
Extend the ~/dev/almalinux/root~ to create a total 1000GB:
|
|
#+begin_src shell
|
|
sudo lvm lvextend -l +100%FREE /dev/almalinux/root
|
|
#+end_src
|
|
|
|
Grow the filesystem of the root volume:
|
|
#+begin_src shell
|
|
# ext4
|
|
sudo resize2fs -p /dev/mapper/almalinux-root
|
|
|
|
# xfs
|
|
sudo xfs_growfs /
|
|
#+end_src
|