Hello all,
Not sure if this is proper category for this question, but i’m facing weird issue with VM with attached volume (filesystem).
So, i’ve application that sync a lot files from internet. Sync happen exactly on virtiofs.
App crashed when i was doing initial sync and it wasn’t possible to resume it, so i’ve deleted everything (all files in this directory / FS) and started from scratch.
Now during the sync filesystem usage start growing super fast and i found out that actually for some reason FS utilization “find” deleted files and counts em:
Here is how df looks like:
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 20G 3.9G 16G 21% /
tmpfs 4.9G 0 4.9G 0% /dev/shm
tmpfs 2.0G 692K 2.0G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 50M 14M 37M 27% /run/lxd_agent
lxd_volume-1 477G 476G 951M 100% /opt/zina
/dev/sda15 105M 6.1M 99M 6% /boot/efi
tmpfs 996M 4.0K 996M 1% /run/user/1001
But actual usage is (there is nothing outside this folder):
du -sh
186G .
After VM restart:
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 20G 3.9G 16G 21% /
tmpfs 4.9G 0 4.9G 0% /dev/shm
tmpfs 2.0G 1.2M 2.0G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
efivarfs 256K 78K 174K 31% /sys/firmware/efi/efivars
tmpfs 50M 14M 37M 27% /run/lxd_agent
lxd_volume-1 477G 187G 290G 35% /opt/zina
/dev/sda15 105M 6.1M 99M 6% /boot/efi
tmpfs 993M 4.0K 993M 1% /run/user/1001
When i make lsof presented filesystem on host (Rocky Linux 9 - kernel 6.5) i can see a lot files listed as deleted like this one:
virtiofsd 8052 root *689u REG 259,3 607694 837752963 /zina/03337384.tsz (deleted)
virtiofsd is not described a lot anywhere, but i saw few posts that maybe this can be solved with touching cache property, but i can’t find where to make this change.
Will be happy to test everything, as now i should restart VM every few hours
Hristo