Greyhole issues

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

Re: Greyhole issues

Postby gboudreau » Mon May 03, 2010 4:44 pm

I'm having the same problem.

Code: Select all

tail -f /var/log/greyhole.log
If you see log lines appear in there, it's working fine.

If nothing appears, try this:

Code: Select all

sqlite3 /var/cache/greyhole.sqlite 'select count(*) from tasks'
If, when you repeat that command over and over, the number it returns increases, it's working fine.
If nothing appears in greyhole.log while this number increases, that means it's currently parsing the /var/log/messages file, and inserting tasks in the sqlite database, that it will later process.

If that's your case, please tell us of how much in increases in a minute, by using this command:

Code: Select all

sqlite3 /var/cache/greyhole.sqlite 'select count(*) from tasks'; sleep 60; sqlite3 /var/cache/greyhole.sqlite 'select count(*) from tasks'
You can repeat that last test from time to time, to check if it inserts more and more slowly (which I guess it will).
- Guillaume Boudreau

robnix
Posts: 12
Joined: Wed Nov 04, 2009 3:39 pm

Re: Greyhole issues

Postby robnix » Tue May 04, 2010 3:20 pm

Thanks,

I had it work from one computer, but not another last night. I'll test it out again tonight and report back with what I find.

robnix
Posts: 12
Joined: Wed Nov 04, 2009 3:39 pm

Re: Greyhole issues

Postby robnix » Tue May 04, 2010 5:38 pm

Copying files into two shares that are both set to use the storage pool, this it the only message I see in the greyhole log:

May 4 05:33:13 7 sleep: Nothing to do... Sleeping.

files are going here:

/var/hda/files/docs
and here
/var/hda/files/pictures

instead of

/var/hda/files/drives/sdb1/gh/Pictures
/var/hda/files/drives/sdb1/gh/Docs

hmmmm . wonder if it's the difference between docs and Docs... will test after dinner.

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

Re: Greyhole issues

Postby gboudreau » Tue May 04, 2010 6:02 pm

Copying files into two shares that are both set to use the storage pool, this it the only message I see in the greyhole log:

May 4 05:33:13 7 sleep: Nothing to do... Sleeping.
Check the /var/log/message file for entries about the files you created on your shares.
If they are not there, that means samba isn't configured correctly.

Looks for "vfs objects = greyhole" in your /etc/samba/smb.conf, for each of the shares you checked the "uses pool" option in the Amahi Dashboard.
- Guillaume Boudreau

robnix
Posts: 12
Joined: Wed Nov 04, 2009 3:39 pm

Re: Greyhole issues

Postby robnix » Tue May 04, 2010 8:08 pm

smb.conf looks good
nothing going into greylog log now
sqlite tasks are increasing by about 670 per minute.

I'll follow up when it's done increasing

robnix
Posts: 12
Joined: Wed Nov 04, 2009 3:39 pm

Re: Greyhole issues

Postby robnix » Wed May 05, 2010 5:36 am

Thanks for all that. It really helped see what's going on. Looked like I had it working yesterday, but testing thsi morning it's back to copying files to the root drive.

tail -f /var/log/messages | grep greyhole has action:

Code: Select all

May 4 17:31:57 localhost smbd_greyhole: open*Music*Aerosmith/Devils Got A New Disguise/Aerosmith-Devil's Got A New Disguise, The Very Best Of Aerosmith-10-Janie's Got A Gun.mp3*30*for writing
sqlite tasks are stuck at 2

tail -f /var/log/greyhole.log is stuck here:

Code: Select all

May 4 16:45:31 7 rename: File /var/hda/files/Backups/SystemBackup May 05, 2010 (03.02.35).zip is locked by another process. Will wait until it's unlocked to work on it. May 4 16:45:31 2 rename: Error inserting postponed task: near "(": syntax error
I do need to fix the date, would that have anything to do with it?

robnix
Posts: 12
Joined: Wed Nov 04, 2009 3:39 pm

Re: Greyhole issues

