S
S
Stanislav Valsinats2019-12-05 12:40:22
LVM
Stanislav Valsinats, 2019-12-05 12:40:22

Can LVM be extended on a dynamic VHDX?

Hello. Situation:
1) Created a VM on HYPER-V on Windows Server 2016, disk type - Dynamic HDD 30 GB
2) Installed UBUNTU server 18 OS
3) Set up LVM, everything is automatic.
The result is a disk size of 4.5 GB.
Installed the software and left.
After a while I check - it is not updated, there is no place.
When reading the LVM documentation, I realized that I need to increase the size of the partition, because:
PV Name /dev/hda1
VG Name vg00
PV Size 19500 GB / NOT usable 4 MB [LVM: 122 KB]
PV# 1
PV Status available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 4096
Total PE 2499
Free PE 2000
Allocated PE 499
Above is an example from the Internet, while there is no access to the VM,
So, HYPER-V writes that the DISK is 30 GB in size, now it weighs 4.6 GB.
From the output of Free PE 2000, I understand that I can allocate the same amount of space. By creating a new partition, or by increasing the current one.
BUT! When I run:
lvcreate -l 10230 vg00 -n lv02
OR
lvcreate -l100%FREE vg00 -n lv02
The system gives an error - no space for distribution.
lsblk output:
sda3 30GB
|__ubuntu-vg-ubuntu-lv 4GB
That is, there is a large disk, there is a 4 GB partition occupied, but it does not dynamically grow.
Now it's easier for me to create a fixed disk, or what to do ??
PS - just cloned VM, fixed disk, command: lvresize -l +100%FREE /dev/vg0/lv0 - success.
I correctly understood, what a problem in a dynamic disk HYPER-V??

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