Error for garbage collection: "Permission denied (os error 13) "

antipiot

Well-Known Member
Jan 26, 2019
67
5
48
37
Hello!

My PBS is configured to automatically do garbage collection tasks but it seems to fail:
TASK ERROR: IO error for operation on /mnt/datastore/datastore1/lost+found: Permission denied (os error 13)

Tried to trigger manually act the same:
1595314982071.png

Any hint?
 

Attachments

  • 1595314950199.png
    1595314950199.png
    125.9 KB · Views: 77
Garbage collection should run as root AFAIK, so this seems very strange. It it always that 'lost+found' directory? If so, you should be able to safely delete that, if you didn't use it to deliberately recover data. Try running a manualy GC afterwards to see if that fixed it.

If not, what are the permissions for /mnt/datastore/datastore1 ? Also, I'm assuming this is an external disk since it's under /mnt, what file system are you using?
 
Yes it was always lost+found directory causing trouble.

As far as i know, i did not changed / edited anything related to this thus it had to be done on the system side.
Its on a VM on my PVE host for testing at the moment, so the drive is a virtual disk.
Used EXT4 as filesystem. created with PBS tools.



Here's datastore permissions
1595335863723.png

Here's lost+found permissions:
1595335921331.png

Corrected with
Code:
chown backup:backup "/mnt/datastore/datastore1/lost+found/"

now GC is working correctly:
1595336129171.png
 

Attachments

  • 1595335899312.png
    1595335899312.png
    1.8 KB · Views: 55
  • Like
Reactions: lxiosjao
Are you sure you're using the newest version? I just tried replicating your problem but could not do so... Looking at the code we actually have a special rule to exclude the lost+found file, which should have prevented this.
 
i guess so, installed with 1.0 ISO and updated with apt-get update / apt-get upgrade
Actually on

Backup Server 0.8-6
BETA

really strange
 
Was:
TASK ERROR: cannot continue garbage-collection safely, permission denied on: /rpool/backup/basevol-100-disk-0/var/log/samba
Done some chmod g+r in /rpool/backup/basevol-100-disk-0/var/log, now stops in another directory:
TASK ERROR: cannot continue garbage-collection safely, permission denied on: /rpool/backup/basevol-100-disk-0/var/log/apache2
Then:
TASK ERROR: cannot continue garbage-collection safely, permission denied on: /rpool/backup/basevol-100-disk-0/var/cache/apt/partial
...
TASK ERROR: cannot continue garbage-collection safely, permission denied on: /rpool/backup/basevol-100-disk-0/var/cache/ldconfig
IMHO the trouble is somewhere else...
 
Last edited:
Well, I've found the difference, what is that directory stopping garbage collection... it is cloned template of CT!
But why on earth it's here and messing things for PBS?
I'll delete it now and test garbage collection again.
 
that sounds like you somehow re-used a directory as PVE directory storage and PBS datastore, which is not a good idea..
 
  • Like
Reactions: Ansy
that sounds like you somehow re-used a directory as PVE directory storage and PBS datastore, which is not a good idea..
Yes, reused directory... not only directory, but ZFS volume -- somewhat hard to delete, because I've already wiped backup from PVE Storage in web interface, so deleting CT template failed... needed to recreate ZFS item there.

Finally, CT template has been purged, ZFS volume rpool/backup/basevol-100-disk-0 destroyed, all other than PBS' ct and vm directories too. Garbage collection finished OK now.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!