Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@anselmobattisti
Last active May 22, 2023 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anselmobattisti/0bb7229a19b747928485907e8b892121 to your computer and use it in GitHub Desktop.
Save anselmobattisti/0bb7229a19b747928485907e8b892121 to your computer and use it in GitHub Desktop.
# Aumentar o tamanho do disco
virt-filesystems --long -h --all -a olddisk.qcow2
qemu-img create -f qcow2 -o preallocation=metadata newdisk.qcow2 50G
# /dev/sda3 é o nome da partição do disco antigo que vai ser alterado
virt-resize --expand /dev/sda3 olddisk newdisk.qcow2
# os dados são copiados para o disco novo, mova o disco novo sobre o antigo
# Aumentar o tamanho da partição lógica
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment