I'm using LXD few years and I'm glad to use this platform in my testing environment. But few days ago, I couldn't install Microsoft SQL server 2017. The reason was, that I used default ZFS backend.
Ok, I checked, that if I need ext4. I have to use LVM. No problem, I created "Volume Group" and i marked to use this group in LXD. But ... First problem, that I saw, that LXD creates logical volumes not more, than 10GB.
After this command,
lxc init ubuntu:16.04 container2
I received this volume:
Disk /dev/mapper/mainVG-containers_container2: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes
I tried to add size via lvextend:
lvextend -L +10G /dev/mapper/mainVG-containers_container2
But I received following error:
Logical volume containers_container2 not found in volume group mainVG
Ok, I tried to create logical volume without LXD.
I made:
lvcreate -n lv_data1 --size 12G mainVG
And received:
Disk /dev/mapper/mainVG-lv_data1: 12 GiB, 12884901888 bytes, 25165824 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
And I made:
lvextend -L +10G /dev/mapper/mainVG-lv_data1
Size of logical volume mainVG/lv_data1 changed from 12.00 GiB (3072 extents) to 22.00 GiB (5632 extents).
Logical volume mainVG/lv_data1 successfully resized.
As you can see, in this case I can successfully resize my logical volume.
Maybe I don't know something ?
Maybe I have to add something in some security group ? Can you help me please ?
If you know other way to resize my Logical Volume, I will glad to hear it from you. Thanks