E
E
Evdokim2019-09-30 16:52:00
linux
Evdokim, 2019-09-30 16:52:00

Do I need to create LVM in virtual machines if I want to increase the disk space?

In Proxmox in a virtual machine, you can simply increase the size of the disk:
qm resize <vmid> <disk> <size>
Do I need to foresee that LVM is on this disk? Or can we just create a file system and mount /boot and / directly to the disk?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
Mikhail Vasilyev, 2019-09-30
@novelette

Advice from a person who manages 4 clusters on proxmox.
Be sure to do LVM.
Get rid of problems in the future.
As mentioned above, you drop 50G into the VM, for example, and just do something in the virtual machine, something ala:

parted /dev/sda
resizepart 3
pvresize /dev/sda3
lvextend -l+100%FREE -r /dev/mapper/main-root

Everything is done on the go in 2 minutes without stopping the VM.

R
rPman, 2019-09-30
@rPman

Inside virtual machines, there is no particular need to create LVM; in 99% of situations, the capabilities of virtual machine snapshots are enough for the eyes.
Regarding the increase in space, almost all VMs support dynamically expanding containers, i.e. the file with the container will take exactly as much space as it is actually used (it does not decrease back, only increase), respectively, create a virtual machine with a terabyte disk, and inside control it with limits or a small file system created in advance, the simplest ext3 can increase the size on the fly, filling more places (only the place from the end of the volume).

C
CityCat4, 2019-09-30
@CityCat4

Certainly. Virtualka is no different from bare-metal in this respect. The proxmox command, by the way, will expand the disk from the point of view of the hyper, and from the point of view of the VM, it will see the accreted space, but what to do with it? The same can be done in vmware through its management muzzle - so what?
If there is no LVM, you will need to create a new partition (of which there are only 4), format it, fence links to mount it, transfer the contents (for which it may well be necessary to switch to single user). If there is LVM - a few commands - and the partition is extended.

P
Puma Thailand, 2019-09-30
@opium

If only Booth and root, then it is possible without lvm, if it’s somehow more difficult, then you need lvm

N
noute, 2019-10-09
@noute

I think it's worth it.
You can not do it, but there will be problems with zooming and scaling.
In any case, LVM is more convenient. It's even easier to migrate from disk to disk.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question