Postby robnix » Wed May 05, 2010 7:22 am

Restarting the greyhole service seems to have fixed this. What may have caused the lock?

matsekelund
Posts: 2
Joined: Wed May 05, 2010 10:12 am

Re: Greyhole issues

Postby matsekelund » Thu May 06, 2010 1:56 am

It seems like Greyhole stops moving my files. This is what the log looks like:
May 6 10:42:44 6 daemon: Greyhole daemon started.
May 6 10:42:44 7 simplify_tasks: Simplifying pending tasks.
May 6 10:42:44 7 rename: Now working on task ID 11926: rename Music/FSP-{DF31E0D9-03C0-42DD-9B88-28507A4B5CDC}.tmp -> Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:45 6 rename: File renamed: /var/hda/files/music/FSP-{DF31E0D9-03C0-42DD-9B88-28507A4B5CDC}.tmp -> /var/hda/files/music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:45 7 rename: Loading tombstones for Music/FSP-{DF31E0D9-03C0-42DD-9B88-28507A4B5CDC}.tmp... Got 0 tombstones.
May 6 10:42:45 7 rename: Loading tombstones for Music/FSP-{DF31E0D9-03C0-42DD-9B88-28507A4B5CDC}.tmp... Got 0 tombstones.
May 6 10:42:45 6 rename: File changed: Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac - 32.0MB
May 6 10:42:45 7 rename: Will use source file: /var/hda/files/drives/sdb1/gh/Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:45 7 rename: Loading tombstones for Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac... Got 2 tombstones.
May 6 10:42:45 7 rename: Saving 2 tombstones for Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:45 7 rename: Saving tombstones in /var/hda/files/drives/sdb1/gh/.gh_graveyard/Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:45 7 rename: Saving tombstones in /var/hda/files/drives/sdc1/gh/.gh_graveyard/Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:45 7 rename: File copy at /var/hda/files/drives/sdb1/gh/Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac is already up to date.
May 6 10:42:45 7 rename: Copying file to /var/hda/files/drives/sdc1/gh/Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:47 7 rename: Saving 2 tombstones for Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:47 7 rename: Saving tombstones in /var/hda/files/drives/sdb1/gh/.gh_graveyard/Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:47 7 rename: Saving tombstones in /var/hda/files/drives/sdc1/gh/.gh_graveyard/Music/Aerosmith/Pump/Aerosmith - 09 - Hoodoo-Voodoo Medicine Man.flac
May 6 10:42:47 2 rename: Can't insert in tasks_completed: PRIMARY KEY must be unique

How do I fix this?

Cheers,
Mats

SolaR
Posts: 19
Joined: Fri May 28, 2010 1:44 am
Location: Netherlands

Re: Greyhole issues

Postby SolaR » Sat Jun 12, 2010 1:47 am

Just helped someone with the same problem.

It was solved by deleting the record that was giving trouble from the tasks_completed in the greyhole database.
In your case it would mean giving the following statement:

Code: Select all

sqlite3 /var/cache/greyhole.sqlite 'delete from tasks_completed where ID = 11926'

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

Re: Greyhole issues

Postby gboudreau » Mon Jun 14, 2010 5:58 am

A solution to permanently fix the problem has been posted here:
http://bugs.amahi.org/issues/show/516#note-1

Here's a copy paste.

Execute the following, as root:

Code: Select all

sqlite3 /var/cache/greyhole.sqlite 'drop table tasks_completed' sqlite3 /var/cache/greyhole.sqlite 'CREATE TABLE tasks_completed ( id INTEGER, action VARCHAR NOT NULL, share TINYTEXT NOT NULL, full_path TINYTEXT NULL, additional_info TINYTEXT NULL, complete TINYTEXT NOT NULL, event_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP)' service greyhole condrestart
Everyone using Greyhole should execute those commands.
Even if you didn't yet hit the above problem, there's always the chance you will, until you execute the above.
- Guillaume Boudreau

Who is online

Users browsing this forum: No registered users and 25 guests