gboudreau / Greyhole

Greyhole uses Samba to create a storage pool of all your available hard drives, and allows you to create redundant copies of the files you store.
http://www.greyhole.net
GNU General Public License v3.0
262 stars 34 forks source link

Where to find debug-level details for event_code = file_copy_failed? #263

Open UNIVAC-Colonel-Panic opened 3 years ago

UNIVAC-Colonel-Panic commented 3 years ago

v0.15.3

I'm aware of issue #81 (email notification) but my question is about what is written to the greyhole log file. I have log_level = DEBUG and see the following two lines in the log file:

Received hook with event_type = warning, event_code = file_copy_failed Tokenize'd log: EVENT_DATE=Mar 16 17:15:00 ; LOG_LEVEL=WARN ; ACTION=fsck ; MESSAGE=Failed file copy (failed check: target filesize 0 != source filesize 174). Will mark this metadata file 'Gone'.

How do I find out what file -- or metadata file -- this is referring to?

I've tried to figure it out by the context of surrounding log file entries, but nothing seems to make sense except for other errors appearing for a drive I know is failing. I'd just like more details about the file itself.

gboudreau commented 3 years ago

Those lines were created by a hook, in /tmp/gh_log.txt (by default) which is unrelated to the log_level config option.

Look at the greyhole_log_file or greyhole_error_log_file options in your config. This is the daemon log that will contain the information you are looking for.

UNIVAC-Colonel-Panic commented 3 years ago

My bad, I forgot there are two different logs. Thank you for your prompt reply. I haven't found the related lines in greyhole_log_file yet and it's a lower priority at the moment, however I will investigate this when I'm dealing with fewer crises :D and report back.