New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samba recycle not working correctly #64

Fantu opened this Issue Mar 13, 2018 · 3 comments


None yet
2 participants

Fantu commented Mar 13, 2018

Hi, as described in #55 samba recycle was not working at all, after the fix start working but now I see that there is still something strange.
After investigating I found that one or more recycle (there are many share with recycle) was not full cleaned and in /run there was lock dir still present occasionally.
Trying /etc/cron.daily/openmediavault-samba-recycle manually I saw that it seems that "ends" occasionally scripts without having finished, without errors, with exit status 0 and leaving the lock dir present in / run for such cases.
I could not find the problem or a vague logical explanation for it :(
Thanks for any reply and sorry for my bad english.


This comment has been minimized.

h45rd commented Mar 13, 2018

Been having the same issue for a while as well.
Also see various reports in the OMV board, e.g. here.
@votdev's change to the trapping did not fix the problem for me either.

Gave up debugging and working around the issue with a custom cronjob for now until I upgrade to OMV4 and have some spare time.


This comment has been minimized.

Fantu commented Mar 29, 2018

I tried to add some logging on the script, on start, on end and on trap execute including exit status.
executing them manually all works, from omv cron instead in few day never end logging, only 2 trap (1 exit0 and 1 exit1), some lock remained and other never started.
I not understand what happen and what is the cause of issue :(

I just noticed a difference, dash should be the default shell in this version of debian:
ls -alh /bin/sh
lrwxrwxrwx 1 root root 4 mag 9 2017 /bin/sh -> dash
the script from first line having /bin/sh should use it, root instead from env SHELL=/bin/bash, tried to change the first line of both in /bin/bash FWIK should use bash instead and I'll see if will be execute without issue also from cron.


This comment has been minimized.

Fantu commented Apr 4, 2018

Finally seems working also automatically with cron: #80
Someone that have the same issue can tests it and tell me if ok please? Is not fast do accurate check on production system where I use it because have a very big amount of files with hundreds or more delete each hour, tried to execute manually 3 hours after cron and gave me another big list of delete but with a fast look on recycle on latest change date of files seems ok.
I also spotted that delete of empty directory works only with latest of tree, for example:
delete only dirN and the command that delete empty dir. should be execute many times to do a full clean, I added 7 times on my system but I not added in PR as it not seems good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment