lima-vm / alpine-lima

Create an alpine based image for lima
Apache License 2.0
40 stars 26 forks source link

vz driver not mounting data disk #94

Closed abiosoft closed 1 year ago

abiosoft commented 1 year ago

Using the new VZ driver https://github.com/lima-vm/lima/pull/1147, the data disk is not getting mounted. It however works fine with Ubuntu iso.

Steps to Reproduce

Select the Alpine template

limactl start template://alpine

Use the vz driver

+ vmType: vz
+ mountType: virtiofs
- firmware:
-   legacyBIOS: true

Check the disks, the default 100G mount is missing.

$ limactl shell alpine
lima-alpine:/Users/abiola$ df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                 10.0M         0     10.0M   0% /dev
shm                       1.9G         0      1.9G   0% /dev/shm
/dev/sda                 62.8M     62.8M         0 100% /media/sda
tmpfs                     1.9G     53.8M      1.9G   3% /
tmpfs                   785.6M    288.0K    785.3M   0% /run
/dev/loop0               11.9M     11.9M         0 100% /.modloop
/dev/disk/by-label/cidata
                          6.7M      6.7M         0 100% /mnt/lima-cidata
mount0                  228.3G    208.2G     20.1G  91% /Users/abiola
mount1                  228.3G    208.2G     20.1G  91% /tmp/lima
cgroup_root              10.0M         0     10.0M   0% /sys/fs/cgroup

Expected

Using the experimental/vz template, the mounts include the 100G disk as/dev/vdb1.

abiola@lima-vz:/Users/abiola$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           392M  1.1M  391M   1% /run
/dev/vdb1        97G  2.0G   95G   3% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/vdb15       98M  5.1M   93M   6% /boot/efi
mount0          229G  211G   18G  93% /Users/abiola
mount1          229G  211G   18G  93% /tmp/lima
/dev/vda        195M  195M     0 100% /mnt/lima-cidata
tmpfs           392M  8.0K  392M   1% /run/user/501
balajiv113 commented 1 year ago

I believe its not a issue from alpine image.

I could see the disk when i run lsblk --list. So i believe the issue is with 04-persistent-data-volume.sh used for alpine. I will raise a PR to fix it for vz.

The issue that is happening is, cidata is getting tried for re-binding again instead of taking the next available disk

abiosoft commented 1 year ago

This has been fixed in Lima