I tested this series on a test cluster and can say the following:

1. Patch 4/11 needs a rebase due to a recent change in src/PVE/QemuMigrate/Helpers.pm - but it is trivial to fix.

2. Setting virtiofs to read-only worked as intended.

3. Live migrations on CephFS with find-paths worked without issues (also when migrating multiple times). Live migrations with file-handles didn't, though, as reported by Filip as well - dd fails with an input/output error.


-> The source PVE node contains the following in the journal:

Dec 02 17:39:19 node1 virtiofsd[109548]: node1 virtiofsd[109546]: Inode 2 
([unknown inode type; mount_id=0 device_id=0 inode_id=0]): Inode is invalid 
because of an error during the preceding migration, which was: Migration source 
has lost inode 2
Dec 02 17:39:22 node1 pve-ha-lrm[112204]: Task 
'UPID:node1:0001B64E:0015F115:692F1635:qmigrate:101:root@pam:' still active, 
waiting
Dec 02 17:39:23 node1 virtiofsd[109548]: node1 virtiofsd[109546]: Failed to 
serialize inode 2 (st_dev=0, mnt_id=0, st_ino=0): Failed to reconstruct inode 
location; marking as invalid



-> The destination PVE node contains the following in the journal:

Dec 02 17:39:23 node2 virtiofsd[76201]: node2 virtiofsd[76198]: Invalid inode 
24 indexed: Opening file handle: Operation not permitted (os error 1)
Dec 02 17:39:23 node2 virtiofsd[76201]: node2 virtiofsd[76198]: Invalid inode 
22 indexed: Opening file handle: Operation not permitted (os error 1)
Dec 02 17:39:23 node2 virtiofsd[76201]: node2 virtiofsd[76198]: Invalid inode 2 
indexed: Migration source has lost inode 2
Dec 02 17:39:23 node2 virtiofsd[76201]: node2 virtiofsd[76198]: Invalid handle 
19 is open in guest: Opening inode 22 as handle 19: Inode is invalid because of 
an error during the preceding migration, which was: Opening file handle: 
Operation not permitted (os error 1)
Dec 02 17:39:23 node2 virtiofsd[76201]: node2 virtiofsd[76198]: Invalid handle 
20 is open in guest: Opening inode 24 as handle 20: Inode is invalid because of 
an error during the preceding migration, which was: Opening file handle: 
Operation not permitted (os error 1)


The following issue [0] sounds like it could be related.


4. Changing between find-paths and file-handles only works after a migration, which is weird (at first, it looks like file-handles works, but it always fails after the second attempt).

5. Just as a general remark, even if we say that these features are experimental, they should never cause data loss (aside of bugs, of course - but otherwise not). In case these options can cause data loss or inconsistencies, we should either only allow read-only access, or otherwise show a serious warning that combining these options might cause data loss (but then again, if it always fails, it's probably easier to not allow it - this is much better than causing data loss).


Everything else worked as intended during my tests.


[0] https://gitlab.com/virtio-fs/virtiofsd/-/issues/188


On 20.10.25 14:18, Markus Frank wrote:
This patch series superseeds the patch series
"virtiofs: add thread-pool-size and improve docs" and adds support for
the read-only flag and live-migration.

Virtiofsd migration documentation:
https://gitlab.com/virtio-fs/virtiofsd/-/blob/main/doc/migration.md

build-order:
1. pve-guest-common
2. qemu-server
3. pve-docs
4. pve-manager


pve-guest-common:

Markus Frank (1):
   mapping: dir: add 'live-migration-method' parameter

  src/PVE/Mapping/Dir.pm | 10 ++++++++++
  1 file changed, 10 insertions(+)



qemu-server:

Markus Frank (3):
   fix #6370: virtiofs: add support for thread-pool-size option
   virtiofs: add readonly option
   virtiofs: add live migration support

  src/PVE/QemuMigrate/Helpers.pm | 14 +++++++++++---
  src/PVE/QemuServer/Virtiofs.pm | 34 ++++++++++++++++++++++++++++++++++
  2 files changed, 45 insertions(+), 3 deletions(-)



pve-docs:

Markus Frank (4):
   virtiofs: add explanation for cache=metadata behavior
   virtiofs: add table for optional parameters
   virtiofs: add thread-pool-size description
   virtiofs: add documentation for live migration

  qm.adoc | 50 ++++++++++++++++++++++++++++++++++++++++++--------
  1 file changed, 42 insertions(+), 8 deletions(-)



pve-manager:

Markus Frank (3):
   fix #6370: ui: virtiofs edit: add support for thread-pool-size option
   virtiofs edit: add readonly checkbox
   directory mapping: add live-migration-method option for virtiofs

  www/manager6/dc/DirMapView.js     |  8 ++++++++
  www/manager6/qemu/VirtiofsEdit.js | 15 +++++++++++++++
  www/manager6/window/DirMapEdit.js | 23 +++++++++++++++++++++++
  3 files changed, 46 insertions(+)




_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to