Closed zarmstrong closed 9 years ago
I had this problem recently and as it turned out for me, Samba had crashed failing to close the handles to the files. My solution was copying the files to a new destination, deleting the original files and moving the copied files back to the original location (restating the system in between). This could work by just renaming the copied folder back to the original name.
Also, don't forget after doing this, you may have to set your file permissions back to their original values, so take note of that first.
I hope this helps, Keith
I should add it was only the files in the landing zone in my case which didn't allow greyhole to move them to the storage drives. I can't remember the command off hand, but you can copy only the files that are not symbolic links as well as delete those files via terminal as root.
Doing it this way would prevent you from having to recreate the entire greyhole pool through fsck. A little googling should net you the command.
It is indeed a stuck file write operation. Samba was closed (probably crashed) before it could close the file handle, and Greyhole now thinks it is still open. You can simply do:
touch "/mnt/samba/Media/TVShows/The Walking Dead/Season 04/The Walking Dead - S04E15 - Us.mkv.cover.jpg"
Provided that you have your shares locally mounted.
Also, if it's not too late, could you zip the /var/spool/greyhole folder, and send it to me at guillaume@greyhole.net ? Thanks.
Thanks for the suggestions. I tried touching the file both on the samba share and in the LZ. Didn't seem to have any affect at all.
I then moved ALL the files erroring in the log out of the LZ. This seemed to fix it. I'm letting it catch up before I put these files back in place, though this is probably an unnecessary precaution.
Sorry, I guess it's too late. That path is empty.
I'm actually able to reproduce it, but not reliably. I checked /var/spool/greyhole its empty save for a directory named mem (also empty).
Is there something I can do to enable some debugging that might help?
The workaround is move all the files listed in the error out of there, then back into the LZ after the error clears.
Yes, I looked into it, but was never able to reproduce, but I'm pretty sure I found the issue: it's that we saw the start of a write operation, and logged that into the Greyhole database, but never received the end-of-write signal, and thus that write operation stays locked forever. Try the new 0.9.62 version. When you're able to reproduce the issue, the fix is to either reboot, or execute this:
sudo greyhole --boot-init
That command is executed on boot, thus why a reboot should also fix the issue. It marks all file writes operations as complete, so make sure you're not writing to a file on samba when executing it; safer to just reboot.
Just noting that I had the same issue. I had renamed a in the LZ. Reboot fixed the issue as noted above.
I'm getting a bunch of messages in the greyhole log about locked shares. I can't seem to figure out the cause. Reboots, stopping other services, etc don't help. It's always the same files.