Redimensionar discos virtuais img utilizados no KVM

Como redimensionar um disco virtual *.img utilizado por uma máquina virtual Fedora Linux XX sendo executada através do KVM.

A máquina virtual está particionada utilizando-se LVM.

Recomendo fortemente rever o manual de cada comando específico para saber como utilizá-lo para o seu caso específico.

1. Aumentar a capacidade da imagem de disco:
virsh vol-resize redmine.img 58G --pool maquinas_virtuais

Método alternativo (não testado):
qemu-img resize redmine.img +50GB

2. Conectar na máquina virtual (pode ser por ssh)

3. Utilizar o cfdisk para criar uma partição do tipo "Linux LVM (8E)" no espaço que aparecerá como livre no disco que foi redimensionado.

4. Reiniciar a máquina virtual:
shutdown -r now

5. Extender o Volume Group do LVM:
vgextend fedora /dev/vda5

6. Extender o Logical Volume para ocupar o espaço livre do Volume Group:
lvextend -l +100%FREE /dev/fedora/root

7. Redimensionar o sistema de arquivos para o novo tamanho do Logical Volume:
resize2fs /dev/fedora/root

Referências:
1. Logical Volume Manager Administration - Red Hat
https://access.redhat.com/documentation/pt-BR/Red_Hat_Enterprise_Linux/6/html-single/Logical_Volume_Manager_Administration/

2. Getting Start With Virtualization - Fedora Project
https://fedoraproject.org/wiki/Getting_started_with_virtualization?rd=Virtualization_Quick_Start

Comments

Anonymous said…
One free sport mode options extra keys, and another options taller reels. Aaron Walsh, an Army Apache pilot, lost $20,000 to the Army's slot machines in South Korea, resigned to avoid a courtroom martial and finally dedicated suicide. In 1951, Congress banned slot machines from home military bases after passing laws to that effect. Two many years later, the Army and Air Force removed them from all international bases as well, only to restore the international slot 메리트카지노 machines within the Nineteen Eighties. The military's final accounting in 2017 confirmed that the machines are located on bases in 12 countries– largely run by the Army.

Popular posts from this blog

Habilitar cliques do touchpad no Debian LXDE

Regresso de versão no Debian