martinohmann/home-ops

Avoid VolSync permission errors when restoring PVC from backup

Closed this issue · 0 comments

ext4-based volumes (like the ones created via the longhorn storage class) automatically create a lost+found directory owned by root, which causes permission errors if the volsync mover runs rootless.

Some potential options to fix this:

  • Run the movers as root and use a securityContext in the app pods which employs fsGroupChangePolicy to fix the permissions
  • Use longhorn-xfs storage class which does not create lost+found. In my last test this caused problems with RWX volumes though.
  • Instruct restic in the movers to ignore lost+found both during backup and restore.