Hello guys,
I have the same problem as decribed in another post: https://forum.proxmox.com/threads/cannot-backup-to-nas-eperm-operation-not-permitted.121224/
Their solution was to use NFS instead of CIFS, but that lead to problems like kind of a storage hang. The backup itself worked, but the storage information could not be retrieved during backup or just partly and also the monitoring system runs into timeouts. Also it seems not to work, with the option to squash all users which is a security problem as an executable with SUID bit set could lead to root rights on the storage. I also can not squash it to the backup user as on my storage, the lowest UID I can set is 1000, but the backup user has 34.
But let'S start from the beginning. This is my environment:
Storage: QNAP on vlan 1
Storage-Pool 1 (SSD): PVE cluster accesses it over NFS to store VMs
Storage-Pool 2 (HDD): Data-Pool where the share for PBS backup should be located and accessed over SMB/CIFS or NFS
PVE-Cluster with 2 nodes on vlan 1
PBS as VM on PVE-Cluster on vlan 2
Keep in mind, that the vlans are routed over a firewall.
I will mention some scenarios:
To finalize this, does anyone know, how to correctly use a SMB/CIFS share mounted on the PBS to a QNAP NAS, so the PVE can connect over PBS to it an create backups?
PVE uses a PBS-User with Database-Backup Permission to connect the PBS-Share and PBS uses a QNAP user with read-write access to connect the SMB/CIFS share (fstab). Creating a file on the SMB/CIFS share from PBS cli works.
Here the relevant log file entries:
So does anyone know, how to fix this? Currently I am limited to SMB/CIFS or NFS, but I would prefer SMB/CIFS if NFS only works with no squash. If possible in this configuration, I would prefer PBS backup over PVE backup, as handling is better, but I am also ok with PVE backup only, but as I mentioned before, I get a device busy failure 80% of backups.
Thanks a lot and let me know, if you need further informaiton.
best regards
I have the same problem as decribed in another post: https://forum.proxmox.com/threads/cannot-backup-to-nas-eperm-operation-not-permitted.121224/
Their solution was to use NFS instead of CIFS, but that lead to problems like kind of a storage hang. The backup itself worked, but the storage information could not be retrieved during backup or just partly and also the monitoring system runs into timeouts. Also it seems not to work, with the option to squash all users which is a security problem as an executable with SUID bit set could lead to root rights on the storage. I also can not squash it to the backup user as on my storage, the lowest UID I can set is 1000, but the backup user has 34.
But let'S start from the beginning. This is my environment:
Storage: QNAP on vlan 1
Storage-Pool 1 (SSD): PVE cluster accesses it over NFS to store VMs
Storage-Pool 2 (HDD): Data-Pool where the share for PBS backup should be located and accessed over SMB/CIFS or NFS
PVE-Cluster with 2 nodes on vlan 1
PBS as VM on PVE-Cluster on vlan 2
Keep in mind, that the vlans are routed over a firewall.
I will mention some scenarios:
- Backup from PVE directly to SMB/CIFS share (without PBS) worked, but often lead to errors that the devive is busy (I think the QNAP). So the backup job failes and a VM stays in "locked" mode, which I always have to manually unlock. Even when only one backup is running at a time (Not a backup from both cluster nodes at the same time), that problem occurs. Best compression for me is GZIP, as the size of the file as nearly as small as with ZSTD, but it was to only compression mode, where accessing nextcloud share was as fast as when no backup is running. With all other compression modes I had performance loss.
- Connecting the PVE-Cluster to PBS and mounting a share that is locally mounted to the PBS as NFS share (and then added as datastore) lead to the bahaviour as I described at the beginning
- Connecting the PVE-Cluster to PBS where a local CIFS share is mounted, lead to the problem as described in the thread posted above. The CIFS share is mounted on the PBS over fstab files with file and folder mode 0777. So when I look at the permissions, all user should have read and write access. In the other thread, fabian from Proxmox said, it is a lack of permission, but they never figured out, what to configure.
To finalize this, does anyone know, how to correctly use a SMB/CIFS share mounted on the PBS to a QNAP NAS, so the PVE can connect over PBS to it an create backups?
PVE uses a PBS-User with Database-Backup Permission to connect the PBS-Share and PBS uses a QNAP user with read-write access to connect the SMB/CIFS share (fstab). Creating a file on the SMB/CIFS share from PBS cli works.
Here the relevant log file entries:
Code:
ERROR: VM 110 qmp command 'backup' failed - backup register image failed: command error: inserting chunk on store 'Backup_Repository' failed for bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8 - fchmod "/media/storage_backup/.chunks/bb9f/bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8.tmp_KHvxzy" failed: EPERM: Operation not permitted
INFO: aborting backup job
ERROR: Backup of VM 110 failed - VM 110 qmp command 'backup' failed - backup register image failed: command error: inserting chunk on store 'Backup_Repository' failed for bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8 - fchmod "/media/storage_backup/.chunks/bb9f/bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8.tmp_KHvxzy" failed: EPERM: Operation not permitted
So does anyone know, how to fix this? Currently I am limited to SMB/CIFS or NFS, but I would prefer SMB/CIFS if NFS only works with no squash. If possible in this configuration, I would prefer PBS backup over PVE backup, as handling is better, but I am also ok with PVE backup only, but as I mentioned before, I get a device busy failure 80% of backups.
Thanks a lot and let me know, if you need further informaiton.
best regards