Greyhole problems

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole problems

Postby gboudreau » Tue Sep 07, 2010 2:15 pm

gh folders are where Greyhole store the real files.
You're deleting your data if you're deleting that folder.
- Guillaume Boudreau

rhubarb
Posts: 54
Joined: Wed May 05, 2010 1:59 pm

Re: Greyhole problems

Postby rhubarb » Wed Sep 08, 2010 12:36 am

I was only deleting stuff inside .gh_graveyard while the actual disks were unmounted. Does that help?

I will check more this evening
Peter

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole problems

Postby gboudreau » Wed Sep 08, 2010 3:55 am

To stop greyhole from writing to a gh directory, remove the .greyhole_uses_this file in there.
This file is created by Amahi, but it should only be created when your drives are mounted. There's a bug in the tracker about this.
Until that's fixed, you can manually delete the .greyhole_uses_this file that might appear when the drives are not mounted, and you change shares and storage pool settings in the Amahi Dashboard (that would re-create that file).
To work with your storage pool drives unmounted, you should stop greyhole, so that it doesn't work for nothing on trying to find your files. In the amahi dashboard, go in settings > servers, and uncheck watchdog for Greyhole, then hit stop. When you're done, go back there and check the watchdog option.
- Guillaume Boudreau

rhubarb
Posts: 54
Joined: Wed May 05, 2010 1:59 pm

Re: Greyhole problems

Postby rhubarb » Sun Sep 12, 2010 4:50 am

Yes I had forgotten to switch off Greyhole so it was creating (graveyard?) files on the mount point directory while I was trying to delete them. Doh! Atleast I didnt loose any real data (I think)

It looks like I have sorted the drive problem out (so they are now mounted using UUID=)

But I notice that when Greyhole is doing a fsck it often finds 4 tombstones. This seems a little more then necessary. (This problem predates the UUID= issue). How many tombstones should there be? Is there any link which explains how the tombstone mechanism works?

Sep 12 13:37:30 7 fsck: Found /mnt/500GB_1/gh/Pictures/pictures/CIMG0966.JPG
Sep 12 13:37:30 7 fsck: Found /mnt/500GB_2/gh/Pictures/pictures/CIMG0966.JPG
Sep 12 13:37:30 7 fsck: Loading tombstones for Pictures/pictures/CIMG0966.JPG... Got 4 tombstones.

I have 2 disks in my storage pool and "Extra copies = 1". (which should result in each data file existing once on each disk)

Peter

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole problems

Postby gboudreau » Sun Sep 12, 2010 6:10 am

That tombstones count can contain invalid / old / non working tombstones, thus why it can report more tombstones than file copies.

There is no real documentation on how Greyhole really works.
Some of it can be read in a blog post I made a while ago, but it's not complete at all, and it changed over time...
http://www.pommepause.com/blog/2009/11/ ... ke-system/
- Guillaume Boudreau

rhubarb
Posts: 54
Joined: Wed May 05, 2010 1:59 pm

Re: Greyhole problems

Postby rhubarb » Sun Sep 12, 2010 10:33 am

Hi

Another problem that appears in the greyhole log alot is locked files. Or perhaps it is just 1 file. That file has never been accessed (intentionally) since I started archiving it (a long time ago) on Greyhole so I dont see why it is locked.

Peter

Code: Select all

Sep 12 19:22:30 7 write: Now working on task ID 479204: write dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe Sep 12 19:22:30 6 write: File created: dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe - 8.50KB Sep 12 19:22:30 7 write: Loading tombstones for dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe... Got 0 tombstones. Sep 12 19:22:31 7 write: File is locked by another process. Will wait until it's unlocked to work on it. Sep 12 19:22:31 7 sleep: Only locked files operations pending... Sleeping. Sep 12 19:22:41 7 write: Now working on task ID 479205: write dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe Sep 12 19:22:41 6 write: File created: dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe - 8.50KB Sep 12 19:22:41 7 write: Loading tombstones for dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe... Got 0 tombstones. Sep 12 19:22:42 7 write: File is locked by another process. Will wait until it's unlocked to work on it. Sep 12 19:22:42 7 sleep: Only locked files operations pending... Sleeping. Sep 12 19:22:52 7 write: Now working on task ID 479206: write dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe Sep 12 19:22:52 6 write: File created: dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe - 8.50KB Sep 12 19:22:52 7 write: Loading tombstones for dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe... Got 0 tombstones. Sep 12 19:22:53 7 write: File is locked by another process. Will wait until it's unlocked to work on it. Sep 12 19:22:53 7 sleep: Only locked files operations pending... Sleeping. Sep 12 19:23:03 7 write: Now working on task ID 479207: write dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe Sep 12 19:23:03 6 write: File created: dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe - 8.50KB Sep 12 19:23:03 7 write: Loading tombstones for dev/gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe... Got 0 tombstones. Sep 12 19:23:04 7 write: File is locked by another process. Will wait until it's unlocked to work on it. Sep 12 19:23:04 7 sleep: Only locked files operations pending... Sleeping.

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole problems

Postby gboudreau » Sun Sep 12, 2010 12:07 pm

That's always the same file.
To check what process is locking that file, use the lsof command:

Code: Select all

su - lsof | grep "PC_Template_r.exe"
Greyhole is just telling you that lsof reports that file as in-use, so it won't work on it until lsof stops saying that.
- Guillaume Boudreau

rhubarb
Posts: 54
Joined: Wed May 05, 2010 1:59 pm

Re: Greyhole problems

Postby rhubarb » Sun Sep 12, 2010 1:57 pm

Hi
lsof is not returning anything important. But Greyhole still thinks the file is locked

Peter

Code: Select all

[peter@cutting ~]$ su - Password: [root@cutting ~]# lsof | grep "PC_Template_r.exe" lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/peter/.gvfs Output information may be incomplete. lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/anna/.gvfs Output information may be incomplete. [root@cutting ~]#

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Greyhole problems

Postby gboudreau » Sun Sep 12, 2010 3:28 pm

Another reason for a file to be locked in Greyhole is when Samba opened a file for writing, and never closed the file handle. Not sure how this could happen. Maybe if Samba quits unexpectedly while a file handle is open...
Anyway, here's how to fix it:

Code: Select all

sqlite3 /var/cache/greyhole.sqlite "UPDATE tasks SET complete = 'yes' WHERE action = 'write' AND share = 'dev' AND full_path LIKE '%gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe'"
This will mark as complete any write transaction, on the share named 'dev', for this file: gp2x/projects/old/imgui_toolkit/built/PC_Template_r.exe
- Guillaume Boudreau

rhubarb
Posts: 54
Joined: Wed May 05, 2010 1:59 pm

Re: Greyhole problems

Postby rhubarb » Tue Sep 14, 2010 2:34 pm

that did the trick. thanks for all the help.

Peter

Who is online

Users browsing this forum: No registered users and 17 guests