S
S
sazhyk2019-05-27 13:38:05
Virtualization
sazhyk, 2019-05-27 13:38:05

How to increase the size of the LVM logical partition on which the virtual machine is?

The point is this. On the KVM hypervisor (Debian), a virtual machine (also Debian) is spinning. Virtualka is given a logical partition LVM for disk. The swap partition was partitioned to 150 MB. There were problems. The task is to increase the swap partition without rebooting the virtual machine.
If I understand correctly, then first you need to increase the size of the logical partition itself on the hypervisor, then you need to “make it clear” to the virtual core that the block device is now larger than it was (well, it probably should be), and then increase the swap partition.
The disk structure is:

lvs on hypervisor
...
vm_proxy          vg_kvm_data   -wi-ao----   8,00g 
...

lsblk on a virtual machine
...
vda                   254:0    0    8G  0 disk 
├─vda1                254:1    0  243M  0 part /boot
└─vda2                254:2    0  7,8G  0 part 
  ├─vg_system-lv_root 253:0    0  7,6G  0 lvm  /
  └─vg_system-lv_swap 253:1    0  132M  0 lvm  [SWAP]
...

And is it possible to do all this without rebooting?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question