File storage driver: success with zero bytes written (4.3, pool on tmpfs)

Qubes 4.3. I made a qube pool with the file driver, with the pool directory on a tmpfs. Cloning a template into it prints Cloning private volume, Cloning root volume and returns zero. qvm-volume info shows the right pool and a size of 20 GiB, and after qvm-start the qube is listed as running.

And there are zero bytes in the pool directory. du gives zero, the vm-templates/ directory is simply not there. The volume exists in the database, the data is nowhere. A qube with an empty root still looks started.

I have not tried the same on an ordinary on-disk directory, so it may well be tmpfs specific. But then, in my opinion, the pool should not be created silently.

Questions: is file still supported in 4.3, or is it kept for compatibility? Does anyone reproduce this on ordinary storage?

I moved to lvm_thin myself - there the volumes are real and the usage grows.

The way I see it, an exit code proves nothing, you have to look at the space used.

I haven’t been able to reproduce this. Here I’m cloning a TemplateVM (whose ‘root’ volume I truncated to 500 MiB for testing due to limited RAM) into a legacy ‘file’ driver pool stored on a tmpfs:

user@dom0:~$ qvm-pool add -o dir_path=/tmp/testpool testpool file

user@dom0:~$ qvm-clone fedora-44-xfce fedora-44-xfce-truncated
fedora-44-xfce-truncated: Cloning private volume
fedora-44-xfce-truncated: Cloning root volume

user@dom0:~$ qvm-volume resize --force fedora-44-xfce-truncated:root 500MiB

user@dom0:~$ qvm-clone -P testpool fedora-44-xfce-truncated fedora-44-xfce-testpool
fedora-44-xfce-testpool: Cloning private volume
fedora-44-xfce-testpool: Cloning root volume

user@dom0:~$ du -h --apparent-size /tmp/testpool/vm-templates/fedora-44-xfce-testpool/*
2.0G	/tmp/testpool/vm-templates/fedora-44-xfce-testpool/private.img
500M	/tmp/testpool/vm-templates/fedora-44-xfce-testpool/root.img
10G	/tmp/testpool/vm-templates/fedora-44-xfce-testpool/volatile.img

It’s deprecated and should no longer be used:

You could switch to the ‘file-reflink’ driver if you create a throwaway Btrfs/XFS filesystem image on the tmpfs (since tmpfs doesn’t support reflinks on its own).

Sorted it out - my mistake, the driver has nothing to do with it. Sorry for the time you spent.

I had created the pool with the options joined by a comma in a single -o:

qvm-pool add ghost file -o dir_path=/var/lib/qubes/ghost-pool,revisions_to_keep=1

qvm-pool splits each -o at the first = only, so the directory path became literally

/var/lib/qubes/ghost-pool,revisions_to_keep=1

The data was being written there all along. I was measuring the directory without the comma and seeing zero. The embarrassing part: that path with the comma in it was right there in the qvm-pool info output, I read it and did not notice.

Today I did it your way, one -o per option, and it works, including on tmpfs and including inside /var/lib/qubes. There is nothing to reproduce.

One question on the substance does remain, if it is of any interest: should a dir_path containing a comma be accepted silently? The directory with that name does get created, the pool looks healthy, and the only sign of the mistake is in the output if you read it carefully. But that is a different topic from the one in the title.

I would ask a moderator to close or rename this topic - as it stands it is misleading.