cockpit-machines icon indicating copy to clipboard operation
cockpit-machines copied to clipboard

Free size of new storage pool not recognized

Open BeFrankly opened this issue 3 years ago • 6 comments

Hello, in a Ubuntu Server 20.04 I created a new partition of size 139.8G Device Start End Sectors Size Type /dev/sda1 2048 1050623 1048576 512M EFI System /dev/sda2 1050624 63965183 62914560 30G Linux filesystem /dev/sda3 63965184 357031250 293066067 139.8G Linux filesystem I mounted /dev/sda3 to /media/virtual-machines and created a subdir named "storage" within. This I could add as a new dir based storage pool and that#s the only pool that's activated at the moment.

When I start creating a VM using Cockpit I could choose this storage pool but when I enter a disk size of about 50G for the new VM it tells, that there is only 7.6 GB left. How comes? df -h | grep sda /dev/sda2 30G 12G 17G 41% / /dev/sda3 137G 61M 130G 1% /media/virtual-machines /dev/sda1 511M 5.3M 506M 2% /boot/efi

I am not able to create VM on new storage pool.

Regards Frank (late evening here in Germany so I might answer new posts tomorrow).

BeFrankly avatar Feb 06 '22 20:02 BeFrankly

@BeFrankly you can firstly check from the CLI, if your new storage pool is displaying the expected info:

virsh pool-info virtual-machines  # Or how you named your pool

KKoukiou avatar Feb 07 '22 12:02 KKoukiou

Here are some more infos. Magic to observ, that sudo echo 1 > /media/virtual-machines/storage/test.txt gives -bash: /media/virtual-machines/storage/test.txt: Permission denied

AppArmor is running. Do I have to configure something there? virsh pool-info DataPool Name: DataPool UUID: caa3cf8c-d824-4eab-9d77-fc9717f67e8f State: running Persistent: yes Autostart: no Capacity: 136.55 GiB Allocation: 60.03 MiB Available: 136.49 GiB

lsblk -f | grep sda sda
├─sda1 vfat 3A15-45DD 505.8M 1% /boot/efi ├─sda2 ext4 208cd73c-8e6d-440f-b92f-9586e2d567ab 16.5G 39% / └─sda3 ext4 c612ae0a-4911-49fa-833e-123a7105cd4d 129.5G 0% /media/virtual-machines

sudo ls -l -R /media /media: total 4 drwxr-xr-x 4 root root 4096 Feb 6 20:18 virtual-machines

/media/virtual-machines: total 20 drwx------ 2 root root 16384 Feb 6 19:25 lost+found drwxr-xr-x 2 root root 4096 Feb 6 20:18 storage

/media/virtual-machines/lost+found: total 0

/media/virtual-machines/storage: total 0

BeFrankly avatar Feb 07 '22 16:02 BeFrankly

Are there any news for this issue?

BeFrankly avatar Feb 11 '22 19:02 BeFrankly

Hey @BeFrankly, sorry the the delayed response.

The 'Create VM' dialog does not support creating a VM with disk on the non-default pool by specifying and arbitrary disk size. You can use an existing volume in your non-default pool, but that will not allow you to specify the disk size.

If you select the 'Create new volume' option like in the screenshot below, it will use the 'default' named storage pool, which is not the one you just created (AFAIU)

Screen Shot 2022-02-14 at 10 07 02

If you want to use the new pool as default, then you need to rename it. Let me know if I misunderstood your setup.

KKoukiou avatar Feb 14 '22 09:02 KKoukiou

Hello @KKoukiou , you are on the right way but as you can see in my screenshot, one can select another storage pool. So why is it not possible to use its size. So if so, why to put a drop-down menu here if it's worth nothing? And what do you mean with "then you need to rename it". Do I have to name the new storage pool "default"? To me it looks like cockpit-machines does not support other storage pools than the default pool. grafik

BeFrankly avatar Feb 14 '22 16:02 BeFrankly

@BeFrankly choosing a non-default storage pool is supported and usable. Tou just need to choose an existing Volume from the dropdown. You can't let the dialog create a new volume for you by specifying the size. You can create the volume of your size from the 'Storage pools' sub-page.

Screen Shot 2022-02-25 at 11 34 59 Screen Shot 2022-02-25 at 11 35 58

KKoukiou avatar Feb 25 '22 10:02 KKoukiou