Thanks a lot for the suggestion~ I've built it, was just about to reboot the servers :] Good day!Yeah! I strong recommend that you give a try with 1.8.0-dirty. It's work perfect.
See previously messages here in this thread.
I wish good luck.
Thanks a lot for the suggestion~ I've built it, was just about to reboot the servers :] Good day!Yeah! I strong recommend that you give a try with 1.8.0-dirty. It's work perfect.
See previously messages here in this thread.
I wish good luck.
let us know how you get on and if it improves everything! I will start my virtiofsd adventures in the next couple of weeks. So thanks to everyone on this thread for blazing the way!Thanks a lot for the suggestion~ I've built it, was just about to reboot the servers :] Good day!
bad superblock
error and updated my guide to reflect my learnings.-rwxr-xr-x 1 root root 5.4M Oct 3 12:06 virtiofsd
-rwxr-xr-x 1 root root 2.6M Jul 20 09:21 'virtiofsd 1.7.0'
-rwxr-xr-x 1 root root 5.4M Oct 3 12:10 'virtiofsd 1.7.2'
-rwxr-xr-x 1 root root 5.6M Oct 3 12:07 'virtiofsd 1.8.0'
I have been testing virtiofsd in one of my VMs for the last few days and noticed that some services that process and copy large files sometimes hang, could it be that the hookscript perlscript suggested here does not use "queue-size=1024" in the VM's args?
I have now added the argument to my shares and will test it the next few days to see if that was the problem
Sounds goodSo I can now report back that after over a week of intensive use with a lot of data transfer via virtiofsd, the VM no longer hangs, as was previously the case almost daily without the setting of the "queue size"
# TODO: Have removal logic. Probably need to glob the systemd directory for matching files.
for (@{$associations{$vmid}}) {
my $share_id = $_ =~ m!/([^/]+)$! ? $1 : ''; # only last folder from path
my $unit_name = 'virtiofsd-' . $vmid . '-' . $share_id;
my $unit_file = '/etc/systemd/system/' . $unit_name . '@.service';
print "attempting to install unit $unit_name...\n";
if (not -d $virtiofsd_dir) {
print "ERROR: $virtiofsd_dir does not exist!\n";
}
else { print "DIRECTORY DOES EXIST!\n"; }
if (not -e $unit_file) {
$tt->process(\$unit_tpl, { share => $_, share_id => $share_id }, $unit_file)
|| die $tt->error(), "\n";
system("/usr/bin/systemctl daemon-reload");
system("/usr/bin/systemctl enable $unit_name\@$vmid.service");
}
system("/usr/bin/systemctl start $unit_name\@$vmid.service");
$vfs_args .= " -chardev socket,id=char$char_id,path=/run/virtiofsd/$vmid-$share_id.sock";
$vfs_args .= " -device vhost-user-fs-pci,chardev=char$char_id,tag=$vmid-$share_id";
$char_id += 1;
}
Proxmox 8 - 6.5.11-8-pve
args: -chardev socket,id=char0,path=/run/vfs600.sock -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=vfs600 -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on
/usr/libexec/virtiofsd --log-level debug --socket-path=/run/vfs600.sock --shared-dir /zfs --announce-submounts --inode-file-handles=mandatory
virtiofsd 1.7.2
[2024-02-10T04:04:58Z DEBUG virtiofsd::passthrough::mount_fd] Creating MountFd: mount_id=310, mount_fd=10
[2024-02-10T04:04:58Z DEBUG virtiofsd::passthrough::mount_fd] Dropping MountFd: mount_id=310, mount_fd=10
[2024-02-10T04:04:58Z INFO virtiofsd] Waiting for vhost-user socket connection...
[2024-02-10T04:05:07Z INFO virtiofsd] Client connected, servicing requests
[2024-02-10T04:05:25Z ERROR virtiofsd] Waiting for daemon failed: HandleRequest(InvalidParam)
Der Dienst "VirtIO-FS service" auf "Lokaler Computer" konnte nicht gestartet werden. Fehler 1053: Der Dienst antwortete nicht rechtzeitig auf die Start- oder Steuerungsanforderung.
root@pve:/var/lib/vz/snippets# cat virtiofs_hook.conf
100: /mnt/pve/pictures
101: /mnt/pve/pictures
root@pve:/var/lib/vz/snippets# qm config 100
args: -object memory-backend-memfd,id=mem,size=16000M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/run/virtiofsd/100-bud.sock -device vhost-user-fs-pci,chardev=char0,tag=100-bud
bios: ovmf
boot: order=scsi0
cores: 8
cpu: x86-64-v2-AES
efidisk0: nob:vm-100-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
hookscript: local:snippets/virtiofs_hook.pl
machine: pc-q35-8.1
memory: 16000
meta: creation-qemu=8.1.5,ctime=1711959689
name: steuern
net0: virtio=BC:24:11:4D:F1:8D,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
scsi0: nob:vm-100-disk-1,iothread=1,size=80G
scsihw: virtio-scsi-single
smbios1: uuid=037688a8-c1a2-495c-9df0-3d34c6cecc94
sockets: 1
tpmstate0: nob:vm-100-disk-2,size=4M,version=v2.0
unused0: nob:vm-100-disk-3
vmgenid: b9a0c41d-f083-4d75-8eea-ac7c7c888a74